ensure minimum tbs. If it cant do it, increase mcs until it can.

master
Francisco Paisana 5 years ago
parent cccabdaf4f
commit 089f72d573

@ -268,10 +268,8 @@ void ul_harq_proc::new_tx(uint32_t tti_, int mcs, int tbs, ul_harq_proc::ul_allo
void ul_harq_proc::new_retx(uint32_t tb_idx, uint32_t tti_, int* mcs, int* tbs, ul_harq_proc::ul_alloc_t alloc) void ul_harq_proc::new_retx(uint32_t tb_idx, uint32_t tti_, int* mcs, int* tbs, ul_harq_proc::ul_alloc_t alloc)
{ {
if (alloc.L != allocation.L or alloc.RB_start != allocation.RB_start) { is_adaptive = alloc.L != allocation.L or alloc.RB_start != allocation.RB_start;
is_adaptive = true; allocation = alloc;
}
allocation = alloc;
new_retx_common(tb_idx, tti_, mcs, tbs); new_retx_common(tb_idx, tti_, mcs, tbs);
} }

@ -395,11 +395,17 @@ int sched_ue::generate_format1(dl_harq_proc* h,
mcs = mcs0; mcs = mcs0;
} }
// Ensure tbs >= MIN_DATA_TBS
while (tbs < MIN_DATA_TBS and mcs != carriers[cc_idx].max_mcs_dl) {
mcs++;
tbs = srslte_ra_tbs_from_idx(srslte_ra_tbs_idx_from_mcs(mcs, false), nof_prb) / 8;
}
if (tbs < MIN_DATA_TBS) { if (tbs < MIN_DATA_TBS) {
log_h->warning("SCHED: Allocation of TBS=%d that does not account header\n", tbs); log_h->warning("SCHED: Allocation of TBS=%d that does not account header\n", tbs);
return 0; return 0;
} }
// Allocate DL Harq
h->new_tx(user_mask, 0, tti_tx_dl, mcs, tbs, data->dci.location.ncce); h->new_tx(user_mask, 0, tti_tx_dl, mcs, tbs, data->dci.location.ncce);
int rem_tbs = tbs; int rem_tbs = tbs;
@ -420,6 +426,7 @@ int sched_ue::generate_format1(dl_harq_proc* h,
rem_tbs -= 2; rem_tbs -= 2;
} }
// Allocate PDUs
do { do {
x = alloc_pdu(rem_tbs, &data->pdu[0][data->nof_pdu_elems[0]]); x = alloc_pdu(rem_tbs, &data->pdu[0][data->nof_pdu_elems[0]]);
if (x) { if (x) {

Loading…
Cancel
Save