Commit e59ac44c authored by luis_pereira87's avatar luis_pereira87

Merge branch 'NR_RRC_processing_timer' into Dedicated-BWPs

# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
#	openair2/RRC/NR/nr_rrc_defs.h
#	openair2/RRC/NR/rrc_gNB.c
parents bd7f837f 8e4c5138
...@@ -673,8 +673,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, ...@@ -673,8 +673,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
LOG_I(NR_MAC,"Modified UE_id %d/%x with CellGroup\n",UE_id,rnti); LOG_I(NR_MAC,"Modified UE_id %d/%x with CellGroup\n",UE_id,rnti);
process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]); process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]);
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
sched_ctrl->update_pdsch_ps = true;
sched_ctrl->update_pusch_ps = true;
const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL; const NR_PDSCH_ServingCellConfig_t *pdsch = servingCellConfig ? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL;
if (get_softmodem_params()->sa) { if (get_softmodem_params()->sa) {
// add all available DL HARQ processes for this UE in SA // add all available DL HARQ processes for this UE in SA
......
...@@ -1994,7 +1994,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram ...@@ -1994,7 +1994,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
sib1); sib1);
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs // 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
uint32_t delay_ms = bwpList ? 16 : 10; uint32_t delay_ms = bwpList ? NR_RRC_SETUP_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS : NR_RRC_SETUP_DELAY_MS;
sched_ctrl->rrc_processing_timer = (delay_ms << genericParameters->subcarrierSpacing); sched_ctrl->rrc_processing_timer = (delay_ms << genericParameters->subcarrierSpacing);
} }
else { else {
......
...@@ -589,7 +589,7 @@ bool allocate_dl_retransmission(module_id_t module_id, ...@@ -589,7 +589,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
} }
/* check whether we need to switch the TDA allocation since the last /* check whether we need to switch the TDA allocation since the last
* (re-)transmission */ * (re-)transmission */
if (ps->time_domain_allocation != tda || sched_ctrl->update_pdsch_ps) { if (ps->time_domain_allocation != tda) {
nr_set_pdsch_semi_static(sib1, nr_set_pdsch_semi_static(sib1,
scc, scc,
cg, cg,
...@@ -599,7 +599,6 @@ bool allocate_dl_retransmission(module_id_t module_id, ...@@ -599,7 +599,6 @@ bool allocate_dl_retransmission(module_id_t module_id,
ps->nrOfLayers, ps->nrOfLayers,
sched_ctrl, sched_ctrl,
ps); ps);
sched_ctrl->update_pdsch_ps = false;
} }
} else { } else {
/* the retransmission will use a different time domain allocation, check /* the retransmission will use a different time domain allocation, check
...@@ -914,7 +913,6 @@ void pf_dl(module_id_t module_id, ...@@ -914,7 +913,6 @@ void pf_dl(module_id_t module_id,
layers[UE_id], layers[UE_id],
sched_ctrl, sched_ctrl,
ps); ps);
sched_ctrl->update_pdsch_ps = false;
} }
const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols); const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
...@@ -1056,22 +1054,6 @@ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id) ...@@ -1056,22 +1054,6 @@ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id)
return nr_fr1_dlsch_preprocessor; return nr_fr1_dlsch_preprocessor;
} }
void nr_mac_update_timers(module_id_t module_id,
frame_t frame,
sub_frame_t slot) {
NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
const NR_list_t *UE_list = &UE_info->list;
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
if (sched_ctrl->rrc_processing_timer > 0) {
sched_ctrl->rrc_processing_timer--;
if (sched_ctrl->rrc_processing_timer == 0) {
LOG_I(NR_MAC, "(%d.%d) De-activating RRC processing timer for UE %d\n", frame, slot, UE_id);
}
}
}
}
void nr_schedule_ue_spec(module_id_t module_id, void nr_schedule_ue_spec(module_id_t module_id,
frame_t frame, frame_t frame,
sub_frame_t slot) { sub_frame_t slot) {
......
...@@ -579,16 +579,21 @@ void nr_set_pdsch_semi_static(const NR_SIB1_t *sib1, ...@@ -579,16 +579,21 @@ void nr_set_pdsch_semi_static(const NR_SIB1_t *sib1,
bwpd = (NR_BWP_DownlinkDedicated_t*)bwpd0; bwpd = (NR_BWP_DownlinkDedicated_t*)bwpd0;
} }
if (bwpd && if (sched_ctrl->update_pdsch_ps == true) {
bwpd->pdsch_Config && if (bwpd &&
bwpd->pdsch_Config->choice.setup && bwpd->pdsch_Config &&
bwpd->pdsch_Config->choice.setup->mcs_Table) { bwpd->pdsch_Config->choice.setup &&
if (*bwpd->pdsch_Config->choice.setup->mcs_Table == 0) bwpd->pdsch_Config->choice.setup->mcs_Table) {
ps->mcsTableIdx = 1; if (*bwpd->pdsch_Config->choice.setup->mcs_Table == 0) {
else ps->mcsTableIdx = 1;
ps->mcsTableIdx = 2; } else {
ps->mcsTableIdx = 2;
}
} else {
ps->mcsTableIdx = 0;
}
sched_ctrl->update_pdsch_ps = false;
} }
else ps->mcsTableIdx = 0;
LOG_D(NR_MAC,"MCS Table Index: %d\n",ps->mcsTableIdx); LOG_D(NR_MAC,"MCS Table Index: %d\n",ps->mcsTableIdx);
NR_PDSCH_Config_t *pdsch_Config; NR_PDSCH_Config_t *pdsch_Config;
...@@ -2607,6 +2612,11 @@ void nr_csirs_scheduling(int Mod_idP, ...@@ -2607,6 +2612,11 @@ void nr_csirs_scheduling(int Mod_idP,
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
if (sched_ctrl->rrc_processing_timer > 0) {
continue;
}
NR_CellGroupConfig_t *CellGroup = UE_info->CellGroup[UE_id]; NR_CellGroupConfig_t *CellGroup = UE_info->CellGroup[UE_id];
if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated || if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated ||
...@@ -2794,6 +2804,24 @@ void nr_csirs_scheduling(int Mod_idP, ...@@ -2794,6 +2804,24 @@ void nr_csirs_scheduling(int Mod_idP,
} }
} }
void nr_mac_update_timers(module_id_t module_id,
frame_t frame,
sub_frame_t slot) {
NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
const NR_list_t *UE_list = &UE_info->list;
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
if (sched_ctrl->rrc_processing_timer > 0) {
sched_ctrl->rrc_processing_timer--;
if (sched_ctrl->rrc_processing_timer == 0) {
LOG_I(NR_MAC, "(%d.%d) De-activating RRC processing timer for UE %d\n", frame, slot, UE_id);
sched_ctrl->update_pdsch_ps = true;
sched_ctrl->update_pusch_ps = true;
}
}
}
}
void nr_bwp_switch(module_id_t module_id, void nr_bwp_switch(module_id_t module_id,
frame_t frame, frame_t frame,
sub_frame_t slot, sub_frame_t slot,
......
...@@ -125,7 +125,7 @@ void nr_schedule_srs(int module_id, frame_t frame) { ...@@ -125,7 +125,7 @@ void nr_schedule_srs(int module_id, frame_t frame) {
sched_ctrl->sched_srs.slot = -1; sched_ctrl->sched_srs.slot = -1;
sched_ctrl->sched_srs.srs_scheduled = false; sched_ctrl->sched_srs.srs_scheduled = false;
if(!UE_info->Msg4_ACKed[UE_id]) { if(!UE_info->Msg4_ACKed[UE_id] || sched_ctrl->rrc_processing_timer > 0) {
continue; continue;
} }
......
...@@ -702,7 +702,9 @@ void nr_csi_meas_reporting(int Mod_idP, ...@@ -702,7 +702,9 @@ void nr_csi_meas_reporting(int Mod_idP,
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
const NR_CellGroupConfig_t *CellGroup = UE_info->CellGroup[UE_id]; const NR_CellGroupConfig_t *CellGroup = UE_info->CellGroup[UE_id];
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
if (sched_ctrl->ul_failure==1 && get_softmodem_params()->phy_test==0) continue; if ((sched_ctrl->rrc_processing_timer > 0) || (sched_ctrl->ul_failure==1 && get_softmodem_params()->phy_test==0)) {
continue;
}
if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated || if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated ||
!CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig) continue; !CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig) continue;
const NR_CSI_MeasConfig_t *csi_measconfig = CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup; const NR_CSI_MeasConfig_t *csi_measconfig = CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup;
......
...@@ -97,8 +97,9 @@ typedef struct nr_uid_linear_allocator_s { ...@@ -97,8 +97,9 @@ typedef struct nr_uid_linear_allocator_s {
#define PROTOCOL_NR_RRC_CTXT_ARGS(CTXT_Pp) PROTOCOL_NR_CTXT_ARGS(CTXT_Pp) #define PROTOCOL_NR_RRC_CTXT_ARGS(CTXT_Pp) PROTOCOL_NR_CTXT_ARGS(CTXT_Pp)
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs // 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
#define NR_RRC_PROCESSING_DELAY_MS 10 #define NR_RRC_SETUP_DELAY_MS 10
#define NR_RRC_BWP_SWITCH_DELAY_MS 6 #define NR_RRC_RECONFIGURATION_DELAY_MS 10
#define NR_RRC_BWP_SWITCHING_DELAY_MS 6
#define NR_UE_MODULE_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!! #define NR_UE_MODULE_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!!
#define NR_UE_INDEX_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!! used to be -1 #define NR_UE_INDEX_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!! used to be -1
......
This diff is collapsed.
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