Merge remote-tracking branch 'origin/issue563' into integration_2025_w48 (!3703)
Taking into account UE capabilities for TBS_lbrm layers Closes #563
This commit is contained in:
@@ -176,8 +176,8 @@ gNBs =
|
|||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.202";
|
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.53";
|
||||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.202";
|
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.53";
|
||||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -168,8 +168,8 @@ gNBs =
|
|||||||
|
|
||||||
NETWORK_INTERFACES :
|
NETWORK_INTERFACES :
|
||||||
{
|
{
|
||||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.202";
|
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.53";
|
||||||
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.202";
|
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.53";
|
||||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1113,7 +1113,12 @@ void post_process_dlsch(gNB_MAC_INST *nr_mac, post_process_pdsch_t *pdsch, NR_UE
|
|||||||
// TODO: verify the case where maxMIMO_Layers is NULL, in which case
|
// TODO: verify the case where maxMIMO_Layers is NULL, in which case
|
||||||
// in principle maxMIMO_layers should be given by the maximum number of layers
|
// in principle maxMIMO_layers should be given by the maximum number of layers
|
||||||
// for PDSCH supported by the UE for the serving cell (5.4.2.1 of 38.212)
|
// for PDSCH supported by the UE for the serving cell (5.4.2.1 of 38.212)
|
||||||
long maxMIMO_Layers = UE->sc_info.maxMIMO_Layers_PDSCH ? *UE->sc_info.maxMIMO_Layers_PDSCH : 1;
|
long ue_supp_nl = ue_supported_dl_layers(scc, UE->capability);
|
||||||
|
long maxMIMO_Layers = UE->sc_info.maxMIMO_Layers_PDSCH ? *UE->sc_info.maxMIMO_Layers_PDSCH : ue_supp_nl;
|
||||||
|
if (maxMIMO_Layers < 1) {
|
||||||
|
LOG_D(NR_MAC, "Both maxMIMO_Layers_PDSCH and UE supported layers are not present, defaulting to 1\n");
|
||||||
|
maxMIMO_Layers = 1;
|
||||||
|
}
|
||||||
const int nl_tbslbrm = min(maxMIMO_Layers, 4);
|
const int nl_tbslbrm = min(maxMIMO_Layers, 4);
|
||||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu = prepare_pdsch_pdu(dl_tti_pdsch_pdu,
|
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu = prepare_pdsch_pdu(dl_tti_pdsch_pdu,
|
||||||
nr_mac,
|
nr_mac,
|
||||||
@@ -1395,5 +1400,4 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
|||||||
|
|
||||||
/* PREPROCESSOR */
|
/* PREPROCESSOR */
|
||||||
gNB_mac->pre_processor_dl(gNB_mac, &pdsch);
|
gNB_mac->pre_processor_dl(gNB_mac, &pdsch);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2375,10 +2375,9 @@ nfapi_nr_pusch_pdu_t *prepare_pusch_pdu(nfapi_nr_ul_tti_request_t *future_ul_tti
|
|||||||
long *maxMIMO_Layers = UE->sc_info.maxMIMO_Layers_PUSCH;
|
long *maxMIMO_Layers = UE->sc_info.maxMIMO_Layers_PUSCH;
|
||||||
if (!maxMIMO_Layers && ul_bwp && ul_bwp->pusch_Config)
|
if (!maxMIMO_Layers && ul_bwp && ul_bwp->pusch_Config)
|
||||||
maxMIMO_Layers = ul_bwp->pusch_Config->maxRank;
|
maxMIMO_Layers = ul_bwp->pusch_Config->maxRank;
|
||||||
|
long lbrm_layers = maxMIMO_Layers ? *maxMIMO_Layers : ue_supported_ul_layers(UE->capability);
|
||||||
AssertFatal (maxMIMO_Layers != NULL,"Option with max MIMO layers not configured is not supported\n");
|
AssertFatal (maxMIMO_Layers != NULL,"Option with max MIMO layers not configured is not supported\n");
|
||||||
pusch_pdu->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(ul_bwp->mcs_table,
|
pusch_pdu->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(ul_bwp->mcs_table, UE->sc_info.ul_bw_tbslbrm, lbrm_layers);
|
||||||
UE->sc_info.ul_bw_tbslbrm,
|
|
||||||
*maxMIMO_Layers);
|
|
||||||
}
|
}
|
||||||
/* PUSCH PTRS */
|
/* PUSCH PTRS */
|
||||||
if (sched_pusch->dmrs_info.ptrsConfig) {
|
if (sched_pusch->dmrs_info.ptrsConfig) {
|
||||||
|
|||||||
@@ -585,22 +585,13 @@ static void config_csiim(int do_csirs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcellconfig,
|
long ue_supported_dl_layers(const NR_ServingCellConfigCommon_t *scc, const NR_UE_NR_Capability_t *uecap)
|
||||||
const NR_ServingCellConfigCommon_t *scc,
|
|
||||||
const NR_UE_NR_Capability_t *uecap,
|
|
||||||
int maxMIMO_layers)
|
|
||||||
{
|
{
|
||||||
if(!pdsch_servingcellconfig->ext1)
|
|
||||||
pdsch_servingcellconfig->ext1=calloc(1,sizeof(*pdsch_servingcellconfig->ext1));
|
|
||||||
if(!pdsch_servingcellconfig->ext1->maxMIMO_Layers)
|
|
||||||
pdsch_servingcellconfig->ext1->maxMIMO_Layers = calloc(1,sizeof(*pdsch_servingcellconfig->ext1->maxMIMO_Layers));
|
|
||||||
|
|
||||||
NR_SCS_SpecificCarrier_t *scs_carrier = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0];
|
NR_SCS_SpecificCarrier_t *scs_carrier = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0];
|
||||||
int band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
|
int band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
|
||||||
const frequency_range_t freq_range = get_freq_range_from_band(band);
|
const frequency_range_t freq_range = get_freq_range_from_band(band);
|
||||||
const int scs = scs_carrier->subcarrierSpacing;
|
const int scs = scs_carrier->subcarrierSpacing;
|
||||||
const int bw_size = scs_carrier->carrierBandwidth;
|
const int bw_size = scs_carrier->carrierBandwidth;
|
||||||
|
|
||||||
NR_FeatureSets_t *fs = uecap ? uecap->featureSets : NULL;
|
NR_FeatureSets_t *fs = uecap ? uecap->featureSets : NULL;
|
||||||
if (fs) {
|
if (fs) {
|
||||||
const int bw_mhz = get_supported_bw_mhz(freq_range, get_supported_band_index(scs, freq_range, bw_size));
|
const int bw_mhz = get_supported_bw_mhz(freq_range, get_supported_band_index(scs, freq_range, bw_size));
|
||||||
@@ -610,16 +601,29 @@ void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcellconfig,
|
|||||||
if (scs == dl_fs->supportedSubcarrierSpacingDL &&
|
if (scs == dl_fs->supportedSubcarrierSpacingDL &&
|
||||||
supported_bw_comparison(bw_mhz, &dl_fs->supportedBandwidthDL, dl_fs->channelBW_90mhz) &&
|
supported_bw_comparison(bw_mhz, &dl_fs->supportedBandwidthDL, dl_fs->channelBW_90mhz) &&
|
||||||
dl_fs->maxNumberMIMO_LayersPDSCH) {
|
dl_fs->maxNumberMIMO_LayersPDSCH) {
|
||||||
long ue_supported_layers = (2 << *dl_fs->maxNumberMIMO_LayersPDSCH);
|
return (2 << *dl_fs->maxNumberMIMO_LayersPDSCH);
|
||||||
if (maxMIMO_layers == -1)
|
|
||||||
*pdsch_servingcellconfig->ext1->maxMIMO_Layers = NR_MAX_SUPPORTED_DL_LAYERS < ue_supported_layers ? NR_MAX_SUPPORTED_DL_LAYERS : ue_supported_layers;
|
|
||||||
else
|
|
||||||
*pdsch_servingcellconfig->ext1->maxMIMO_Layers = maxMIMO_layers < ue_supported_layers ? maxMIMO_layers : ue_supported_layers;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*pdsch_servingcellconfig->ext1->maxMIMO_Layers = 2;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcellconfig,
|
||||||
|
const NR_ServingCellConfigCommon_t *scc,
|
||||||
|
const NR_UE_NR_Capability_t *uecap,
|
||||||
|
int maxMIMO_layers)
|
||||||
|
{
|
||||||
|
if(!pdsch_servingcellconfig->ext1)
|
||||||
|
pdsch_servingcellconfig->ext1 = calloc(1, sizeof(*pdsch_servingcellconfig->ext1));
|
||||||
|
if(!pdsch_servingcellconfig->ext1->maxMIMO_Layers)
|
||||||
|
pdsch_servingcellconfig->ext1->maxMIMO_Layers = calloc(1, sizeof(*pdsch_servingcellconfig->ext1->maxMIMO_Layers));
|
||||||
|
|
||||||
|
long l = ue_supported_dl_layers(scc, uecap);
|
||||||
|
long ue_supported_layers = l > 1 ? l : 2; // min UE supported layers = 2
|
||||||
|
if (maxMIMO_layers == -1)
|
||||||
|
*pdsch_servingcellconfig->ext1->maxMIMO_Layers = min(NR_MAX_SUPPORTED_DL_LAYERS, ue_supported_layers);
|
||||||
|
else
|
||||||
|
*pdsch_servingcellconfig->ext1->maxMIMO_Layers = min(maxMIMO_layers, ue_supported_layers);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Implement to b_SRS = 1 and b_SRS = 2
|
// TODO: Implement to b_SRS = 1 and b_SRS = 2
|
||||||
@@ -3735,10 +3739,11 @@ NR_CellGroupConfig_t *get_initial_cellGroupConfig(int uid,
|
|||||||
return cellGroupConfig;
|
return cellGroupConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long set_ul_max_layers(const nr_mac_config_t *configuration, const NR_UE_NR_Capability_t *uecap)
|
long ue_supported_ul_layers(const NR_UE_NR_Capability_t *uecap)
|
||||||
{
|
{
|
||||||
long ul_max_layers = 1;
|
long ul_max_layers = 1;
|
||||||
if (uecap && uecap->featureSets
|
if (uecap
|
||||||
|
&& uecap->featureSets
|
||||||
&& uecap->featureSets->featureSetsUplinkPerCC
|
&& uecap->featureSets->featureSetsUplinkPerCC
|
||||||
&& uecap->featureSets->featureSetsUplinkPerCC->list.count > 0) {
|
&& uecap->featureSets->featureSetsUplinkPerCC->list.count > 0) {
|
||||||
NR_FeatureSetUplinkPerCC_t *ul_feature_setup_per_cc = uecap->featureSets->featureSetsUplinkPerCC->list.array[0];
|
NR_FeatureSetUplinkPerCC_t *ul_feature_setup_per_cc = uecap->featureSets->featureSetsUplinkPerCC->list.array[0];
|
||||||
@@ -3754,11 +3759,15 @@ static long set_ul_max_layers(const nr_mac_config_t *configuration, const NR_UE_
|
|||||||
ul_max_layers = 1;
|
ul_max_layers = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ul_max_layers = min(ul_max_layers, configuration->pusch_AntennaPorts);
|
|
||||||
}
|
}
|
||||||
return ul_max_layers;
|
return ul_max_layers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static long set_ul_max_layers(const nr_mac_config_t *configuration, const NR_UE_NR_Capability_t *uecap)
|
||||||
|
{
|
||||||
|
return min(ue_supported_ul_layers(uecap), configuration->pusch_AntennaPorts);
|
||||||
|
}
|
||||||
|
|
||||||
NR_CellGroupConfig_t * update_cellGroupConfig_for_BWP_switch(NR_CellGroupConfig_t *cellGroupConfig,
|
NR_CellGroupConfig_t * update_cellGroupConfig_for_BWP_switch(NR_CellGroupConfig_t *cellGroupConfig,
|
||||||
const nr_mac_config_t *configuration,
|
const nr_mac_config_t *configuration,
|
||||||
const NR_UE_NR_Capability_t *uecap,
|
const NR_UE_NR_Capability_t *uecap,
|
||||||
|
|||||||
@@ -134,5 +134,6 @@ NR_CellGroupConfig_t * update_cellGroupConfig_for_BWP_switch(NR_CellGroupConfig_
|
|||||||
NR_MeasurementTimingConfiguration_t *get_nr_mtc(uint8_t *buf, uint32_t len);
|
NR_MeasurementTimingConfiguration_t *get_nr_mtc(uint8_t *buf, uint32_t len);
|
||||||
measgap_config_t create_measgap_config(const NR_MeasurementTimingConfiguration_t *mtc, int scs, int min_rxtxtime);
|
measgap_config_t create_measgap_config(const NR_MeasurementTimingConfiguration_t *mtc, int scs, int min_rxtxtime);
|
||||||
int encode_measgap_config(const measgap_config_t *c, uint8_t *buf);
|
int encode_measgap_config(const measgap_config_t *c, uint8_t *buf);
|
||||||
|
long ue_supported_ul_layers(const NR_UE_NR_Capability_t *uecap);
|
||||||
|
long ue_supported_dl_layers(const NR_ServingCellConfigCommon_t *scc, const NR_UE_NR_Capability_t *uecap);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user