srs and csi in BWP structures
This commit is contained in:
@@ -304,7 +304,6 @@ void nr_dlsim_preprocessor(module_id_t module_id,
|
||||
|
||||
nr_set_pdsch_semi_static(BWP,
|
||||
scc,
|
||||
UE_info->CellGroup,
|
||||
/* tda = */ 0,
|
||||
g_nrOfLayers,
|
||||
sched_ctrl,
|
||||
|
||||
@@ -379,7 +379,6 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
NR_UE_DL_BWP_t *BWP = &UE->current_DL_BWP;
|
||||
NR_UE_UL_BWP_t *UBWP = &UE->current_UL_BWP;
|
||||
NR_sched_pdsch_t *retInfo = &sched_ctrl->harq_processes[current_harq_pid].sched_pdsch;
|
||||
NR_CellGroupConfig_t *cg = UE->CellGroup;
|
||||
|
||||
const int coresetid = sched_ctrl->coreset->controlResourceSetId;
|
||||
const uint16_t bwpSize = coresetid == 0 ? RC.nrmac[module_id]->cset0_bwp_size : BWP->BWPSize;
|
||||
@@ -416,7 +415,6 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
if (ps->time_domain_allocation != tda) {
|
||||
nr_set_pdsch_semi_static(BWP,
|
||||
scc,
|
||||
cg,
|
||||
tda,
|
||||
ps->nrOfLayers,
|
||||
sched_ctrl,
|
||||
@@ -429,7 +427,6 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
|
||||
nr_set_pdsch_semi_static(BWP,
|
||||
scc,
|
||||
cg,
|
||||
tda,
|
||||
ps->nrOfLayers,
|
||||
sched_ctrl,
|
||||
@@ -710,7 +707,6 @@ void pf_dl(module_id_t module_id,
|
||||
if (ps->nrOfLayers != iterator->UE->layers || ps->time_domain_allocation != tda ) {
|
||||
nr_set_pdsch_semi_static(BWP,
|
||||
scc,
|
||||
iterator->UE->CellGroup,
|
||||
tda,
|
||||
iterator->UE->layers,
|
||||
sched_ctrl,
|
||||
|
||||
@@ -202,7 +202,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
ps->nrOfLayers = target_dl_Nl;
|
||||
if (ps->time_domain_allocation != tda || ps->nrOfLayers != target_dl_Nl)
|
||||
nr_set_pdsch_semi_static(BWP, scc, UE->CellGroup, tda, target_dl_Nl,sched_ctrl , ps);
|
||||
nr_set_pdsch_semi_static(BWP, scc, tda, target_dl_Nl,sched_ctrl , ps);
|
||||
|
||||
/* find largest unallocated chunk */
|
||||
const int bwpSize = BWP->BWPSize;
|
||||
|
||||
@@ -510,7 +510,6 @@ bool nr_find_nb_rb(uint16_t Qm,
|
||||
|
||||
void nr_set_pdsch_semi_static(const NR_UE_DL_BWP_t *BWP,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
const NR_CellGroupConfig_t *secondaryCellGroup,
|
||||
int tda,
|
||||
uint8_t layers,
|
||||
NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
@@ -2201,7 +2200,6 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
|
||||
NR_BWP_Uplink_t *ul_bwp = NULL;
|
||||
NR_BWP_DownlinkDedicated_t *bwpd = NULL;
|
||||
NR_BWP_UplinkDedicated_t *ubwpd = NULL;
|
||||
NR_CSI_MeasConfig_t *csi_MeasConfig = NULL;
|
||||
DL_BWP->n_dl_bwp = 1;
|
||||
UL_BWP->n_ul_bwp = 1;
|
||||
int old_dl_bwp_id = DL_BWP->bwp_id;
|
||||
@@ -2215,7 +2213,6 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
|
||||
|
||||
const NR_ServingCellConfig_t *servingCellConfig = CellGroup->spCellConfig->spCellConfigDedicated;
|
||||
DL_BWP->pdsch_servingcellconfig = servingCellConfig->pdsch_ServingCellConfig? servingCellConfig->pdsch_ServingCellConfig->choice.setup : NULL;
|
||||
csi_MeasConfig = servingCellConfig->csi_MeasConfig ? servingCellConfig->csi_MeasConfig->choice.setup : NULL;
|
||||
target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
|
||||
|
||||
if(UE && UE->Msg3_dcch_dtch) {
|
||||
@@ -2271,6 +2268,8 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
|
||||
DL_BWP->pdsch_Config = bwpd->pdsch_Config->choice.setup;
|
||||
UL_BWP->pusch_Config = ubwpd->pusch_Config->choice.setup;
|
||||
UL_BWP->pucch_Config = ubwpd->pucch_Config->choice.setup;
|
||||
UL_BWP->srs_Config = ubwpd->srs_Config->choice.setup;
|
||||
UL_BWP->csi_MeasConfig = servingCellConfig->csi_MeasConfig ? servingCellConfig->csi_MeasConfig->choice.setup : NULL;
|
||||
}
|
||||
else {
|
||||
DL_BWP->bwp_id = 0;
|
||||
@@ -2279,6 +2278,7 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
|
||||
DL_BWP->pdsch_Config = NULL;
|
||||
UL_BWP->pusch_Config = NULL;
|
||||
UL_BWP->pucch_Config = NULL;
|
||||
UL_BWP->csi_MeasConfig = NULL;
|
||||
}
|
||||
|
||||
if (old_dl_bwp_id != DL_BWP->bwp_id)
|
||||
@@ -2369,8 +2369,8 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
|
||||
NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0) :
|
||||
NR_UL_DCI_FORMAT_0_0;
|
||||
|
||||
if (csi_MeasConfig)
|
||||
compute_csi_bitlen (csi_MeasConfig, UE);
|
||||
if (UL_BWP->csi_MeasConfig)
|
||||
compute_csi_bitlen (UL_BWP->csi_MeasConfig, UE);
|
||||
|
||||
}
|
||||
|
||||
@@ -2671,13 +2671,13 @@ void nr_csirs_scheduling(int Mod_idP,
|
||||
if (sched_ctrl->rrc_processing_timer > 0) {
|
||||
continue;
|
||||
}
|
||||
NR_CellGroupConfig_t *CellGroup = UE->CellGroup;
|
||||
|
||||
NR_UE_DL_BWP_t *BWP = &UE->current_DL_BWP;
|
||||
NR_UE_UL_BWP_t *UBWP = &UE->current_UL_BWP;
|
||||
|
||||
if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated ||
|
||||
!CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig) continue;
|
||||
if (!UBWP->csi_MeasConfig) continue;
|
||||
|
||||
NR_CSI_MeasConfig_t *csi_measconfig = CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup;
|
||||
NR_CSI_MeasConfig_t *csi_measconfig = UBWP->csi_MeasConfig;
|
||||
|
||||
if (csi_measconfig->nzp_CSI_RS_ResourceToAddModList != NULL) {
|
||||
|
||||
@@ -2913,7 +2913,6 @@ void nr_mac_update_timers(module_id_t module_id,
|
||||
|
||||
nr_set_pdsch_semi_static(&UE->current_DL_BWP,
|
||||
scc,
|
||||
cg,
|
||||
tda,
|
||||
layers,
|
||||
sched_ctrl,
|
||||
|
||||
@@ -108,7 +108,6 @@ void nr_schedule_srs(int module_id, frame_t frame) {
|
||||
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
const int CC_id = 0;
|
||||
NR_CellGroupConfig_t *cg = UE->CellGroup;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP;
|
||||
|
||||
@@ -120,16 +119,9 @@ void nr_schedule_srs(int module_id, frame_t frame) {
|
||||
continue;
|
||||
}
|
||||
|
||||
NR_SRS_Config_t *srs_config = NULL;
|
||||
if (cg &&
|
||||
cg->spCellConfig &&
|
||||
cg->spCellConfig->spCellConfigDedicated &&
|
||||
cg->spCellConfig->spCellConfigDedicated->uplinkConfig &&
|
||||
cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP) {
|
||||
srs_config = cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->srs_Config->choice.setup;
|
||||
} else {
|
||||
NR_SRS_Config_t *srs_config = current_BWP->srs_Config;
|
||||
if (!srs_config)
|
||||
continue;
|
||||
}
|
||||
|
||||
for(int rs = 0; rs < srs_config->srs_ResourceSetToAddModList->list.count; rs++) {
|
||||
|
||||
|
||||
@@ -688,16 +688,14 @@ void nr_csi_meas_reporting(int Mod_idP,
|
||||
sub_frame_t slot) {
|
||||
|
||||
UE_iterator(RC.nrmac[Mod_idP]->UE_info.list, UE ) {
|
||||
const NR_CellGroupConfig_t *CellGroup = UE->CellGroup;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
NR_UE_UL_BWP_t *UL_BWP = &UE->current_UL_BWP;
|
||||
const int n_slots_frame = nr_slots_per_frame[UL_BWP->scs];
|
||||
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 ||
|
||||
!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 = UL_BWP->csi_MeasConfig;
|
||||
if (!csi_measconfig) continue;
|
||||
AssertFatal(csi_measconfig->csi_ReportConfigToAddModList->list.count > 0,
|
||||
"NO CSI report configuration available");
|
||||
NR_PUCCH_Config_t *pucch_Config = UL_BWP->pucch_Config;
|
||||
@@ -1472,15 +1470,10 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
|
||||
LOG_E(NR_MAC, "%s(): unknown RNTI %04x in PUCCH UCI\n", __func__, uci_234->rnti);
|
||||
return;
|
||||
}
|
||||
AssertFatal(UE->CellGroup,"Cellgroup is null for UE %04x\n", uci_234->rnti);
|
||||
AssertFatal(UE->CellGroup->spCellConfig,
|
||||
"Cellgroup->spCellConfig is null for UE %04x\n", uci_234->rnti);
|
||||
AssertFatal(UE->CellGroup->spCellConfig->spCellConfigDedicated,
|
||||
"Cellgroup->spCellConfig->spCellConfigDedicated is null for UE %04x\n", uci_234->rnti);
|
||||
if ( UE->CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig==NULL)
|
||||
return;
|
||||
|
||||
NR_CSI_MeasConfig_t *csi_MeasConfig = UE->CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup;
|
||||
NR_CSI_MeasConfig_t *csi_MeasConfig = UE->current_UL_BWP.csi_MeasConfig;
|
||||
if (csi_MeasConfig==NULL)
|
||||
return;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
|
||||
// tpc (power control)
|
||||
|
||||
@@ -331,7 +331,6 @@ long get_K2(NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList,
|
||||
|
||||
void nr_set_pdsch_semi_static(const NR_UE_DL_BWP_t *BWP,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
const NR_CellGroupConfig_t *secondaryCellGroup,
|
||||
int tda,
|
||||
uint8_t layers,
|
||||
NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
|
||||
@@ -116,6 +116,8 @@ typedef struct NR_UE_UL_BWP {
|
||||
NR_PUSCH_Config_t *pusch_Config;
|
||||
NR_PUCCH_Config_t *pucch_Config;
|
||||
NR_PUCCH_ConfigCommon_t *pucch_ConfigCommon;
|
||||
NR_CSI_MeasConfig_t *csi_MeasConfig;
|
||||
NR_SRS_Config_t *srs_Config;
|
||||
uint8_t transform_precoding;
|
||||
uint8_t mcs_table;
|
||||
nr_dci_format_t dci_format;
|
||||
|
||||
Reference in New Issue
Block a user