Commit 5adc20ca authored by Xiwen JIANG's avatar Xiwen JIANG

patch difference of TM7 dev with svn r7530 to git branch

parent bc14704c
......@@ -754,6 +754,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
......
......@@ -5,7 +5,7 @@ linux := $(shell if [ `uname` = "Linux" ] ; then echo "1" ; else echo "0" ; fi)
CFLAGS += -std=gnu99
#CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing
CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing
# Need to force this option because default kernel module builder is wrong
CFLAGS += $(call cc-option,-mpreferred-stack-boundary=4)
......
......@@ -924,9 +924,12 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
pdsch->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->rxdataF_uespec_pilots = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->rxdataF_comp0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->rho = (int32_t**)malloc16_clear( frame_parms->nb_antennas_rx*sizeof(int32_t*) );
pdsch->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_bf_ch_estimates = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_bf_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_ch_mag0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
......@@ -942,8 +945,11 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
const int idx = (j<<1)+i;
const size_t num = 7*2*frame_parms->N_RB_DL*12;
pdsch->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->rxdataF_uespec_pilots[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * frame_parms->N_RB_DL*12);
pdsch->rxdataF_comp0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_bf_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_bf_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*frame_parms->symbols_per_tti*(frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
pdsch->dl_ch_rho_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_ch_rho2_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_ch_mag0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
......@@ -1268,10 +1274,10 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
if (abstraction_flag==0) {
// TX vars
eNB_common_vars->txdata[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) );
eNB_common_vars->txdataF[eNB_id] = (mod_sym_t **)malloc16( frame_parms->nb_antennas_tx*sizeof(mod_sym_t*) );
eNB_common_vars->txdata[eNB_id] = (int32_t**)malloc16(phy_vars_eNB->nb_antennas_tx_phy*sizeof(int32_t*) );
eNB_common_vars->txdataF[eNB_id] = (mod_sym_t **)malloc16(phy_vars_eNB->nb_antennas_tx_phy*sizeof(mod_sym_t*) );
for (i=0; i<frame_parms->nb_antennas_tx; i++) {
for (i=0; i<phy_vars_eNB->nb_antennas_tx_phy; i++) {
#ifdef USER_MODE
eNB_common_vars->txdata[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(int32_t) );
eNB_common_vars->txdataF[eNB_id][i] = (mod_sym_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t) );
......
filter_length = 12;
F = -3/4:1/4:7/4;
F_l = zeros(8,12);
F_r = zeros(8,12);
F_m = zeros(8,12);
F2 =-3/5:1/5:8/5;
for i=0:3
F_l(i+1,:) = floor(16384*[F(8+i:-1:4) zeros(1,7-i)]);
F_r(i+1,:) = floor(16384*[zeros(1,4+i) F(4:end-i)]);
F_m(i+1,:) = floor(16384*[F(4-i:8) F(7:-1:1+i)]);
end
for i=0:1
F_l(i+5,:) = floor(16384*[F(8:-1:4-i) zeros(1,7-i)]);
F_r(i+5,:) = floor(16384*[zeros(1,5+i) F2(5+i) F2(7:end-i)]);
F_m(i+5,:) = floor(16384*[F(4-i:8) F2(8-i) F2(6:-1:1+i)]);
end
for i=2:3
F_l(i+5,:) = floor(16384*[F2(end:-1:7) F2(8-i) zeros(1,5)]);
F_r(i+5,:) = floor(16384*[zeros(1,4+i) F(4:end-i)]);
F_m(i+5,:) = floor(16384*[F2(4-i:6) F2(4+i) F(8:-1:1+i)]);
end
fd = fopen("filt12_32.h","w");
for i=0:3
fprintf(fd,"short filt12_l%d[12] = {\n",i);
fprintf(fd,"%d,",F_l(i+1,1:end-1));
fprintf(fd,"%d};\n\n",F_l(i+1,end));
fprintf(fd,"short filt12_r%d[12] = {\n",i);
fprintf(fd,"%d,",F_r(i+1,1:end-1));
fprintf(fd,"%d};\n\n",F_r(i+1,end));
fprintf(fd,"short filt12_m%d[12] = {\n",i);
fprintf(fd,"%d,",F_m(i+1,1:end-1));
fprintf(fd,"%d};\n\n",F_m(i+1,end));
end
for i=0:3
fprintf(fd,"short filt12_l%d_dc[12] = {\n",i);
fprintf(fd,"%d,",F_l(i+5,1:end-1));
fprintf(fd,"%d};\n\n",F_l(i+5,end));
fprintf(fd,"short filt12_r%d_dc[12] = {\n",i);
fprintf(fd,"%d,",F_r(i+5,1:end-1));
fprintf(fd,"%d};\n\n",F_r(i+5,end));
fprintf(fd,"short filt12_m%d_dc[12] = {\n",i);
fprintf(fd,"%d,",F_m(i+5,1:end-1));
fprintf(fd,"%d};\n\n",F_m(i+5,end));
end
fclose(fd);
......@@ -124,6 +124,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
uint8_t symbol);
int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
module_id_t eNB_id,
uint8_t eNB_offset,
uint8_t Ns,
uint8_t p,
uint8_t symbol);
int lte_dl_msbfn_channel_estimation(PHY_VARS_UE *phy_vars_ue,
module_id_t eNB_id,
uint8_t eNB_offset,
......
short filt12_l0[12] = {
16384,12288,8192,4096,0,0,0,0,0,0,0,0};
short filt12_r0[12] = {
0,0,0,0,0,4096,8192,12288,16384,20480,24576,28672};
short filt12_m0[12] = {
0,4096,8192,12288,16384,12288,8192,4096,0,-4096,-8192,-12288};
short filt12_l1[12] = {
20480,16384,12288,8192,4096,0,0,0,0,0,0,0};
short filt12_r1[12] = {
0,0,0,0,0,0,4096,8192,12288,16384,20480,24576};
short filt12_m1[12] = {
-4096,0,4096,8192,12288,16384,12288,8192,4096,0,-4096,-8192};
short filt12_l2[12] = {
24576,20480,16384,12288,8192,4096,0,0,0,0,0,0};
short filt12_r2[12] = {
0,0,0,0,0,0,0,4096,8192,12288,16384,20480};
short filt12_m2[12] = {
-8192,-4096,0,4096,8192,12288,16384,12288,8192,4096,0,-4096};
short filt12_l3[12] = {
28672,24576,20480,16384,12288,8192,4096,0,0,0,0,0};
short filt12_r3[12] = {
0,0,0,0,0,0,0,0,4096,8192,12288,16384};
short filt12_m3[12] = {
-12288,-8192,-4096,0,4096,8192,12288,16384,12288,8192,4096,0};
short filt12_l0_dc[12] = {
16384,12288,8192,4096,0,0,0,0,0,0,0,0};
short filt12_r0_dc[12] = {
0,0,0,0,0,3276,9830,13107,16384,19660,22937,26214};
short filt12_m0_dc[12] = {
0,4096,8192,12288,16384,13107,6553,3276,0,-3277,-6554,-9831};
short filt12_l1_dc[12] = {
16384,12288,8192,4096,0,-4096,0,0,0,0,0,0};
short filt12_r1_dc[12] = {
0,0,0,0,0,0,6553,9830,13107,16384,19660,22937};
short filt12_m1_dc[12] = {
-4096,0,4096,8192,12288,16384,9830,6553,3276,0,-3277,-6554};
short filt12_l2_dc[12] = {
26214,22937,19660,16384,13107,9830,6553,0,0,0,0,0};
short filt12_r2_dc[12] = {
0,0,0,0,0,0,0,4096,8192,12288,16384,20480};
short filt12_m2_dc[12] = {
-6554,-3277,0,3276,6553,6553,16384,12288,8192,4096,0,-4096};
short filt12_l3_dc[12] = {
26214,22937,19660,16384,13107,9830,3276,0,0,0,0,0};
short filt12_r3_dc[12] = {
0,0,0,0,0,0,0,0,4096,8192,12288,16384};
short filt12_m3_dc[12] = {
-9831,-6554,-3277,0,3276,6553,9830,16384,12288,8192,4096,0};
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#ifdef USER_MODE
#include <string.h>
#endif
#include "defs.h"
#include "PHY/defs.h"
#include "filt12_32.h"
//#define DEBUG_CH
/*To be accomplished*/
int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
uint8_t eNB_id,
uint8_t eNB_offset,
unsigned char Ns,
unsigned char p,
unsigned char symbol)
{
unsigned char aarx;
int uespec_pilot[9][200];
short *pil, *rxF;
//LTE_UE_PDSCH *lte_ue_pdsch_vars = phy_vars_ue->lte_ue_pdsch_vars[eNB_id];
int **rxdataF = phy_vars_ue->lte_ue_common_vars.rxdataF;
int32_t **dl_bf_ch_estimates = phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->dl_bf_ch_estimates;
int beamforming_mode = phy_vars_ue->transmission_mode>7?phy_vars_ue->transmission_mode : 0;
// define interpolation filters
//....
//ch_offset = phy_vars_ue->lte_frame_parms.ofdm_symbol_size*symbol;
//generate ue specific pilots
if(beamforming_mode==7)
lte_dl_ue_spec_rx(phy_vars_ue,&uespec_pilot[p-5][0],Ns,p,0);
else if (beamforming_mode>7)
lte_dl_ue_spec_rx(phy_vars_ue,&uespec_pilot[p-6][0],Ns,p,0);
else if (beamforming_mode==0)
msg("No beamforming is performed.\n");
else
msg("Beamforming mode not supported yet.\n");
if(beamforming_mode==7) {
for (aarx=0; aarx<phy_vars_ue->lte_frame_parms.nb_antennas_rx;aarx++) {
/* pil = (short *)&uespec_pilot[0][0];
rxF = (short *)&rxdataF_uespec[aarx][(symbol-1)/3*frame_parms->N_RB_DL*(3+frame_parms->Ncp)];
dl_ch = (short *)&dl_bf_ch_estimates[aarx][ch_offset];
memset(dl_ch,0,4*(phy_vars_ue->lte_frame_parms.ofdm_symbol_size));
//estimation and interpolation */
}
} else if (beamforming_mode==0){
msg("No beamforming is performed.\n");
return(-1);
} else {
msg("Beamforming mode is not supported yet.\n");
return(-1);
}
//temporal interpolation
return(0);
}
......@@ -52,12 +52,13 @@ unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char
void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14],uint16_t Nid_cell);
void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_cell, uint16_t *n_idDMRS);
/*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL UE-specific reference signals for antenna ports 7..14.
@param frame_parms LTE DL Frame parameters
@param lte_gold_uespec_table pointer to table where sequences are stored
@param Nid_cell Cell Id (to compute sequences for local and adjacent cells)
@param n_idDMRS Scrambling identity for TM10*/
void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_cell, uint16_t *n_idDMRS);
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_MBSFN);
......@@ -84,6 +85,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
@param output Output vector for OFDM symbol (Frequency Domain)
@param amp Q15 amplitude
@param Ns Slot number (0..19)
@param lprime symbol (0,1)
@param p antenna index
@param SS_flag Flag to indicate special subframe
*/
......@@ -92,6 +94,7 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
mod_sym_t *output,
short amp,
uint8_t Ns,
uint8_t lprime,
uint8_t p,
int SS_flag );
......@@ -123,6 +126,12 @@ int lte_dl_cell_spec_rx(PHY_VARS_UE *phy_vars_ue,
unsigned char l,
unsigned char p);
int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
mod_sym_t *output,
unsigned char Ns,
unsigned char p,
int SS_flag);
int lte_dl_mbsfn_rx(PHY_VARS_UE *phy_vars_ue,
int *output,
int subframe,
......
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file PHY/LTE_REFSIG/lte_dl_ue_spec.c
* \brief Top-level routines for generating UE-specific Reference signals from 36-211, V11.3.0 2013-06
* \author R. Knopp X. Jiang
* \date 2015
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr xiwen.jiang@eurecom.fr
* \note
* \warning
*/
#ifdef USER_MODE
#include <stdio.h>
#include <stdlib.h>
#endif
#include "defs.h"
#include "PHY/defs.h"
#include "log.h"
//extern unsigned int lte_gold_table[3][20][2][14];
//#define DEBUG_DL_CELL_SPEC
int Wbar_NCP[8][4] = {{1,1,1,1},{1,-1,1,-1},{1,1,1,1},{1,-1,1,-1},{1,1,-1,-1},{-1,-1,1,1},{1,-1,-1,1},{-1,1,1,-1}};
int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
uint8_t UE_id,
mod_sym_t *output,
short amp,
uint8_t Ns,
uint8_t lprime,
uint8_t p,
int SS_flag )
{
mod_sym_t qpsk[4],nqpsk[4];
int16_t k=0,a;
int mprime,mprime_dword,mprime_qpsk_symb;
unsigned nushift,kprime;
// LTE_eNB_DLSCH_t *dlsch = phy_vars_eNB->dlsch_eNB[UE_id][0];
a = (amp*ONE_OVER_SQRT2_Q15)>>15;
((short *)&qpsk[0])[0] = a;
((short *)&qpsk[0])[1] = a;
((short *)&qpsk[1])[0] = -a;
((short *)&qpsk[1])[1] = a;
((short *)&qpsk[2])[0] = a;
((short *)&qpsk[2])[1] = -a;
((short *)&qpsk[3])[0] = -a;
((short *)&qpsk[3])[1] = -a;
((short *)&nqpsk[0])[0] = -a;
((short *)&nqpsk[0])[1] = -a;
((short *)&nqpsk[1])[0] = a;
((short *)&nqpsk[1])[1] = -a;
((short *)&nqpsk[2])[0] = -a;
((short *)&nqpsk[2])[1] = a;
((short *)&nqpsk[3])[0] = a;
((short *)&nqpsk[3])[1] = a;
if (p==5) {
if (SS_flag==0) {
if (phy_vars_eNB->lte_frame_parms.Ncp == NORMAL) {
// this is 3GPP 36-211 6.10.3.2, NORMAL CP, p=5
nushift = phy_vars_eNB->lte_frame_parms.Nid_cell%3;
if(lprime==0){
kprime=nushift;
}else{
kprime=(nushift+2*lprime)%4;
}
k = kprime+phy_vars_eNB->lte_frame_parms.first_carrier_offset;
printf("lte_dl_ue_spec:k=%d\n",k);
for (mprime=0;mprime<3*phy_vars_eNB->lte_frame_parms.N_RB_DL-1;mprime++) {
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
//output[k] = qpsk[(phy_vars_eNB->lte_gold_uespec_port5_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
output[k] = 0xffffffff;
k += 4;
if (k >= phy_vars_eNB->lte_frame_parms.ofdm_symbol_size) {
k++; // skip DC carrier
k-=phy_vars_eNB->lte_frame_parms.ofdm_symbol_size;
}
}
}
}
} else if (p>=7) {
printf("lte_dl_ue_spec:antenna ports >=7 not supported yet!\n");
} else {
LOG_E(PHY,"Illegal p %d UE specific pilots\n",p);
}
return(0);
}
int lte_dl_ue_spec_rx(PHY_VARS_UE *phy_vars_ue,
mod_sym_t *output,
unsigned char Ns,
unsigned char p,
int SS_flag)
{
mod_sym_t qpsk[4],nqpsk[4],*qpsk_p,*output_p;
int16_t a;
int w,lprime,mprime,ind,l,ind_dword,ind_qpsk_symb,nPRB;
short pamp;
// Compute the correct pilot amplitude, sqrt_rho_b = Q3.13
pamp = ONE_OVER_SQRT2_Q15;
// This includes complex conjugate for channel estimation
((short *)&qpsk[0])[0] = pamp;
((short *)&qpsk[0])[1] = -pamp;
((short *)&qpsk[1])[0] = -pamp;
((short *)&qpsk[1])[1] = -pamp;
((short *)&qpsk[2])[0] = pamp;
((short *)&qpsk[2])[1] = pamp;
((short *)&qpsk[3])[0] = -pamp;
((short *)&qpsk[3])[1] = pamp;
((short *)&nqpsk[0])[0] = -pamp;
((short *)&nqpsk[0])[1] = pamp;
((short *)&nqpsk[1])[0] = pamp;
((short *)&nqpsk[1])[1] = pamp;
((short *)&nqpsk[2])[0] = -pamp;
((short *)&nqpsk[2])[1] = -pamp;
((short *)&nqpsk[3])[0] = pamp;
((short *)&nqpsk[3])[1] = -pamp;
if (p>=7) {
if (SS_flag==0) {
if (phy_vars_ue->lte_frame_parms.Ncp == NORMAL) {
// this is 3GPP 36-211 6.10.3.2, NORMAL CP, p>=7
output_p = output;
for (lprime=0; lprime<2; lprime++) {
ind = 3*lprime*phy_vars_ue->lte_frame_parms.N_RB_DL;
l = lprime + ((Ns&1)<<1);
// loop over pairs of PRBs, this is the periodicity of the W_bar_NCP sequence
// unroll the computations for the 6 pilots, select qpsk or nqpsk as function of W_bar_NCP
for (nPRB=0; nPRB<phy_vars_ue->lte_frame_parms.N_RB_DL; nPRB+=2) {
// First pilot
w = Wbar_NCP[p-7][l];
qpsk_p = (w==1) ? qpsk : nqpsk;
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
*output_p = qpsk_p[(phy_vars_ue->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
#ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n",
Ns,l,m,ind_dword,ind_qpsk_symb);
LOG_D(PHY,"index = %d\n",(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
#endif
output_p++;
ind++;
w = Wbar_NCP[p-7][3-l];
qpsk_p = (w==1) ? qpsk : nqpsk;
// Second pilot
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
*output_p = qpsk_p[(phy_vars_ue->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
#ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n",
Ns,l,m,ind_dword,ind_qpsk_symb);
LOG_D(PHY,"index = %d\n",(phy_vars_ue->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
#endif
output_p++;
ind++;
w = Wbar_NCP[p-7][l];
qpsk_p = (w==1) ? qpsk : nqpsk;
// Third pilot
ind_dword = ind>>4;
ind_qpsk_symb = ind&0xf;
*output_p = qpsk_p[(phy_vars_ue->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3];
#ifdef DEBUG_DL_UESPEC
LOG_D(PHY,"Ns %d, l %d, m %d,ind_dword %d, ind_qpsk_symbol %d\n",
Ns,l,m,ind_dword,ind_qpsk_symb);
LOG_D(PHY,"index = %d\n",(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3);
#endif
output_p++;
ind++;
// Fourth pilot
w = Wbar_NCP[p-7][3-l];