updated scheduler ue mcs computation to account for new 256QAM tables

This commit is contained in:
Francisco Paisana 2020-10-20 16:14:15 +01:00 committed by Xavier Arteaga
parent 461f34785d
commit 4cb6ed27eb
3 changed files with 26 additions and 8 deletions

View File

@ -161,6 +161,6 @@ SRSLTE_API int srslte_cqi_hl_get_no_subbands(int nof_prb);
SRSLTE_API uint8_t srslte_cqi_from_snr(float snr);
SRSLTE_API float srslte_cqi_to_coderate(uint32_t cqi);
SRSLTE_API float srslte_cqi_to_coderate(uint32_t cqi, bool use_alt_table);
#endif // SRSLTE_CQI_H

View File

@ -537,7 +537,7 @@ bool srslte_cqi_periodic_send(const srslte_cqi_report_cfg_t* cfg, uint32_t tti,
return cfg->periodic_configured && cqi_send(cfg->pmi_idx, tti, frame_type == SRSLTE_FDD);
}
// CQI-to-Spectral Efficiency: 36.213 Table 7.2.3-1 */
// CQI-to-Spectral Efficiency: 36.213 Table 7.2.3-1
static float cqi_to_coderate[16] = {0,
0.1523,
0.2344,
@ -555,10 +555,28 @@ static float cqi_to_coderate[16] = {0,
5.1152,
5.5547};
float srslte_cqi_to_coderate(uint32_t cqi)
// CQI-to-Spectral Efficiency: 36.213 Table 7.2.3-2
static float cqi_to_coderate_table2[16] = {0,
0.1523,
0.3770,
0.8770,
1.4766,
1.9141,
2.4063,
2.7305,
3.3223,
3.9023,
4.5234,
5.1152,
5.5547,
6.2266,
6.9141,
7.4063};
float srslte_cqi_to_coderate(uint32_t cqi, bool use_alt_table)
{
if (cqi < 16) {
return cqi_to_coderate[cqi];
return use_alt_table ? cqi_to_coderate_table2[cqi] : cqi_to_coderate[cqi];
} else {
return 0;
}

View File

@ -1208,10 +1208,10 @@ int cc_sched_ue::cqi_to_tbs(uint32_t nof_prb, uint32_t nof_re, bool use_tbs_inde
uint32_t cqi = is_ul ? ul_cqi : dl_cqi;
uint32_t max_mcs = is_ul ? max_mcs_ul : (cfg->use_tbs_index_alt) ? max_mcs_dl_alt : max_mcs_dl;
uint32_t max_Qm = is_ul and not ul_64qam_enabled ? 4 : 6; //< TODO: Allow PUSCH 64QAM
uint32_t max_Qm = is_ul and not ul_64qam_enabled ? 4 : (not is_ul and use_tbs_index_alt ? 8 : 6);
// Take the upper bound code-rate
float max_coderate = srslte_cqi_to_coderate(cqi < 15 ? cqi + 1 : 15);
float max_coderate = srslte_cqi_to_coderate(std::min(cqi + 1u, 15u), use_tbs_index_alt);
int sel_mcs = max_mcs + 1;
float coderate = 99;
int tbs = 0;
@ -1345,7 +1345,7 @@ void cc_sched_ue::finish_tti(srslte::tti_point tti_rx)
uint32_t cc_sched_ue::get_aggr_level(uint32_t nof_bits)
{
uint32_t l = 0;
float max_coderate = srslte_cqi_to_coderate(dl_cqi);
float max_coderate = srslte_cqi_to_coderate(dl_cqi, cfg->use_tbs_index_alt);
float coderate = 99;
float factor = 1.5;
uint32_t l_max = 3;
@ -1382,7 +1382,7 @@ int cc_sched_ue::alloc_tbs(uint32_t nof_prb, uint32_t nof_re, uint32_t req_bytes
int req_tbs_idx = srslte_ra_tbs_to_table_idx(req_bytes * 8, nof_prb);
int req_mcs = srslte_ra_mcs_from_tbs_idx(req_tbs_idx, cfg->use_tbs_index_alt, is_ul);
if (req_mcs < (int)sel_mcs) {
if (req_mcs >= 0 and req_mcs < (int)sel_mcs) {
sel_mcs = req_mcs;
tbs_bytes = srslte_ra_tbs_from_idx(req_tbs_idx, nof_prb) / 8;
}