bugfix, sched: fix aggregation level derivation to avoid L > 3

master
Francisco 4 years ago committed by Ismael Gomez
parent dedd9c09a7
commit a8cccd7a10

@ -400,10 +400,14 @@ uint32_t get_aggr_level(uint32_t nof_bits,
l_max = SRSRAN_MIN(max_aggr_lvl, l_max);
uint32_t l = min_aggr_lvl;
do {
for (; l <= l_max; ++l) {
coderate = srsran_pdcch_coderate(nof_bits, l);
l++;
} while (l < l_max && factor * coderate > max_coderate);
if (factor * coderate > max_coderate) {
break;
}
}
// make aggregation level more conservative
l = std::min(l_max, l + 1);
Debug("SCHED: CQI=%d, l=%d, nof_bits=%d, coderate=%.2f, max_coderate=%.2f",
dl_cqi,

@ -217,7 +217,7 @@ int test_pdcch_collisions(const sf_output_res_t& sf_out,
// Helper Function: checks if there is any collision. If not, fills the PDCCH mask
auto try_cce_fill = [&](const srsran_dci_location_t& dci_loc, const char* ch) {
uint32_t cce_start = dci_loc.ncce, cce_stop = dci_loc.ncce + (1u << dci_loc.L);
CONDERROR(dci_loc.L == 0, "The aggregation level %d is not valid", dci_loc.L);
CONDERROR(dci_loc.L > 3, "The aggregation level %d is not valid", dci_loc.L);
CONDERROR(
cce_start >= ncce or cce_stop > ncce, "The CCE positions (%u, %u) do not fit in PDCCH", cce_start, cce_stop);
CONDERROR(

@ -294,6 +294,7 @@ sched_sim_events rand_sim_params(uint32_t nof_ttis)
boolean_dist() ? -1 : std::uniform_int_distribution<>{0, 24}(srsenb::get_rand_gen());
sim_gen.sim_args.sched_args.pusch_mcs =
boolean_dist() ? -1 : std::uniform_int_distribution<>{0, 24}(srsenb::get_rand_gen());
sim_gen.sim_args.sched_args.min_aggr_level = std::uniform_int_distribution<>{0, 3}(srsenb::get_rand_gen());
generator.tti_events.resize(nof_ttis);

Loading…
Cancel
Save