Merge remote-tracking branch 'origin/xl_min_mcs' into integration_2025_w15 (!3281)
Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters
Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters,
they will enforce the gNB scheduler to select always a MCS equal or
above its values
In addition to use a min value for MCS, this MR also enables the testing
of a specific MCS value with COTS UE, by setting
xl_min_mcs = xl_max_mcs
example:
dl_min_mcs: 22
dl_max_mcs: 22
ul_min_mcs: 7
ul_max_mcs: 7
In the example above, the scheduler will use always MCS 22 for downlink
and MCS 7 for uplink.
This commit is contained in:
@@ -63,14 +63,15 @@
|
||||
#define CONFIG_STRING_MACRLC_PUSCHFAILURETHRES "pusch_FailureThres"
|
||||
#define CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER "dl_bler_target_upper"
|
||||
#define CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER "dl_bler_target_lower"
|
||||
#define CONFIG_STRING_MACRLC_DL_MIN_MCS "dl_min_mcs"
|
||||
#define CONFIG_STRING_MACRLC_DL_MAX_MCS "dl_max_mcs"
|
||||
#define CONFIG_STRING_MACRLC_UL_BLER_TARGET_UPPER "ul_bler_target_upper"
|
||||
#define CONFIG_STRING_MACRLC_UL_BLER_TARGET_LOWER "ul_bler_target_lower"
|
||||
#define CONFIG_STRING_MACRLC_UL_MIN_MCS "ul_min_mcs"
|
||||
#define CONFIG_STRING_MACRLC_UL_MAX_MCS "ul_max_mcs"
|
||||
#define CONFIG_STRING_MACRLC_DL_HARQ_ROUND_MAX "dl_harq_round_max"
|
||||
#define CONFIG_STRING_MACRLC_UL_HARQ_ROUND_MAX "ul_harq_round_max"
|
||||
#define CONFIG_STRING_MACRLC_MIN_GRANT_PRB "min_grant_prb"
|
||||
#define CONFIG_STRING_MACRLC_MIN_GRANT_MCS "min_grant_mcs"
|
||||
#define CONFIG_STRING_MACRLC_IDENTITY_PM "identity_precoding_matrix"
|
||||
#define CONFIG_STRING_MACRLC_ANALOG_BEAMFORMING "set_analog_beamforming"
|
||||
#define CONFIG_STRING_MACRLC_BEAM_DURATION "beam_duration"
|
||||
@@ -81,14 +82,15 @@
|
||||
#define HLP_MACRLC_UL_PRBBLACK "SNR threshold to decide whether a PRB will be blacklisted or not"
|
||||
#define HLP_MACRLC_DL_BLER_UP "Upper threshold of BLER to decrease DL MCS"
|
||||
#define HLP_MACRLC_DL_BLER_LO "Lower threshold of BLER to increase DL MCS"
|
||||
#define HLP_MACRLC_DL_MIN_MCS "Minimum DL MCS that should be used"
|
||||
#define HLP_MACRLC_DL_MAX_MCS "Maximum DL MCS that should be used"
|
||||
#define HLP_MACRLC_UL_BLER_UP "Upper threshold of BLER to decrease UL MCS"
|
||||
#define HLP_MACRLC_UL_BLER_LO "Lower threshold of BLER to increase UL MCS"
|
||||
#define HLP_MACRLC_UL_MIN_MCS "Minimum UL MCS that should be used"
|
||||
#define HLP_MACRLC_UL_MAX_MCS "Maximum UL MCS that should be used"
|
||||
#define HLP_MACRLC_DL_HARQ_MAX "Maximum number of DL HARQ rounds"
|
||||
#define HLP_MACRLC_UL_HARQ_MAX "Maximum number of UL HARQ rounds"
|
||||
#define HLP_MACRLC_MIN_GRANT_PRB "Minimal Periodic ULSCH Grant PRBs"
|
||||
#define HLP_MACRLC_MIN_GRANT_MCS "Minimal Periodic ULSCH Grant MCS"
|
||||
#define HLP_MACRLC_IDENTITY_PM "Flag to use only identity matrix in DL precoding"
|
||||
#define HLP_MACRLC_AB "Flag to enable analog beamforming"
|
||||
#define HLP_MACRLC_BEAM_DURATION "number of consecutive slots for a given set of beams"
|
||||
@@ -125,14 +127,15 @@
|
||||
{CONFIG_STRING_MACRLC_PUSCHFAILURETHRES, NULL, 0, .iptr=NULL, .defintval=10, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER, HLP_MACRLC_DL_BLER_UP, 0, .dblptr=NULL, .defdblval=0.15, TYPE_DOUBLE, 0}, \
|
||||
{CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER, HLP_MACRLC_DL_BLER_LO, 0, .dblptr=NULL, .defdblval=0.05, TYPE_DOUBLE, 0}, \
|
||||
{CONFIG_STRING_MACRLC_DL_MIN_MCS, HLP_MACRLC_DL_MIN_MCS, 0, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_DL_MAX_MCS, HLP_MACRLC_DL_MAX_MCS, 0, .u8ptr=NULL, .defintval=28, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_UL_BLER_TARGET_UPPER, HLP_MACRLC_UL_BLER_UP, 0, .dblptr=NULL, .defdblval=0.15, TYPE_DOUBLE, 0}, \
|
||||
{CONFIG_STRING_MACRLC_UL_BLER_TARGET_LOWER, HLP_MACRLC_UL_BLER_LO, 0, .dblptr=NULL, .defdblval=0.05, TYPE_DOUBLE, 0}, \
|
||||
{CONFIG_STRING_MACRLC_UL_MIN_MCS, HLP_MACRLC_UL_MIN_MCS, 0, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_UL_MAX_MCS, HLP_MACRLC_UL_MAX_MCS, 0, .u8ptr=NULL, .defintval=28, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_DL_HARQ_ROUND_MAX, HLP_MACRLC_DL_HARQ_MAX, 0, .u8ptr=NULL, .defintval=4, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_UL_HARQ_ROUND_MAX, HLP_MACRLC_UL_HARQ_MAX, 0, .u8ptr=NULL, .defintval=4, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_MIN_GRANT_PRB, HLP_MACRLC_MIN_GRANT_PRB, 0, .u8ptr=NULL, .defintval=5, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_MIN_GRANT_MCS, HLP_MACRLC_MIN_GRANT_MCS, 0, .u8ptr=NULL, .defintval=9, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_IDENTITY_PM, HLP_MACRLC_IDENTITY_PM, PARAMFLAG_BOOL, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \
|
||||
{CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS_F1U, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_MACRLC_TRANSPORT_S_SHM_PREFIX, NULL, 0, .strptr=NULL, .defstrval="nvipc", TYPE_STRING, 0}, \
|
||||
@@ -170,23 +173,24 @@
|
||||
#define MACRLC_PUSCHFAILURETHRES_IDX 20
|
||||
#define MACRLC_DL_BLER_TARGET_UPPER_IDX 21
|
||||
#define MACRLC_DL_BLER_TARGET_LOWER_IDX 22
|
||||
#define MACRLC_DL_MAX_MCS_IDX 23
|
||||
#define MACRLC_UL_BLER_TARGET_UPPER_IDX 24
|
||||
#define MACRLC_UL_BLER_TARGET_LOWER_IDX 25
|
||||
#define MACRLC_UL_MAX_MCS_IDX 26
|
||||
#define MACRLC_DL_HARQ_ROUND_MAX_IDX 27
|
||||
#define MACRLC_UL_HARQ_ROUND_MAX_IDX 28
|
||||
#define MACRLC_MIN_GRANT_PRB_IDX 29
|
||||
#define MACRLC_MIN_GRANT_MCS_IDX 30
|
||||
#define MACRLC_IDENTITY_PM_IDX 31
|
||||
#define MACRLC_LOCAL_N_ADDRESS_F1U_IDX 32
|
||||
#define MACRLC_TRANSPORT_S_SHM_PREFIX 33
|
||||
#define MACRLC_TRANSPORT_S_POLL_CORE 34
|
||||
#define MACRLC_ANALOG_BEAMFORMING_IDX 35
|
||||
#define MACRLC_ANALOG_BEAM_DURATION_IDX 36
|
||||
#define MACRLC_ANALOG_BEAMS_PERIOD_IDX 37
|
||||
#define MACRLC_PUSCH_RSSI_THRES_IDX 38
|
||||
#define MACRLC_PUCCH_RSSI_THRES_IDX 39
|
||||
#define MACRLC_DL_MIN_MCS_IDX 23
|
||||
#define MACRLC_DL_MAX_MCS_IDX 24
|
||||
#define MACRLC_UL_BLER_TARGET_UPPER_IDX 25
|
||||
#define MACRLC_UL_BLER_TARGET_LOWER_IDX 26
|
||||
#define MACRLC_UL_MIN_MCS_IDX 27
|
||||
#define MACRLC_UL_MAX_MCS_IDX 28
|
||||
#define MACRLC_DL_HARQ_ROUND_MAX_IDX 29
|
||||
#define MACRLC_UL_HARQ_ROUND_MAX_IDX 30
|
||||
#define MACRLC_MIN_GRANT_PRB_IDX 31
|
||||
#define MACRLC_IDENTITY_PM_IDX 32
|
||||
#define MACRLC_LOCAL_N_ADDRESS_F1U_IDX 33
|
||||
#define MACRLC_TRANSPORT_S_SHM_PREFIX 34
|
||||
#define MACRLC_TRANSPORT_S_POLL_CORE 35
|
||||
#define MACRLC_ANALOG_BEAMFORMING_IDX 36
|
||||
#define MACRLC_ANALOG_BEAM_DURATION_IDX 37
|
||||
#define MACRLC_ANALOG_BEAMS_PERIOD_IDX 38
|
||||
#define MACRLC_PUSCH_RSSI_THRES_IDX 39
|
||||
#define MACRLC_PUCCH_RSSI_THRES_IDX 40
|
||||
|
||||
#define MACRLCPARAMS_CHECK { \
|
||||
{ .s5 = { NULL } }, \
|
||||
@@ -212,14 +216,15 @@
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s2 = { config_check_intrange, {0, 31} } }, /* DL min MCS */ \
|
||||
{ .s2 = { config_check_intrange, {0, 31} } }, /* DL max MCS */ \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s2 = { config_check_intrange, {0, 31} } }, /* UL min MCS */ \
|
||||
{ .s2 = { config_check_intrange, {0, 31} } }, /* UL max MCS */ \
|
||||
{ .s2 = { config_check_intrange, {1, 8} } }, /* DL max HARQ rounds */ \
|
||||
{ .s2 = { config_check_intrange, {1, 8} } }, /* UL max HARQ rounds */ \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s2 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
|
||||
@@ -1650,6 +1650,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
NR_bler_options_t *dl_bler_options = &RC.nrmac[j]->dl_bler;
|
||||
dl_bler_options->upper = *(MacRLC_ParamList.paramarray[j][MACRLC_DL_BLER_TARGET_UPPER_IDX].dblptr);
|
||||
dl_bler_options->lower = *(MacRLC_ParamList.paramarray[j][MACRLC_DL_BLER_TARGET_LOWER_IDX].dblptr);
|
||||
dl_bler_options->min_mcs = *(MacRLC_ParamList.paramarray[j][MACRLC_DL_MIN_MCS_IDX].u8ptr);
|
||||
dl_bler_options->max_mcs = *(MacRLC_ParamList.paramarray[j][MACRLC_DL_MAX_MCS_IDX].u8ptr);
|
||||
if (config.disable_harq)
|
||||
dl_bler_options->harq_round_max = 1;
|
||||
@@ -1658,13 +1659,13 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
NR_bler_options_t *ul_bler_options = &RC.nrmac[j]->ul_bler;
|
||||
ul_bler_options->upper = *(MacRLC_ParamList.paramarray[j][MACRLC_UL_BLER_TARGET_UPPER_IDX].dblptr);
|
||||
ul_bler_options->lower = *(MacRLC_ParamList.paramarray[j][MACRLC_UL_BLER_TARGET_LOWER_IDX].dblptr);
|
||||
ul_bler_options->min_mcs = *(MacRLC_ParamList.paramarray[j][MACRLC_UL_MIN_MCS_IDX].u8ptr);
|
||||
ul_bler_options->max_mcs = *(MacRLC_ParamList.paramarray[j][MACRLC_UL_MAX_MCS_IDX].u8ptr);
|
||||
if (config.disable_harq)
|
||||
ul_bler_options->harq_round_max = 1;
|
||||
else
|
||||
ul_bler_options->harq_round_max = *(MacRLC_ParamList.paramarray[j][MACRLC_UL_HARQ_ROUND_MAX_IDX].u8ptr);
|
||||
RC.nrmac[j]->min_grant_prb = *(MacRLC_ParamList.paramarray[j][MACRLC_MIN_GRANT_PRB_IDX].u8ptr);
|
||||
RC.nrmac[j]->min_grant_mcs = *(MacRLC_ParamList.paramarray[j][MACRLC_MIN_GRANT_MCS_IDX].u8ptr);
|
||||
RC.nrmac[j]->identity_pm = *(MacRLC_ParamList.paramarray[j][MACRLC_IDENTITY_PM_IDX].u8ptr);
|
||||
// PRB Blacklist
|
||||
uint16_t prbbl[MAX_BWP_SIZE] = {0};
|
||||
|
||||
@@ -732,12 +732,6 @@ int get_mcs_from_bler(const NR_bler_options_t *bler_options,
|
||||
int max_mcs,
|
||||
frame_t frame)
|
||||
{
|
||||
/* first call: everything is zero. Initialize to sensible default */
|
||||
if (bler_stats->last_frame == 0 && bler_stats->mcs == 0) {
|
||||
bler_stats->last_frame = frame;
|
||||
bler_stats->mcs = 9;
|
||||
bler_stats->bler = (bler_options->lower + bler_options->upper) / 2.0f;
|
||||
}
|
||||
int diff = frame - bler_stats->last_frame;
|
||||
if (diff < 0) // wrap around
|
||||
diff += 1024;
|
||||
@@ -756,11 +750,11 @@ int get_mcs_from_bler(const NR_bler_options_t *bler_options,
|
||||
int new_mcs = old_mcs;
|
||||
if (bler_stats->bler < bler_options->lower && old_mcs < max_mcs && num_dl_sched > 3)
|
||||
new_mcs += 1;
|
||||
else if ((bler_stats->bler > bler_options->upper && old_mcs > 6) // above threshold
|
||||
|| (num_dl_sched <= 3 && old_mcs > 9)) // no activity
|
||||
else if (bler_stats->bler > bler_options->upper || num_dl_sched <= 3) // above threshold or no activity
|
||||
new_mcs -= 1;
|
||||
// else we are within threshold boundaries
|
||||
|
||||
new_mcs = max(new_mcs, bler_options->min_mcs);
|
||||
bler_stats->last_frame = frame;
|
||||
bler_stats->mcs = new_mcs;
|
||||
memcpy(bler_stats->rounds, stats->rounds, sizeof(stats->rounds));
|
||||
@@ -2492,6 +2486,13 @@ void reset_srs_stats(NR_UE_info_t *UE) {
|
||||
}
|
||||
}
|
||||
|
||||
static void init_bler_stats(const NR_bler_options_t *bler_options, NR_bler_stats_t *bler_stats, frame_t frame)
|
||||
{
|
||||
bler_stats->last_frame = frame;
|
||||
bler_stats->mcs = bler_options->min_mcs;
|
||||
bler_stats->bler = (float)(bler_options->lower + bler_options->upper) / 2.0f;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConfig_t *CellGroup)
|
||||
{
|
||||
@@ -2522,6 +2523,10 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf
|
||||
sched_ctrl->sched_srs.slot = -1;
|
||||
sched_ctrl->pdcch_cl_adjust = 0;
|
||||
|
||||
// Initialize bler_stats
|
||||
init_bler_stats(&nr_mac->dl_bler, &sched_ctrl->dl_bler_stats, nr_mac->frame);
|
||||
init_bler_stats(&nr_mac->ul_bler, &sched_ctrl->ul_bler_stats, nr_mac->frame);
|
||||
|
||||
// initialize LCID structure
|
||||
seq_arr_init(&sched_ctrl->lc_config, sizeof(nr_lc_config_t));
|
||||
|
||||
|
||||
@@ -2051,7 +2051,6 @@ static void pf_ul(module_id_t module_id,
|
||||
fill_pdcch_vrb_map(nrmac, CC_id, &sched_ctrl->sched_pdcch, CCEIndex, sched_ctrl->aggregation_level, dci_beam.idx);
|
||||
|
||||
NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
|
||||
sched_pusch->mcs = max(nrmac->min_grant_mcs, sched_pusch->mcs);
|
||||
update_ul_ue_R_Qm(sched_pusch->mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched_pusch->R, &sched_pusch->Qm);
|
||||
sched_pusch->rbStart = rbStart;
|
||||
sched_pusch->rbSize = min_rb;
|
||||
|
||||
@@ -738,6 +738,7 @@ typedef struct NR_mac_stats {
|
||||
typedef struct NR_bler_options {
|
||||
double upper;
|
||||
double lower;
|
||||
uint8_t min_mcs;
|
||||
uint8_t max_mcs;
|
||||
uint8_t harq_round_max;
|
||||
} NR_bler_options_t;
|
||||
@@ -939,7 +940,6 @@ typedef struct gNB_MAC_INST_s {
|
||||
NR_bler_options_t dl_bler;
|
||||
NR_bler_options_t ul_bler;
|
||||
uint8_t min_grant_prb;
|
||||
uint8_t min_grant_mcs;
|
||||
bool identity_pm;
|
||||
int precoding_matrix_size[NR_MAX_NB_LAYERS];
|
||||
int fapi_beam_index[MAX_NUM_OF_SSB];
|
||||
|
||||
@@ -177,7 +177,7 @@ MACRLCs = (
|
||||
pusch_TargetSNRx10 = 150;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
min_grant_prb = 20;
|
||||
min_grant_mcs = 16;
|
||||
ul_min_mcs = 16;
|
||||
dl_max_mcs = 10;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user