diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 3ffbc621bc..78019f9d97 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -307,6 +307,7 @@ void processSlotTX(void *arg) { ul_indication.frame_tx = proc->frame_tx; ul_indication.slot_tx = proc->nr_slot_tx; ul_indication.thread_id = proc->thread_id; + ul_indication.ue_sched_mode = rxtxD->ue_sched_mode; UE->if_inst->ul_indication(&ul_indication); } @@ -358,6 +359,9 @@ void processSlotRX(void *arg) { nr_pdcp_tick(proc->frame_rx, proc->nr_slot_rx / UE->frame_parms.slots_per_subframe); } } + // calling UL_indication to schedule things other than PUSCH (eg, PUCCH) + rxtxD->ue_sched_mode = NOT_PUSCH; + processSlotTX(rxtxD); // Wait for PUSCH processing to finish notifiedFIFO_elt_t *res; @@ -365,6 +369,7 @@ void processSlotRX(void *arg) { delNotifiedFIFO_elt(res); } else { + rxtxD->ue_sched_mode = SCHED_ALL; processSlotTX(rxtxD); } diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index c9f29e2266..cc2f58805d 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -1084,6 +1084,7 @@ typedef struct { typedef struct nr_rxtx_thread_data_s { UE_nr_rxtx_proc_t proc; PHY_VARS_NR_UE *UE; + NR_UE_SCHED_MODE_t ue_sched_mode; notifiedFIFO_t txFifo; } nr_rxtx_thread_data_t; diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 2b8678da0e..6842411440 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1778,6 +1778,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(newElt); curMsg->proc = *proc; curMsg->UE = ue; + curMsg->ue_sched_mode = ONLY_PUSCH; pushTpool(&(get_nrUE_params()->Tpool), newElt); #if UE_TIMING_TRACE diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 5acc413f38..3421e72625 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -94,7 +94,12 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){ module_id_t module_id = ul_info->module_id; NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); - ret = nr_ue_scheduler(NULL, ul_info); + if (ul_info->ue_sched_mode == PUSCH) { + ret = nr_ue_scheduler(NULL, ul_info); + return 0; + } + else if (ul_info->ue_sched_mode == SCHED_ALL) + ret = nr_ue_scheduler(NULL, ul_info); NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon = mac->scc != NULL ? mac->scc->tdd_UL_DL_ConfigurationCommon : mac->scc_SIB->tdd_UL_DL_ConfigurationCommon; diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h index 449c7bf890..1ab9954344 100755 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h @@ -39,6 +39,12 @@ typedef struct NR_UL_TIME_ALIGNMENT NR_UL_TIME_ALIGNMENT_t; +typedef enum { + ONLY_PUSCH, + NOT_PUSCH, + SCHED_ALL, +} NR_UE_SCHED_MODE_t; + typedef struct { /// module id module_id_t module_id; @@ -100,6 +106,9 @@ typedef struct { /// dci reception indication structure fapi_nr_dci_indication_t *dci_ind; + + NR_UE_SCHED_MODE_t ue_sched_mode; + } nr_uplink_indication_t; // Downlink subframe P7