sched: revert lifting of restriction of maximum UL coderate of 0.930

master
Francisco Paisana 3 years ago
parent ce884ee4c6
commit 589239bf7f

@ -94,9 +94,7 @@ tbs_info compute_mcs_and_tbs(uint32_t nof_prb,
assert((is_ul or not ulqam64_enabled) && "DL cannot use UL-QAM64 enable flag"); assert((is_ul or not ulqam64_enabled) && "DL cannot use UL-QAM64 enable flag");
uint32_t max_Qm = (is_ul) ? (ulqam64_enabled ? 6 : 4) : (use_tbs_index_alt ? 8 : 6); uint32_t max_Qm = (is_ul) ? (ulqam64_enabled ? 6 : 4) : (use_tbs_index_alt ? 8 : 6);
if (!is_ul) {
max_coderate = std::min(max_coderate, 0.930F * max_Qm); max_coderate = std::min(max_coderate, 0.930F * max_Qm);
}
int mcs = 0; int mcs = 0;
do { do {
@ -125,9 +123,7 @@ tbs_info compute_mcs_and_tbs(uint32_t nof_prb,
// update max coderate based on mcs // update max coderate based on mcs
srsran_mod_t mod = (is_ul) ? srsran_ra_ul_mod_from_mcs(mcs) : srsran_ra_dl_mod_from_mcs(mcs, use_tbs_index_alt); srsran_mod_t mod = (is_ul) ? srsran_ra_ul_mod_from_mcs(mcs) : srsran_ra_dl_mod_from_mcs(mcs, use_tbs_index_alt);
uint32_t Qm = srsran_mod_bits_x_symbol(mod); uint32_t Qm = srsran_mod_bits_x_symbol(mod);
if (!is_ul) {
max_coderate = std::min(0.930F * Qm, max_coderate); max_coderate = std::min(0.930F * Qm, max_coderate);
}
if (coderate <= max_coderate) { if (coderate <= max_coderate) {
// solution was found // solution was found
@ -155,7 +151,7 @@ tbs_info compute_min_mcs_and_tbs_from_required_bytes(uint32_t nof_prb,
{ {
// get max MCS/TBS that meets max coderate requirements // get max MCS/TBS that meets max coderate requirements
tbs_info tb_max = compute_mcs_and_tbs(nof_prb, nof_re, cqi, max_mcs, is_ul, ulqam64_enabled, use_tbs_index_alt); tbs_info tb_max = compute_mcs_and_tbs(nof_prb, nof_re, cqi, max_mcs, is_ul, ulqam64_enabled, use_tbs_index_alt);
if (tb_max.tbs_bytes + 8 <= (int)req_bytes or tb_max.mcs == 0 or req_bytes <= 0) { if (tb_max.tbs_bytes + 8 <= (int)req_bytes or tb_max.mcs == 0) {
// if mcs cannot be lowered or a decrease in TBS index won't meet req_bytes requirement // if mcs cannot be lowered or a decrease in TBS index won't meet req_bytes requirement
return tb_max; return tb_max;
} }

@ -302,10 +302,10 @@ void test_ul_mcs_tbs_derivation()
TESTASSERT(compute_tbs_mcs(50, 50 - 5).mcs == 9); TESTASSERT(compute_tbs_mcs(50, 50 - 5).mcs == 9);
cqi = 15; cqi = 15;
TESTASSERT(compute_tbs_mcs(25, 25 - 4).mcs == 28); TESTASSERT(compute_tbs_mcs(25, 25 - 4).mcs == 23);
TESTASSERT(compute_tbs_mcs(50, 50 - 5).mcs == 28); TESTASSERT(compute_tbs_mcs(50, 50 - 5).mcs == 23);
TESTASSERT(compute_tbs_mcs(75, 75 - 5).mcs == 28); TESTASSERT(compute_tbs_mcs(75, 75 - 5).mcs == 24);
TESTASSERT(compute_tbs_mcs(100, 100 - 5).mcs == 28); TESTASSERT(compute_tbs_mcs(100, 100 - 5).mcs == 23);
} }
} // namespace srsenb } // namespace srsenb

Loading…
Cancel
Save