Commit 8a7a7937 authored by Thomas Schlichter's avatar Thomas Schlichter

5G NR: change PUSCH and PDSCH channel levelling for higher accuracy

parent da799243
...@@ -1272,7 +1272,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, ...@@ -1272,7 +1272,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
for (aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++) for (aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++)
avgs = cmax(avgs,avg[(aatx<<1)+aarx]); avgs = cmax(avgs,avg[(aatx<<1)+aarx]);
gNB->pusch_vars[ulsch_id]->log2_maxh = (log2_approx(avgs)/2)+3; gNB->pusch_vars[ulsch_id]->log2_maxh = (log2_approx(avgs)/2) + 1;
gNB->pusch_vars[ulsch_id]->cl_done = 1; gNB->pusch_vars[ulsch_id]->cl_done = 1;
} }
......
...@@ -443,8 +443,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -443,8 +443,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
//LOG_I(PHY, "avgs Power per SC is %d\n", avgs); //LOG_I(PHY, "avgs Power per SC is %d\n", avgs);
median[(aatx*frame_parms->nb_antennas_rx)+aarx] = avg[(aatx*frame_parms->nb_antennas_rx)+aarx]; median[(aatx*frame_parms->nb_antennas_rx)+aarx] = avg[(aatx*frame_parms->nb_antennas_rx)+aarx];
} }
pdsch_vars[gNB_id]->log2_maxh = (log2_approx(avgs)/2)+3;
//LOG_I(PHY, "avgs Power per SC is %d lg2_maxh %d\n", avgs, pdsch_vars[gNB_id]->log2_maxh);
if (dlsch0_harq->mimo_mode == NR_DUALSTREAM) { if (dlsch0_harq->mimo_mode == NR_DUALSTREAM) {
nr_dlsch_channel_level_median(pdsch_vars[gNB_id]->dl_ch_estimates_ext, nr_dlsch_channel_level_median(pdsch_vars[gNB_id]->dl_ch_estimates_ext,
...@@ -459,8 +457,10 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -459,8 +457,10 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
avgs = cmax(avgs, median[aatx*n_rx + aarx]); avgs = cmax(avgs, median[aatx*n_rx + aarx]);
} }
} }
pdsch_vars[gNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1;
} }
pdsch_vars[gNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1;
//LOG_I(PHY, "avgs Power per SC is %d lg2_maxh %d\n", avgs, pdsch_vars[gNB_id]->log2_maxh);
} }
LOG_D(PHY,"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n", LOG_D(PHY,"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n",
frame%1024, frame%1024,
......
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