Added support for nushift
This commit is contained in:
@@ -41,7 +41,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
unsigned char aarx;
|
unsigned char aarx;
|
||||||
unsigned short k;
|
unsigned short k;
|
||||||
unsigned int pilot_cnt;
|
unsigned int pilot_cnt;
|
||||||
int16_t ch[2],*pil,*rxF,*ul_ch,*fl,*fm,*fr,*fml,*fmr,*fmm;
|
int16_t ch[2],*pil,*rxF,*ul_ch;
|
||||||
|
int16_t *fl,*fm,*fr,*fml,*fmr,*fmm,*fdcl,*fdcr,*fdclh,*fdcrh;
|
||||||
int ch_offset,symbol_offset, length_dmrs, UE_id = 0;
|
int ch_offset,symbol_offset, length_dmrs, UE_id = 0;
|
||||||
unsigned short n_idDMRS[2] = {0,1}; //to update from pusch config
|
unsigned short n_idDMRS[2] = {0,1}; //to update from pusch config
|
||||||
int32_t temp_in_ifft_0[8192*2] __attribute__((aligned(16)));
|
int32_t temp_in_ifft_0[8192*2] __attribute__((aligned(16)));
|
||||||
@@ -82,6 +83,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
fmm = filt8_mm0;
|
fmm = filt8_mm0;
|
||||||
fml = filt8_m0;
|
fml = filt8_m0;
|
||||||
fmr = filt8_mr0;
|
fmr = filt8_mr0;
|
||||||
|
fdcl = filt8_dcl0;
|
||||||
|
fdcr = filt8_dcr0;
|
||||||
|
fdclh = filt8_dcl0_h;
|
||||||
|
fdcrh = filt8_dcr0_h;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
@@ -91,6 +96,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
fmm = filt8_mm1;
|
fmm = filt8_mm1;
|
||||||
fml = filt8_ml1;
|
fml = filt8_ml1;
|
||||||
fmr = filt8_m1;
|
fmr = filt8_m1;
|
||||||
|
fdcl = filt8_dcl1;
|
||||||
|
fdcr = filt8_dcr1;
|
||||||
|
fdclh = filt8_dcl1_h;
|
||||||
|
fdcrh = filt8_dcr1_h;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -275,7 +284,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
// for proper allignment of SIMD vectors
|
// for proper allignment of SIMD vectors
|
||||||
if((gNB->frame_parms.N_RB_UL&1)==0) {
|
if((gNB->frame_parms.N_RB_UL&1)==0) {
|
||||||
|
|
||||||
multadd_real_vector_complex_scalar(filt8_dcl,
|
multadd_real_vector_complex_scalar(fdcl,
|
||||||
ch,
|
ch,
|
||||||
ul_ch-4,
|
ul_ch-4,
|
||||||
8);
|
8);
|
||||||
@@ -286,13 +295,13 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
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_dcr,
|
multadd_real_vector_complex_scalar(fdcr,
|
||||||
ch,
|
ch,
|
||||||
ul_ch-4,
|
ul_ch-4,
|
||||||
8);
|
8);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
multadd_real_vector_complex_scalar(filt8_dcl_h,
|
multadd_real_vector_complex_scalar(fdclh,
|
||||||
ch,
|
ch,
|
||||||
ul_ch,
|
ul_ch,
|
||||||
8);
|
8);
|
||||||
@@ -303,7 +312,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
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_dcr_h,
|
multadd_real_vector_complex_scalar(fdcrh,
|
||||||
ch,
|
ch,
|
||||||
ul_ch,
|
ul_ch,
|
||||||
8);
|
8);
|
||||||
|
|||||||
@@ -135,16 +135,16 @@ short filt8_dcmc[8]= {
|
|||||||
short filt8_dcmd[8]= {
|
short filt8_dcmd[8]= {
|
||||||
0,0,0,4096,4096,8192,12288,16384};
|
0,0,0,4096,4096,8192,12288,16384};
|
||||||
|
|
||||||
short filt8_dcl[8]= {
|
short filt8_dcl0[8]= {
|
||||||
0,0,16384,12288,8192,4096,0,0};
|
0,0,16384,12288,8192,4096,0,0};
|
||||||
|
|
||||||
short filt8_dcr[8]= {
|
short filt8_dcr0[8]= {
|
||||||
0,0,0,4096,8192,12288,16384,0};
|
0,0,0,4096,8192,12288,16384,0};
|
||||||
|
|
||||||
short filt8_dcl_h[8]= {
|
short filt8_dcl0_h[8]= {
|
||||||
16384,12288,8192,4096,0,0,0,0};
|
16384,12288,8192,4096,0,0,0,0};
|
||||||
|
|
||||||
short filt8_dcr_h[8]= {
|
short filt8_dcr0_h[8]= {
|
||||||
0,4096,8192,12288,16384,0,0,0};
|
0,4096,8192,12288,16384,0,0,0};
|
||||||
|
|
||||||
short filt8_l1[8] = {
|
short filt8_l1[8] = {
|
||||||
@@ -161,3 +161,15 @@ short filt8_m1[8] = {
|
|||||||
|
|
||||||
short filt8_mm1[8]= {
|
short filt8_mm1[8]= {
|
||||||
0,0,0,0,8192,16384,8192,0};
|
0,0,0,0,8192,16384,8192,0};
|
||||||
|
|
||||||
|
short filt8_dcl1[8]= {
|
||||||
|
0,0,0,16384,12288,8192,4096,0};
|
||||||
|
|
||||||
|
short filt8_dcr1[8]= {
|
||||||
|
0,0,0,0,4096,8192,12288,16384};
|
||||||
|
|
||||||
|
short filt8_dcl1_h[8]= {
|
||||||
|
0,16384,12288,8192,4096,0,0,0};
|
||||||
|
|
||||||
|
short filt8_dcr1_h[8]= {
|
||||||
|
0,0,4096,8192,12288,16384,0,0};
|
||||||
|
|||||||
@@ -99,13 +99,13 @@ extern short filt8_dcmc[8];
|
|||||||
|
|
||||||
extern short filt8_dcmd[8];
|
extern short filt8_dcmd[8];
|
||||||
|
|
||||||
extern short filt8_dcl[8];
|
extern short filt8_dcl0[8];
|
||||||
|
|
||||||
extern short filt8_dcr[8];
|
extern short filt8_dcr0[8];
|
||||||
|
|
||||||
extern short filt8_dcl_h[8];
|
extern short filt8_dcl0_h[8];
|
||||||
|
|
||||||
extern short filt8_dcr_h[8];
|
extern short filt8_dcr0_h[8];
|
||||||
|
|
||||||
extern short filt8_l1[8];
|
extern short filt8_l1[8];
|
||||||
|
|
||||||
@@ -117,4 +117,11 @@ extern short filt8_m1[8];
|
|||||||
|
|
||||||
extern short filt8_mm1[8];
|
extern short filt8_mm1[8];
|
||||||
|
|
||||||
|
extern short filt8_dcl1[8];
|
||||||
|
|
||||||
|
extern short filt8_dcr1[8];
|
||||||
|
|
||||||
|
extern short filt8_dcl1_h[8];
|
||||||
|
|
||||||
|
extern short filt8_dcr1_h[8];
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -656,7 +656,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
unsigned char aarx;
|
unsigned char aarx;
|
||||||
unsigned short k;
|
unsigned short k;
|
||||||
unsigned int pilot_cnt;
|
unsigned int pilot_cnt;
|
||||||
int16_t ch[2],*pil,*rxF,*dl_ch,*fl,*fm,*fr,*fml,*fmr,*fmm;
|
int16_t ch[2],*pil,*rxF,*dl_ch;
|
||||||
|
int16_t *fl,*fm,*fr,*fml,*fmr,*fmm,*fdcl,*fdcr,*fdclh,*fdcrh;
|
||||||
int ch_offset,symbol_offset;
|
int ch_offset,symbol_offset;
|
||||||
|
|
||||||
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
|
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
|
||||||
@@ -691,6 +692,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
fmm = filt8_mm0;
|
fmm = filt8_mm0;
|
||||||
fml = filt8_m0;
|
fml = filt8_m0;
|
||||||
fmr = filt8_mr0;
|
fmr = filt8_mr0;
|
||||||
|
fdcl = filt8_dcl0;
|
||||||
|
fdcr = filt8_dcr0;
|
||||||
|
fdclh = filt8_dcl0_h;
|
||||||
|
fdcrh = filt8_dcr0_h;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
@@ -700,6 +705,10 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
fmm = filt8_mm1;
|
fmm = filt8_mm1;
|
||||||
fml = filt8_ml1;
|
fml = filt8_ml1;
|
||||||
fmr = filt8_m1;
|
fmr = filt8_m1;
|
||||||
|
fdcl = filt8_dcl1;
|
||||||
|
fdcr = filt8_dcr1;
|
||||||
|
fdclh = filt8_dcl1_h;
|
||||||
|
fdcrh = filt8_dcr1_h;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -882,7 +891,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
// for proper allignment of SIMD vectors
|
// for proper allignment of SIMD vectors
|
||||||
if((ue->frame_parms.N_RB_DL&1)==0) {
|
if((ue->frame_parms.N_RB_DL&1)==0) {
|
||||||
|
|
||||||
multadd_real_vector_complex_scalar(filt8_dcl,
|
multadd_real_vector_complex_scalar(fdcl,
|
||||||
ch,
|
ch,
|
||||||
dl_ch-4,
|
dl_ch-4,
|
||||||
8);
|
8);
|
||||||
@@ -893,13 +902,13 @@ 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_dcr,
|
multadd_real_vector_complex_scalar(fdcr,
|
||||||
ch,
|
ch,
|
||||||
dl_ch-4,
|
dl_ch-4,
|
||||||
8);
|
8);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
multadd_real_vector_complex_scalar(filt8_dcl_h,
|
multadd_real_vector_complex_scalar(fdclh,
|
||||||
ch,
|
ch,
|
||||||
dl_ch,
|
dl_ch,
|
||||||
8);
|
8);
|
||||||
@@ -910,7 +919,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_dcr_h,
|
multadd_real_vector_complex_scalar(fdcrh,
|
||||||
ch,
|
ch,
|
||||||
dl_ch,
|
dl_ch,
|
||||||
8);
|
8);
|
||||||
|
|||||||
Reference in New Issue
Block a user