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

improve LLR scaling for better performance

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