diff --git a/srsenb/src/mac/scheduler.cc b/srsenb/src/mac/scheduler.cc index f8f8fdc37..e2ca881bd 100644 --- a/srsenb/src/mac/scheduler.cc +++ b/srsenb/src/mac/scheduler.cc @@ -677,7 +677,12 @@ int sched::dl_sched_rar(dl_sched_rar_t rar[MAX_RAR_LIST]) // Schedules data to users int sched::dl_sched_data(dl_sched_data_t data[MAX_DATA_LIST]) { - uint32_t nof_ctrl_symbols = (cfg.cell.nof_prb<10)?(current_cfi+1):current_cfi; + // 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; dl_metric->new_tti(ue_db, start_rbg, avail_rbg, nof_ctrl_symbols, current_tti); int nof_data_elems = 0; diff --git a/srsenb/src/mac/scheduler_ue.cc b/srsenb/src/mac/scheduler_ue.cc index c4cc38e48..f985b2fde 100644 --- a/srsenb/src/mac/scheduler_ue.cc +++ b/srsenb/src/mac/scheduler_ue.cc @@ -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); 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); - 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); } else { 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) if (nof_prb == 1 && sel_mcs == 6) { sel_mcs--; + tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(sel_mcs), nof_prb)/8; } if (mcs && tbs >= 0) {