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

Fix correlation calculation in nr_dlsch_channel_compensation()

parent 22d2e9a3
...@@ -931,12 +931,12 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, ...@@ -931,12 +931,12 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
for (aatx=0; aatx<nb_aatx; aatx++) { for (aatx=0; aatx<nb_aatx; aatx++) {
dl_ch128 = (__m128i *)&dl_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx+aarx][symbol*nb_rb*12];
for (atx=0; atx<nb_aatx; atx++) { for (atx=0; atx<nb_aatx; atx++) {
avg_rho_re[aarx][aatx*nb_aatx+atx] = 0; avg_rho_re[aarx][aatx*nb_aatx+atx] = 0;
avg_rho_im[aarx][aatx*nb_aatx+atx] = 0; avg_rho_im[aarx][aatx*nb_aatx+atx] = 0;
rho128 = (__m128i *)&rho[aarx][aatx*nb_aatx+atx][symbol*nb_rb*12]; rho128 = (__m128i *)&rho[aarx][aatx*nb_aatx+atx][symbol*nb_rb*12];
dl_ch128 = (__m128i *)&dl_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx+aarx][symbol*nb_rb*12];
dl_ch128_2 = (__m128i *)&dl_ch_estimates_ext[atx*frame_parms->nb_antennas_rx+aarx][symbol*nb_rb*12]; dl_ch128_2 = (__m128i *)&dl_ch_estimates_ext[atx*frame_parms->nb_antennas_rx+aarx][symbol*nb_rb*12];
for (rb=0; rb<nb_rb_0; rb++) { for (rb=0; rb<nb_rb_0; rb++) {
...@@ -1027,6 +1027,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, ...@@ -1027,6 +1027,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
((int16_t*)&rho128[2])[5] + ((int16_t*)&rho128[2])[5] +
((int16_t*)&rho128[2])[7])/16; ((int16_t*)&rho128[2])[7])/16;
dl_ch128+=3;
dl_ch128_2+=3; dl_ch128_2+=3;
rho128+=3; rho128+=3;
} }
...@@ -1036,7 +1037,6 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, ...@@ -1036,7 +1037,6 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
avg_rho_im[aarx][aatx*nb_aatx+atx] = 16*avg_rho_im[aarx][aatx*nb_aatx+atx]/(nb_rb*12); avg_rho_im[aarx][aatx*nb_aatx+atx] = 16*avg_rho_im[aarx][aatx*nb_aatx+atx]/(nb_rb*12);
//printf("rho[rx]%d tx%d tx%d = Re: %d Im: %d\n",aarx, aatx,atx, avg_rho_re[aarx][aatx*nb_aatx+atx], avg_rho_im[aarx][aatx*nb_aatx+atx]); //printf("rho[rx]%d tx%d tx%d = Re: %d Im: %d\n",aarx, aatx,atx, avg_rho_re[aarx][aatx*nb_aatx+atx], avg_rho_im[aarx][aatx*nb_aatx+atx]);
} }
dl_ch128+=3;
} }
} }
} }
......
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