Commit 7918fc5b authored by Robert Schmidt's avatar Robert Schmidt

Calculate TBS for coefficient only when needed

parent b4eb44d2
...@@ -603,16 +603,6 @@ void pf_ul(module_id_t module_id, ...@@ -603,16 +603,6 @@ void pf_ul(module_id_t module_id,
sched_pusch->Qm <<= 1; sched_pusch->Qm <<= 1;
} }
uint32_t tbs = nr_compute_tbs(sched_pusch->Qm,
sched_pusch->R,
1, // rbSize
ps->nrOfSymbols,
ps->N_PRB_DMRS * ps->num_dmrs_symb,
0, // nb_rb_oh
0,
1 /* NrOfLayers */)
>> 3;
/* Check BSR */ /* Check BSR */
if (sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes <= 0) { if (sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes <= 0) {
/* if no data, pre-allocate 5RB */ /* if no data, pre-allocate 5RB */
...@@ -646,6 +636,15 @@ void pf_ul(module_id_t module_id, ...@@ -646,6 +636,15 @@ void pf_ul(module_id_t module_id,
add_tail_nr_list(&UE_sched, UE_id); add_tail_nr_list(&UE_sched, UE_id);
/* Calculate coefficient*/ /* Calculate coefficient*/
const uint32_t tbs = nr_compute_tbs(sched_pusch->Qm,
sched_pusch->R,
1, // rbSize
ps->nrOfSymbols,
ps->N_PRB_DMRS * ps->num_dmrs_symb,
0, // nb_rb_oh
0,
1 /* NrOfLayers */)
>> 3;
coeff_ue[UE_id] = (float) tbs / ul_thr_ue[UE_id]; coeff_ue[UE_id] = (float) tbs / ul_thr_ue[UE_id];
LOG_D(MAC,"b %d, ul_thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f\n", LOG_D(MAC,"b %d, ul_thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f\n",
b, UE_id, ul_thr_ue[UE_id], tbs, UE_id, coeff_ue[UE_id]); b, UE_id, ul_thr_ue[UE_id], tbs, UE_id, coeff_ue[UE_id]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment