fix in max mcs for table1
This commit is contained in:
@@ -384,12 +384,17 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
|
|||||||
|
|
||||||
#define BLER_UPDATE_FRAME 10
|
#define BLER_UPDATE_FRAME 10
|
||||||
#define BLER_FILTER 0.9f
|
#define BLER_FILTER 0.9f
|
||||||
int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t slot, int UE_id)
|
int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t slot, int UE_id, int mcs_table)
|
||||||
{
|
{
|
||||||
gNB_MAC_INST *nrmac = RC.nrmac[mod_id];
|
gNB_MAC_INST *nrmac = RC.nrmac[mod_id];
|
||||||
const NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon;
|
const NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon;
|
||||||
const int n = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
const int n = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
|
||||||
|
|
||||||
|
int max_allowed_mcs = (mcs_table == 1) ? 27 : 28;
|
||||||
|
int max_mcs = nrmac->dl_max_mcs;
|
||||||
|
if (nrmac->dl_max_mcs>max_allowed_mcs)
|
||||||
|
max_mcs = max_allowed_mcs;
|
||||||
|
|
||||||
NR_DL_bler_stats_t *bler_stats = &nrmac->UE_info.UE_sched_ctrl[UE_id].dl_bler_stats;
|
NR_DL_bler_stats_t *bler_stats = &nrmac->UE_info.UE_sched_ctrl[UE_id].dl_bler_stats;
|
||||||
/* first call: everything is zero. Initialize to sensible default */
|
/* first call: everything is zero. Initialize to sensible default */
|
||||||
if (bler_stats->last_frame_slot == 0 && bler_stats->mcs == 0) {
|
if (bler_stats->last_frame_slot == 0 && bler_stats->mcs == 0) {
|
||||||
@@ -435,7 +440,7 @@ int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t
|
|||||||
if (bler_stats->rd2_bler > nrmac->dl_rd2_bler_threshold && old_mcs > 6) {
|
if (bler_stats->rd2_bler > nrmac->dl_rd2_bler_threshold && old_mcs > 6) {
|
||||||
new_mcs -= 2;
|
new_mcs -= 2;
|
||||||
} else if (bler_stats->rd2_bler < nrmac->dl_rd2_bler_threshold) {*/
|
} else if (bler_stats->rd2_bler < nrmac->dl_rd2_bler_threshold) {*/
|
||||||
if (bler_stats->bler < nrmac->dl_bler_target_lower && old_mcs < nrmac->dl_max_mcs && dtx > 9)
|
if (bler_stats->bler < nrmac->dl_bler_target_lower && old_mcs < max_mcs && dtx > 9)
|
||||||
new_mcs += 1;
|
new_mcs += 1;
|
||||||
else if (bler_stats->bler > nrmac->dl_bler_target_upper && old_mcs > 6)
|
else if (bler_stats->bler > nrmac->dl_bler_target_upper && old_mcs > 6)
|
||||||
new_mcs -= 1;
|
new_mcs -= 1;
|
||||||
@@ -699,7 +704,7 @@ void pf_dl(module_id_t module_id,
|
|||||||
|
|
||||||
/* Calculate coeff */
|
/* Calculate coeff */
|
||||||
ps->nrOfLayers = 1;
|
ps->nrOfLayers = 1;
|
||||||
sched_pdsch->mcs = get_mcs_from_bler(module_id, /* CC_id = */ 0, frame, slot, UE_id);
|
sched_pdsch->mcs = get_mcs_from_bler(module_id, /* CC_id = */ 0, frame, slot, UE_id, ps->mcs_Table);
|
||||||
uint32_t tbs = pf_tbs[ps->mcsTableIdx][sched_pdsch->mcs];
|
uint32_t tbs = pf_tbs[ps->mcsTableIdx][sched_pdsch->mcs];
|
||||||
coeff_ue[UE_id] = (float) tbs / thr_ue[UE_id];
|
coeff_ue[UE_id] = (float) tbs / thr_ue[UE_id];
|
||||||
LOG_D(NR_MAC,"b %d, thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f\n",
|
LOG_D(NR_MAC,"b %d, thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user