Commit 1b97cdaf authored by Thomas Schlichter's avatar Thomas Schlichter Committed by francescomani

improve LLR scaling for better performance

parent 4b679c07
......@@ -1684,12 +1684,10 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB,
for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++)
avgs = cmax(avgs, avg[nl * frame_parms->nb_antennas_rx + aarx]);
pusch_vars->log2_maxh = (log2_approx(avgs) >> 1);
if (rel15_ul->nrOfLayers == 2 && rel15_ul->qam_mod_order >= 6)
pusch_vars->log2_maxh = (log2_approx(avgs) >> 1) - 3; // for MMSE
else if (rel15_ul->nrOfLayers == 1)
pusch_vars->log2_maxh = (log2_approx(avgs) >> 1) + 1 + log2_approx(frame_parms->nb_antennas_rx >> 2);
else
pusch_vars->log2_maxh = (log2_approx(avgs) >> 1) + 1 + log2_approx(frame_parms->nb_antennas_rx >> 1);
if (pusch_vars->log2_maxh < 0)
pusch_vars->log2_maxh = 0;
......
......@@ -46,8 +46,8 @@ void nr_qpsk_llr(int32_t *rxdataF_comp, int16_t *llr, uint32_t nb_re)
c16_t *rxF = (c16_t *)rxdataF_comp;
c16_t *llr32 = (c16_t *)llr;
for (int i = 0; i < nb_re; i++) {
llr32[i].r = rxF[i].r >> 3;
llr32[i].i = rxF[i].i >> 3;
llr32[i].r = rxF[i].r >> 4;
llr32[i].i = rxF[i].i >> 4;
}
}
......
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