Commit e881ffca authored by francescomani's avatar francescomani

improvements in selecting DL MCS table

parent 214aa505
......@@ -3727,12 +3727,36 @@ int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Posi
return l_prime;
}
uint8_t get_pdsch_mcs_table(long *mcs_Table, int dci_format, int rnti_type, int ss_type)
{
// Set downlink MCS table (Semi-persistend scheduling ignored for now)
uint8_t mcsTableIdx = 0; // default value
if (mcs_Table &&
*mcs_Table == NR_PDSCH_Config__mcs_Table_qam256 &&
dci_format == NR_DL_DCI_FORMAT_1_1 &&
rnti_type == NR_RNTI_C)
mcsTableIdx = 1;
else if (rnti_type != NR_RNTI_MCS_C &&
mcs_Table &&
*mcs_Table == NR_PDSCH_Config__mcs_Table_qam64LowSE &&
ss_type == NR_SearchSpace__searchSpaceType_PR_ue_Specific)
mcsTableIdx = 2;
else if (rnti_type == NR_RNTI_MCS_C)
mcsTableIdx = 2;
LOG_D(NR_MAC,"DL MCS Table Index: %d\n", mcsTableIdx);
return mcsTableIdx;
}
uint8_t get_pusch_mcs_table(long *mcs_Table,
int is_tp,
int dci_format,
int rnti_type,
int target_ss,
bool config_grant) {
bool config_grant)
{
// implementing 6.1.4.1 in 38.214
if (mcs_Table != NULL) {
......
......@@ -151,6 +151,8 @@ uint8_t compute_nr_root_seq(NR_RACH_ConfigCommon_t *rach_config,
int ul_ant_bits(NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig,long transformPrecoder);
uint8_t get_pdsch_mcs_table(long *mcs_Table, int dci_format, int rnti_type, int ss_type);
int get_format0(uint8_t index, uint8_t unpaired,frequency_range_t);
int64_t *get_prach_config_info(frequency_range_t freq_range,
......
......@@ -2445,17 +2445,6 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
UL_BWP->initial_BWPSize = NRRIV2BW(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
UL_BWP->initial_BWPStart = NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
// Set downlink MCS table
if (DL_BWP->pdsch_Config &&
DL_BWP->pdsch_Config->mcs_Table) {
if (*DL_BWP->pdsch_Config->mcs_Table == 0)
DL_BWP->mcsTableIdx = 1;
else
DL_BWP->mcsTableIdx = 2;
} else
DL_BWP->mcsTableIdx = 0;
LOG_D(NR_MAC,"DL MCS Table Index: %d\n",DL_BWP->mcsTableIdx);
if (UL_BWP->pusch_Config == NULL || !UL_BWP->pusch_Config->transformPrecoder)
UL_BWP->transform_precoding = !scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder;
else
......@@ -2539,14 +2528,17 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac,
DL_BWP->dci_format = NR_DL_DCI_FORMAT_1_0;
}
// Set uplink MCS table
long *mcs_Table = NULL;
// Set MCS tables
long *dl_mcs_Table = DL_BWP->pdsch_Config ? DL_BWP->pdsch_Config->mcs_Table : NULL;
DL_BWP->mcsTableIdx = get_pdsch_mcs_table(dl_mcs_Table, DL_BWP->dci_format, NR_RNTI_C, target_ss);
long *ul_mcs_Table = NULL;
if (UL_BWP->pusch_Config)
mcs_Table = UL_BWP->transform_precoding ?
UL_BWP->pusch_Config->mcs_Table :
UL_BWP->pusch_Config->mcs_TableTransformPrecoder;
ul_mcs_Table = UL_BWP->transform_precoding ?
UL_BWP->pusch_Config->mcs_Table :
UL_BWP->pusch_Config->mcs_TableTransformPrecoder;
UL_BWP->mcs_table = get_pusch_mcs_table(mcs_Table,
UL_BWP->mcs_table = get_pusch_mcs_table(ul_mcs_Table,
UL_BWP->transform_precoding ? 0 : 1,
UL_BWP->dci_format,
NR_RNTI_C,
......
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