diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index a3ea1ce6b8..758d37e6bb 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -745,7 +745,7 @@ int main(int argc, char **argv) while ((roundharq_ack.ack==0)) { memset(RC.nrmac[0]->cce_list[1][0],0,MAX_NUM_CCE*sizeof(int)); memset(RC.nrmac[0]->cce_list[1][1],0,MAX_NUM_CCE*sizeof(int)); - clear_nr_nfapi_information_dl(RC.nrmac[0], 0, frame, slot); + clear_nr_nfapi_information(RC.nrmac[0], 0, frame, slot); UE_list->UE_sched_ctrl[0].harq_processes[0].ndi = !(trial&1); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 300f8f853a..08fcf5bbaa 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -62,12 +62,13 @@ const uint8_t nr_slots_per_frame[5] = {10, 20, 40, 80, 160}; uint16_t nr_pdcch_order_table[6] = { 31, 31, 511, 2047, 2047, 8191 }; -void clear_nr_nfapi_information_dl(gNB_MAC_INST * gNB, - int CC_idP, - frame_t frameP, - sub_frame_t slotP){ +void clear_nr_nfapi_information(gNB_MAC_INST * gNB, + int CC_idP, + frame_t frameP, + sub_frame_t slotP){ nfapi_nr_dl_tti_request_t *DL_req = &gNB->DL_req[0]; + nfapi_nr_ul_tti_request_t *UL_tti_req = &gNB->UL_tti_req[0]; nfapi_nr_ul_dci_request_t *UL_dci_req = &gNB->UL_dci_req[0]; nfapi_nr_tx_data_request_t *TX_req = &gNB->TX_req[0]; @@ -85,28 +86,17 @@ void clear_nr_nfapi_information_dl(gNB_MAC_INST * gNB, UL_dci_req[CC_idP].Slot = slotP; UL_dci_req[CC_idP].numPdus = 0; - TX_req[CC_idP].Number_of_PDUs = 0; - - } -} - -void clear_nr_nfapi_information_ul(gNB_MAC_INST * gNB, - int CC_idP, - frame_t frameP, - sub_frame_t slotP){ - - nfapi_nr_ul_tti_request_t *UL_tti_req = &gNB->UL_tti_req[0]; - - if (nfapi_mode==0 || nfapi_mode == 1) { // monolithic or PNF UL_tti_req[CC_idP].SFN = frameP; UL_tti_req[CC_idP].Slot = slotP; UL_tti_req[CC_idP].n_pdus = 0; UL_tti_req[CC_idP].n_ulsch = 0; UL_tti_req[CC_idP].n_ulcch = 0; UL_tti_req[CC_idP].n_group = 0; + + TX_req[CC_idP].Number_of_PDUs = 0; + } } - /* void check_nr_ul_failure(module_id_t module_idP, int CC_id, @@ -429,7 +419,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, memset(cc[CC_id].vrb_map, 0, 100); memset(cc[CC_id].vrb_map_UL, 0, 100); - clear_nr_nfapi_information_dl(RC.nrmac[module_idP], CC_id, frame_txP, slot_txP); + clear_nr_nfapi_information(RC.nrmac[module_idP], CC_id, frame_txP, slot_txP); } // refresh UE list based on UEs dropped by PHY in previous subframe diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 980b26bdbb..4e29adf978 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -56,15 +56,10 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, NR_CellGroupConfig_t *secondaryCellGroup ); -void clear_nr_nfapi_information_dl(gNB_MAC_INST * gNB, - int CC_idP, - frame_t frameP, - sub_frame_t subframeP); - -void clear_nr_nfapi_information_ul(gNB_MAC_INST * gNB, - int CC_idP, - frame_t frameP, - sub_frame_t subframeP); +void clear_nr_nfapi_information(gNB_MAC_INST * gNB, + int CC_idP, + frame_t frameP, + sub_frame_t subframeP); void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame_txP, sub_frame_t slot_txP, diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c index 578a47df4f..2b8dc0ec02 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c @@ -225,7 +225,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) { } // clear DL/UL info for new scheduling round - clear_nr_nfapi_information_ul(mac,CC_id,UL_info->frame,UL_info->slot); + clear_nr_nfapi_information(mac,CC_id,UL_info->frame,UL_info->slot); handle_nr_rach(UL_info); handle_nr_uci(UL_info, &mac->UE_list.UE_sched_ctrl[0]); // clear HI prior to handling ULSCH