Commit b218f55a authored by francescomani's avatar francescomani

setting max mcs to the one reported by CSI

parent 83e20347
...@@ -701,7 +701,7 @@ void pf_dl(module_id_t module_id, ...@@ -701,7 +701,7 @@ void pf_dl(module_id_t module_id,
continue; continue;
/* Calculate coeff */ /* Calculate coeff */
set_dl_mcs(sched_pdsch,sched_ctrl,ps->mcsTableIdx); set_dl_mcs(sched_pdsch,sched_ctrl,&mac->dl_max_mcs,ps->mcsTableIdx);
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);
layers[UE_id] = set_dl_nrOfLayers(sched_ctrl); layers[UE_id] = set_dl_nrOfLayers(sched_ctrl);
const uint8_t Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx); const uint8_t Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
......
...@@ -147,6 +147,7 @@ uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl) { ...@@ -147,6 +147,7 @@ uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl) {
void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch, void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
NR_UE_sched_ctrl_t *sched_ctrl, NR_UE_sched_ctrl_t *sched_ctrl,
uint8_t *target_mcs,
uint8_t mcs_table_idx) { uint8_t mcs_table_idx) {
if (sched_ctrl->set_mcs) { if (sched_ctrl->set_mcs) {
...@@ -180,14 +181,11 @@ void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch, ...@@ -180,14 +181,11 @@ void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
R = nr_get_code_rate_dl(i, mcs_table_idx); R = nr_get_code_rate_dl(i, mcs_table_idx);
Qm = nr_get_Qm_dl(i, mcs_table_idx); Qm = nr_get_Qm_dl(i, mcs_table_idx);
if ((Qm == target_qm) && (target_coderate <= R)) { if ((Qm == target_qm) && (target_coderate <= R)) {
sched_pdsch->mcs = i; *target_mcs = i;
break; break;
} }
} }
} }
else // default value
sched_pdsch->mcs = 9;
sched_ctrl->set_mcs = FALSE; sched_ctrl->set_mcs = FALSE;
} }
} }
......
...@@ -429,6 +429,7 @@ void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps); ...@@ -429,6 +429,7 @@ void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps);
void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch, void set_dl_mcs(NR_sched_pdsch_t *sched_pdsch,
NR_UE_sched_ctrl_t *sched_ctrl, NR_UE_sched_ctrl_t *sched_ctrl,
uint8_t *target_mcs,
uint8_t mcs_table_idx); uint8_t mcs_table_idx);
uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl); uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl);
......
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