Commit 47148e3f authored by Thomas Schlichter's avatar Thomas Schlichter

add NO_INTERP to nr_pdsch_channel_estimation() as it is in nr_pusch_channel_estimation()

parent 4a900910
......@@ -803,6 +803,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch[0] = ch_0 / 4;
ch[1] = ch_1 / 4;
#if NO_INTERP
for (int i=0;i<12;i++) ((int32_t*)ul_ch)[i] = *(int32_t*)ch;
ul_ch+=24;
#else
multadd_real_vector_complex_scalar(filt8_avlip0,
ch,
ul_ch,
......@@ -820,6 +824,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ul_ch,
8);
ul_ch -= 24;
#endif
for (pilot_cnt=4; pilot_cnt<4*(nb_rb_pusch-1); pilot_cnt += 4) {
......@@ -854,6 +859,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch[0] = ch_0 / 4;
ch[1] = ch_1 / 4;
#if NO_INTERP
for (int i=0;i<12;i++) ((int32_t*)ul_ch)[i] = *(int32_t*)ch;
ul_ch+=24;
#else
ul_ch[6] += (ch[0] * 1365)>>15; // 1/12*16384
ul_ch[7] += (ch[1] * 1365)>>15; // 1/12*16384
......@@ -875,6 +884,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ul_ch,
8);
ul_ch -= 16;
#endif
}
// Last PRB
ch_0 = ((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15;
......@@ -908,6 +918,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch[0] = ch_0 / 4;
ch[1] = ch_1 / 4;
#if NO_INTERP
for (int i=0;i<12;i++) ((int32_t*)ul_ch)[i] = *(int32_t*)ch;
ul_ch+=24;
#else
ul_ch[6] += (ch[0] * 1365)>>15; // 1/12*16384
ul_ch[7] += (ch[1] * 1365)>>15; // 1/12*16384
......@@ -922,6 +936,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch,
ul_ch,
8);
#endif
}
#ifdef DEBUG_PUSCH
ul_ch = (int16_t *)&ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset];
......
......@@ -33,6 +33,7 @@
//#define DEBUG_PDSCH
//#define DEBUG_PDCCH
#define NO_INTERP 1
int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t *proc,
......@@ -690,7 +691,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
k = bwp_start_subcarrier;
int re_offset = k;
#ifdef DEBUG_CH
#ifdef DEBUG_PDSCH
printf("PDSCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, symbol_offset %d OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ch_offset,symbol_offset,ue->frame_parms.ofdm_symbol_size,
ue->frame_parms.Ncp,Ns,k, symbol);
#endif
......@@ -1243,6 +1244,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch[0] = ch_0 / 6;
ch[1] = ch_1 / 6;
#if NO_INTERP
for (int i=0;i<12;i++) ((int32_t*)dl_ch)[i] = *(int32_t*)ch;
dl_ch+=24;
#else
multadd_real_vector_complex_scalar(filt8_avlip0,
ch,
dl_ch,
......@@ -1260,6 +1265,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch,
8);
dl_ch -= 24;
#endif
for (pilot_cnt=6; pilot_cnt<6*(nb_rb_pdsch-1); pilot_cnt += 6) {
......@@ -1307,6 +1313,11 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch[0] = ch_0 / 6;
ch[1] = ch_1 / 6;
#if NO_INTERP
for (int i=0;i<12;i++) ((int32_t*)dl_ch)[i] = *(int32_t*)ch;
dl_ch+=24;
#else
dl_ch[6] += (ch[0] * 1365)>>15; // 1/12*16384
dl_ch[7] += (ch[1] * 1365)>>15; // 1/12*16384
......@@ -1328,6 +1339,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch,
8);
dl_ch -= 16;
#endif
}
ch_0 = ((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15;
ch_1 = ((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15;
......@@ -1374,6 +1386,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch[0] = ch_0 / 6;
ch[1] = ch_1 / 6;
#if NO_INTERP
for (int i=0;i<12;i++) ((int32_t*)dl_ch)[i] = *(int32_t*)ch;
dl_ch+=24;
#else
dl_ch[6] += (ch[0] * 1365)>>15; // 1/12*16384
dl_ch[7] += (ch[1] * 1365)>>15; // 1/12*16384
......@@ -1388,6 +1404,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch,
dl_ch,
8);
#endif
}
else { // this is case without frequency-domain linear interpolation, just take average of LS channel estimates of 4 DMRS REs and use a common value for the whole PRB
int32_t ch_0, ch_1;
......@@ -1423,6 +1440,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch[0] = ch_0 / 4;
ch[1] = ch_1 / 4;
#if NO_INTERP
for (int i=0;i<12;i++) ((int32_t*)dl_ch)[i] = *(int32_t*)ch;
dl_ch+=24;
#else
multadd_real_vector_complex_scalar(filt8_avlip0,
ch,
dl_ch,
......@@ -1440,6 +1461,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch,
8);
dl_ch -= 24;
#endif
for (pilot_cnt=4; pilot_cnt<4*(nb_rb_pdsch-1); pilot_cnt += 4) {
int32_t ch_0, ch_1;
......@@ -1475,6 +1497,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch[0] = ch_0 / 4;
ch[1] = ch_1 / 4;
#if NO_INTERP
for (int i=0;i<12;i++) ((int32_t*)dl_ch)[i] = *(int32_t*)ch;
dl_ch+=24;
#else
dl_ch[6] += (ch[0] * 1365)>>15; // 1/12*16384
dl_ch[7] += (ch[1] * 1365)>>15; // 1/12*16384
......@@ -1496,6 +1522,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch,
8);
dl_ch -= 16;
#endif
}
ch_0 = ((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15;
......@@ -1529,6 +1556,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch[0] = ch_0 / 4;
ch[1] = ch_1 / 4;
#if NO_INTERP
for (int i=0;i<12;i++) ((int32_t*)dl_ch)[i] = *(int32_t*)ch;
dl_ch+=24;
#else
dl_ch[6] += (ch[0] * 1365)>>15; // 1/12*16384
dl_ch[7] += (ch[1] * 1365)>>15; // 1/12*16384
......@@ -1543,6 +1574,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch,
dl_ch,
8);
#endif
}
#ifdef DEBUG_PDSCH
dl_ch = (int16_t *)&dl_ch_estimates[p*ue->frame_parms.nb_antennas_rx+aarx][ch_offset];
......
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