diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 188f4f774f050edbecbd0cd65940bf4385c8c5ea..31571a966678a97016fc79259f932b4551c733fe 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -626,10 +626,11 @@ void nr_schedule_ue_spec(module_id_t module_id, frame_t frame, sub_frame_t slot, int num_slots_per_tdd) { + gNB_MAC_INST *gNB_mac = RC.nrmac[module_id]; + /* PREPROCESSOR */ - nr_simple_dlsch_preprocessor(module_id, frame, slot, num_slots_per_tdd); + gNB_mac->pre_processor_dl(module_id, frame, slot, num_slots_per_tdd); - gNB_MAC_INST *gNB_mac = RC.nrmac[module_id]; NR_UE_info_t *UE_info = &gNB_mac->UE_info; const int CC_id = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index c67b7ce07b875dc44198388d0b6cf79bd62d838d..118c68d91cccc0ff729c7ab377f811f901e2666e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -80,6 +80,12 @@ void nr_schedule_ue_spec(module_id_t module_id, sub_frame_t slot, int num_slots_per_tdd); +/* \brief default preprocessor */ +void nr_simple_dlsch_preprocessor(module_id_t module_id, + frame_t frame, + sub_frame_t slot, + int num_slots_per_tdd); + void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP); /////// Random Access MAC-PHY interface functions and primitives /////// diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index 7df00f15f1cc3967219f90b9a67fcd3ce956b0f7..eb28ef3770a5c4c310e9ddefec7d9fc198f6bb34 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -82,6 +82,8 @@ void mac_top_init_gNB(void) RC.nrmac[i]->ul_handle = 0; + RC.nrmac[i]->pre_processor_dl = nr_simple_dlsch_preprocessor; + }//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++) AssertFatal(rlc_module_init(1) == 0,"Could not initialize RLC layer\n"); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 889e50454c5ce11ea8efeebc1d6c69a0c1808077..6e9c547276835b5157c24b350ab5e1f9931f5e79 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -427,6 +427,11 @@ typedef struct { uint8_t UE_beam_index[MAX_MOBILES_PER_GNB]; } NR_UE_info_t; +typedef void (*nr_pp_impl_dl)(module_id_t mod_id, + frame_t frame, + sub_frame_t slot, + int num_slots_per_tdd); + /*! \brief top level eNB MAC structure */ typedef struct gNB_MAC_INST_s { /// Ethernet parameters for northbound midhaul interface @@ -489,6 +494,9 @@ typedef struct gNB_MAC_INST_s { int cce_list[MAX_NUM_BWP][MAX_NUM_CORESET][MAX_NUM_CCE]; /// current slot int current_slot; + + /// DL preprocessor for differentiated scheduling + nr_pp_impl_dl pre_processor_dl; } gNB_MAC_INST; #endif /*__LAYER2_NR_MAC_GNB_H__ */