fix MCS assignment for 6 PRBs

- cherry-picked and resolved conflicts from 0960ef5c6dcd2f9b96169b3f4c266197b922c46e
master
Francisco Paisana 6 years ago committed by Andre Puschmann
parent bbfd09b62e
commit d234f4a614

@ -677,6 +677,11 @@ int sched::dl_sched_rar(dl_sched_rar_t rar[MAX_RAR_LIST])
// Schedules data to users // Schedules data to users
int sched::dl_sched_data(dl_sched_data_t data[MAX_DATA_LIST]) int sched::dl_sched_data(dl_sched_data_t data[MAX_DATA_LIST])
{ {
// NOTE: In case of 6 PRBs, do not transmit if there is going to be a PRACH in the UL to avoid collisions
if (cfg.cell.nof_prb<10 and srslte_prach_tti_opportunity_config(cfg.prach_config, current_tti+4, -1)) {
start_rbg = avail_rbg;
}
uint32_t nof_ctrl_symbols = (cfg.cell.nof_prb<10)?(current_cfi+1):current_cfi; uint32_t nof_ctrl_symbols = (cfg.cell.nof_prb<10)?(current_cfi+1):current_cfi;
dl_metric->new_tti(ue_db, start_rbg, avail_rbg, nof_ctrl_symbols, current_tti); dl_metric->new_tti(ue_db, start_rbg, avail_rbg, nof_ctrl_symbols, current_tti);

@ -498,7 +498,10 @@ int sched_ue::generate_format1(dl_harq_proc *h,
srslte_ra_dl_dci_to_grant_prb_allocation(dci, &grant, cell.nof_prb); srslte_ra_dl_dci_to_grant_prb_allocation(dci, &grant, cell.nof_prb);
uint32_t nof_ctrl_symbols = cfi+(cell.nof_prb<10?1:0); uint32_t nof_ctrl_symbols = cfi+(cell.nof_prb<10?1:0);
uint32_t nof_re = srslte_ra_dl_grant_nof_re(&grant, cell, sf_idx, nof_ctrl_symbols); uint32_t nof_re = srslte_ra_dl_grant_nof_re(&grant, cell, sf_idx, nof_ctrl_symbols);
if (fixed_mcs_dl < 0) { if(need_conres_ce and cell.nof_prb<10) { // SRB0 Tx. Use a higher MCS for the PRACH to fit in 6 PRBs
tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(4), nof_prb)/8;
mcs = 4;
} else if (fixed_mcs_dl < 0) {
tbs = alloc_tbs_dl(nof_prb, nof_re, req_bytes, &mcs); tbs = alloc_tbs_dl(nof_prb, nof_re, req_bytes, &mcs);
} else { } else {
tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(fixed_mcs_dl), nof_prb)/8; tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(fixed_mcs_dl), nof_prb)/8;
@ -1221,6 +1224,7 @@ int sched_ue::alloc_tbs(uint32_t nof_prb,
// Avoid the unusual case n_prb=1, mcs=6 tbs=328 (used in voip) // Avoid the unusual case n_prb=1, mcs=6 tbs=328 (used in voip)
if (nof_prb == 1 && sel_mcs == 6) { if (nof_prb == 1 && sel_mcs == 6) {
sel_mcs--; sel_mcs--;
tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(sel_mcs), nof_prb)/8;
} }
if (mcs && tbs >= 0) { if (mcs && tbs >= 0) {

Loading…
Cancel
Save