Commit f5b0658a authored by Sakthivel Velumani's avatar Sakthivel Velumani

Improved channel estimates around DC;

ignored only DC pilot
parent ca9b4d7e
...@@ -895,14 +895,14 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -895,14 +895,14 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
pil = (int16_t *)&pilot[rb_offset*((config_type==0) ? 6:4)]; pil = (int16_t *)&pilot[rb_offset*((config_type==0) ? 6:4)];
pil += (idxPil-4); pil += (idxPil-4);
dl_ch += (idxDC-8); dl_ch += (idxDC-8);
dl_ch = memset(dl_ch, 0, sizeof(int16_t)*16); dl_ch = memset(dl_ch, 0, sizeof(int16_t)*14);
re_offset = (re_offset+idxDC/2-4)&(ue->frame_parms.ofdm_symbol_size-1); re_offset = (re_offset+idxDC/2-4)&(ue->frame_parms.ofdm_symbol_size-1);
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)]; rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(filt8_dcma, multadd_real_vector_complex_scalar(fl,
ch, ch,
dl_ch, dl_ch,
8); 8);
...@@ -913,7 +913,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -913,7 +913,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(filt8_dcmb, multadd_real_vector_complex_scalar(filt8_dcl,
ch, ch,
dl_ch, dl_ch,
8); 8);
...@@ -924,11 +924,12 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -924,11 +924,12 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
multadd_real_vector_complex_scalar(filt8_dcmc, multadd_real_vector_complex_scalar(filt8_dcr,
ch, ch,
dl_ch, dl_ch,
8); 8);
/*
pil += 2; pil += 2;
re_offset = (re_offset+2)&(ue->frame_parms.ofdm_symbol_size-1); re_offset = (re_offset+2)&(ue->frame_parms.ofdm_symbol_size-1);
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)]; rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
...@@ -939,9 +940,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -939,9 +940,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
ch, ch,
dl_ch, dl_ch,
8); 8);
*/
} }
//#ifdef DEBUG_PDSCH #ifdef DEBUG_PDSCH
dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset]; dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset];
for(uint16_t idxP=0; idxP<(nb_rb_pdsch*12/8); idxP++) { for(uint16_t idxP=0; idxP<(nb_rb_pdsch*12/8); idxP++) {
for(uint8_t idxI=0; idxI<16; idxI+=2) { for(uint8_t idxI=0; idxI<16; idxI+=2) {
...@@ -949,7 +951,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -949,7 +951,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
} }
printf("\n"); printf("\n");
} }
//#endif #endif
} }
return(0); return(0);
......
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