Commit c4706eda authored by Ejaz Ahmed's avatar Ejaz Ahmed

Added further logs

parent 28f2129d
......@@ -69,7 +69,7 @@ bool nr_schedule_slsch(NR_UE_MAC_INST_t *mac, int frameP,int slotP, nr_sci_pdu_t
sci2_pdu->rv_index=0;
sci2_pdu->source_id=0x12;
sci2_pdu->dest_id=0xabcd;
sci2_pdu->harq_feedback=1;
sci2_pdu->harq_feedback=0;
sci2_pdu->cast_type=1;
if (format2==NR_SL_SCI_FORMAT_2C || format2==NR_SL_SCI_FORMAT_2A)
sci2_pdu->csi_req=1;
......
......@@ -3266,7 +3266,7 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
if ((slot % 10) != 6) return false;
*/
LOG_D(NR_MAC,"[UE%d] SL-PSSCH SCHEDULER: Frame:SLOT %d:%d, slot_type:%d\n",
LOG_I(NR_MAC,"[UE%d] SL-PSSCH SCHEDULER: Frame:SLOT %d:%d, slot_type:%d\n",
sl_ind->module_id, frame, slot,sl_ind->slot_type);
uint16_t slsch_pdu_length_max;
......@@ -3543,7 +3543,7 @@ void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind) {
}
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
LOG_I(NR_MAC, "frame: %d, slot %d, slot type: %d, harq feedback %d\n", frame, slot, sl_ind->slot_type, mac->sci_pdu_rx.harq_feedback);
LOG_D(NR_MAC, "frame: %d, slot %d, slot type: %d, harq feedback %d\n", frame, slot, sl_ind->slot_type, mac->sci_pdu_rx.harq_feedback);
sl_nr_ue_mac_params_t *sl_mac = mac->SL_MAC_PARAMS;
sl_nr_phy_config_request_t *sl_cfg = &sl_mac->sl_phy_config.sl_config_req;
......@@ -3571,6 +3571,8 @@ void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind) {
// Check if PSBCH slot and PSBCH should be transmitted or Received
is_psbch_slot = nr_ue_sl_psbch_scheduler(sl_ind, sl_mac, &rx_config, &tx_config, &tti_action);
if (is_psbch_slot)
LOG_I(NR_MAC, "frame %d, slot %d slot type PSBCH %d\n", frame, slot, sl_ind->slot_type);
bool tx_allowed=true,rx_allowed=true;
if (mac->sl_tx_res_pool && mac->sl_tx_res_pool->ext1 && mac->sl_tx_res_pool->ext1->sl_TimeResource_r16) {
......@@ -3587,25 +3589,27 @@ void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind) {
}
if (sl_ind->slot_type==SIDELINK_SLOT_TYPE_TX || sl_ind->phy_data==NULL) rx_allowed=false;
LOG_D(NR_MAC, "sync_ref %d, slot_rx %d, rx_allowed %d, psbch slot %d\n", get_nrUE_params()->sync_ref, sl_ind->slot_rx, rx_allowed, !is_psbch_slot);
if (get_nrUE_params()->sync_ref && rx_allowed && !is_psbch_slot) {
NR_SL_PSFCH_Config_r16_t *sl_psfch_config = mac->sl_rx_res_pool->sl_PSFCH_Config_r16->choice.setup;
const uint8_t psfch_periods[] = {0,1,2,4};
long psfch_period = (sl_psfch_config->sl_PSFCH_Period_r16)
? psfch_periods[*sl_psfch_config->sl_PSFCH_Period_r16] : 0;
if (slot%psfch_period == 0) {
LOG_D(NR_MAC,"Scheduling PSFCH RX processing slot %d, sync_ref %d\n",slot,get_nrUE_params()->sync_ref);
nr_ue_sl_psfch_rx_scheduler(mac, sl_ind, mac->sl_bwp->sl_BWP_Generic_r16, mac->sl_rx_res_pool, &rx_config, &tti_action);
}
}
// if (get_nrUE_params()->sync_ref && rx_allowed && !is_psbch_slot) {
// NR_SL_PSFCH_Config_r16_t *sl_psfch_config = mac->sl_rx_res_pool->sl_PSFCH_Config_r16->choice.setup;
// const uint8_t psfch_periods[] = {0,1,2,4};
// long psfch_period = (sl_psfch_config->sl_PSFCH_Period_r16)
// ? psfch_periods[*sl_psfch_config->sl_PSFCH_Period_r16] : 0;
// if (slot%psfch_period == 0) {
// LOG_D(NR_MAC,"Scheduling PSFCH RX processing slot %d, sync_ref %d\n",slot,get_nrUE_params()->sync_ref);
// nr_ue_sl_psfch_rx_scheduler(mac, sl_ind, mac->sl_bwp->sl_BWP_Generic_r16, mac->sl_rx_res_pool, &rx_config, &tti_action);
// }
// }
if (((get_nrUE_params()->sync_ref && sl_ind->slot_rx > 9) ||
(!get_nrUE_params()->sync_ref && sl_ind->slot_rx < 10)) && rx_allowed && !is_psbch_slot) {
LOG_I(NR_MAC, "frame %d, slot %d slot type %d\n", frame, slot, sl_ind->slot_type);
LOG_D(NR_MAC,"Scheduling PSCCH RX processing slot %d, sync_ref %d\n",slot,get_nrUE_params()->sync_ref);
nr_ue_sl_pscch_rx_scheduler(sl_ind, mac->sl_bwp, mac->sl_rx_res_pool,&rx_config, &tti_action);
}
if (!is_psbch_slot && tx_allowed) {
//Check if reserved slot or a sidelink resource configured in Rx/Tx resource pool timeresource bitmap
nr_ue_sl_pssch_scheduler(mac,sl_ind, mac->sl_bwp, mac->sl_tx_res_pool,&tx_config, &tti_action);
LOG_I(NR_MAC, "frame %d, slot %d slot type %d\n", frame, slot, sl_ind->slot_type);
}
// FIXIT: harq_feedback value has issue, more often it is displaying as zero
if (sl_ind->slot_type == SIDELINK_SLOT_TYPE_TX && mac->sci_pdu_rx.harq_feedback) {
......@@ -3624,6 +3628,7 @@ void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind) {
if (current_harq->is_active) {
LOG_D(NR_MAC, "harq pid %d, sl_ind->frame_tx %d, sl_ind->slot_tx %d, frame %d, slot %d\n", harq_pid, sl_ind->frame_tx, sl_ind->slot_tx, frame, slot);
if (current_harq->feedback_slot == slot && current_harq->feedback_frame == frame && current_harq->is_active) {
LOG_I(NR_MAC, "frame %d, slot %d slot type tx feedback\n", frame, slot);
LOG_D(NR_MAC, "Scheduling PSFCH transmission at frame %d slot %d for harq_pid %d\n", current_harq->feedback_frame, current_harq->feedback_slot, harq_pid);
nr_ue_sl_psfch_scheduler(mac, sl_ind, mac->sl_bwp, mac->sl_tx_res_pool, &tx_config, &tti_action);
current_harq->is_active = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment