fix coderate derivation in PDCCH based on aggregation level

master
Francisco 4 years ago committed by Andre Puschmann
parent a587d20252
commit 0dafe4dd58

@ -36,7 +36,8 @@
float srsran_pdcch_coderate(uint32_t nof_bits, uint32_t l)
{
return (float)(nof_bits + 16) / (4 * PDCCH_FORMAT_NOF_REGS(l));
static const int nof_bits_x_symbol = 2; //QPSK
return (float)(nof_bits + 16) / (nof_bits_x_symbol * PDCCH_FORMAT_NOF_REGS(l));
}
/** Initializes the PDCCH transmitter and receiver */

@ -396,18 +396,14 @@ uint32_t get_aggr_level(uint32_t nof_bits,
factor = 1.0;
l_max = 2;
}
l_max = SRSRAN_MIN(max_aggr_lvl, l_max);
l_max = std::min(max_aggr_lvl, l_max);
uint32_t l = min_aggr_lvl;
float coderate = 0;
for (; l <= l_max; ++l) {
uint32_t l = std::min(min_aggr_lvl, l_max);
float coderate = srsran_pdcch_coderate(nof_bits, l);
while (factor * coderate > max_coderate and l < l_max) {
l++;
coderate = srsran_pdcch_coderate(nof_bits, l);
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,

Loading…
Cancel
Save