Commit 4eae34a9 authored by Cedric Roux's avatar Cedric Roux

Merge branch 'develop_integration_w04' into 'develop'

Develop integration w04

See merge request !93
parents 2045a493 61b3de99
cd /tmp/oai_test_setup/oai
source oaienv
echo $EXEC $EXEC_ARGS echo $EXEC $EXEC_ARGS
$EXEC $EXEC_ARGS $EXEC $EXEC_ARGS
...@@ -233,7 +233,7 @@ class ExecutionThread(threading.Thread): ...@@ -233,7 +233,7 @@ class ExecutionThread(threading.Thread):
for arg in args.splitlines(): for arg in args.splitlines():
i = i+1 i = i+1
runenv2 = list(runenv) runenv2 = list(runenv)
runenv2.append('OPENAIR_TARGET=/tmp/oai_test_setup/oai/targets') runenv2.append('OPENAIR_TARGETS=/tmp/oai_test_setup/oai/targets')
runenv2.append('EXEC="' runenv2.append('EXEC="'
+ test.findtext('main_exec') + test.findtext('main_exec')
+ '"') + '"')
......
...@@ -661,9 +661,9 @@ function main() { ...@@ -661,9 +661,9 @@ function main() {
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
#oai_nw_drv #oai_nw_drv
compilations \ #compilations \
$oaisim_build_dir oai_nw_drv \ # $oaisim_build_dir oai_nw_drv \
CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko # CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko
fi fi
cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt
......
...@@ -1063,7 +1063,8 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, ...@@ -1063,7 +1063,8 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
// create shortcuts // create shortcuts
LTE_DL_FRAME_PARMS* const fp = &ue->frame_parms; LTE_DL_FRAME_PARMS* const fp = &ue->frame_parms;
LTE_UE_COMMON* const common_vars = &ue->common_vars; LTE_UE_COMMON* const common_vars = &ue->common_vars;
LTE_UE_PDSCH** const pdsch_vars = ue->pdsch_vars; LTE_UE_PDSCH** const pdsch_vars_th0 = ue->pdsch_vars[0];
LTE_UE_PDSCH** const pdsch_vars_th1 = ue->pdsch_vars[1];
LTE_UE_PDSCH** const pdsch_vars_SI = ue->pdsch_vars_SI; LTE_UE_PDSCH** const pdsch_vars_SI = ue->pdsch_vars_SI;
LTE_UE_PDSCH** const pdsch_vars_ra = ue->pdsch_vars_ra; LTE_UE_PDSCH** const pdsch_vars_ra = ue->pdsch_vars_ra;
LTE_UE_PDSCH** const pdsch_vars_mch = ue->pdsch_vars_MCH; LTE_UE_PDSCH** const pdsch_vars_mch = ue->pdsch_vars_MCH;
...@@ -1116,32 +1117,37 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, ...@@ -1116,32 +1117,37 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
// init RX buffers // init RX buffers
common_vars->rxdata = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) ); common_vars->rxdata = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
common_vars->rxdataF = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) ); common_vars->common_vars_rx_data_per_thread[0].rxdataF = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
common_vars->rxdataF2 = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) ); common_vars->common_vars_rx_data_per_thread[1].rxdataF = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
for (i=0; i<fp->nb_antennas_rx; i++) { for (i=0; i<fp->nb_antennas_rx; i++) {
common_vars->rxdata[i] = (int32_t*) malloc16_clear( (fp->samples_per_tti*10+2048)*sizeof(int32_t) ); common_vars->rxdata[i] = (int32_t*) malloc16_clear( (fp->samples_per_tti*10+2048)*sizeof(int32_t) );
common_vars->rxdataF[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->ofdm_symbol_size*14) ); common_vars->common_vars_rx_data_per_thread[0].rxdataF[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->ofdm_symbol_size*14) );
common_vars->rxdataF2[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->ofdm_symbol_size*fp->symbols_per_tti*10) ); common_vars->common_vars_rx_data_per_thread[1].rxdataF[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->ofdm_symbol_size*14) );
} }
} }
// Channel estimates // Channel estimates
for (eNB_id=0; eNB_id<7; eNB_id++) { for (eNB_id=0; eNB_id<7; eNB_id++) {
common_vars->dl_ch_estimates[eNB_id] = (int32_t**)malloc16_clear(8*sizeof(int32_t*)); common_vars->common_vars_rx_data_per_thread[0].dl_ch_estimates[eNB_id] = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
common_vars->dl_ch_estimates_time[eNB_id] = (int32_t**)malloc16_clear(8*sizeof(int32_t*)); common_vars->common_vars_rx_data_per_thread[1].dl_ch_estimates[eNB_id] = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
common_vars->common_vars_rx_data_per_thread[0].dl_ch_estimates_time[eNB_id] = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
common_vars->common_vars_rx_data_per_thread[1].dl_ch_estimates_time[eNB_id] = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
for (i=0; i<fp->nb_antennas_rx; i++) for (i=0; i<fp->nb_antennas_rx; i++)
for (j=0; j<4; j++) { for (j=0; j<4; j++) {
int idx = (j<<1) + i; int idx = (j<<1) + i;
common_vars->dl_ch_estimates[eNB_id][idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->symbols_per_tti*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) ); common_vars->common_vars_rx_data_per_thread[0].dl_ch_estimates[eNB_id][idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->symbols_per_tti*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
common_vars->dl_ch_estimates_time[eNB_id][idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 ); common_vars->common_vars_rx_data_per_thread[1].dl_ch_estimates[eNB_id][idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->symbols_per_tti*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
common_vars->common_vars_rx_data_per_thread[0].dl_ch_estimates_time[eNB_id][idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
common_vars->common_vars_rx_data_per_thread[1].dl_ch_estimates_time[eNB_id][idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
} }
} }
// DLSCH // DLSCH
for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) { for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) {
pdsch_vars[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH)); pdsch_vars_th0[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
pdsch_vars_th1[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
pdsch_vars_SI[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH)); pdsch_vars_SI[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
pdsch_vars_ra[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH)); pdsch_vars_ra[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
pdsch_vars_mch[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH)); pdsch_vars_mch[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear(sizeof(LTE_UE_PDSCH));
...@@ -1150,25 +1156,43 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, ...@@ -1150,25 +1156,43 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
pbch_vars[eNB_id] = (LTE_UE_PBCH *)malloc16_clear(sizeof(LTE_UE_PBCH)); pbch_vars[eNB_id] = (LTE_UE_PBCH *)malloc16_clear(sizeof(LTE_UE_PBCH));
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
phy_init_lte_ue__PDSCH( pdsch_vars[eNB_id], fp ); phy_init_lte_ue__PDSCH( pdsch_vars_th0[eNB_id], fp );
phy_init_lte_ue__PDSCH( pdsch_vars_th1[eNB_id], fp );
pdsch_vars[eNB_id]->llr_shifts = (uint8_t*)malloc16_clear(7*2*fp->N_RB_DL*12); // thread 0
pdsch_vars[eNB_id]->llr_shifts_p = pdsch_vars[eNB_id]->llr_shifts; pdsch_vars_th0[eNB_id]->llr_shifts = (uint8_t*)malloc16_clear(7*2*fp->N_RB_DL*12);
pdsch_vars[eNB_id]->dl_ch_mag1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); pdsch_vars_th0[eNB_id]->llr_shifts_p = pdsch_vars_th0[eNB_id]->llr_shifts;
pdsch_vars[eNB_id]->dl_ch_magb1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); pdsch_vars_th0[eNB_id]->dl_ch_mag1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch_vars[eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) ); pdsch_vars_th0[eNB_id]->dl_ch_magb1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch_vars_th0[eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
for (k=0; k<8; k++) for (k=0; k<8; k++)
pdsch_vars[eNB_id]->rxdataF_comp1[k] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); pdsch_vars_th0[eNB_id]->rxdataF_comp1[k] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
// thread 1
pdsch_vars_th1[eNB_id]->llr_shifts = (uint8_t*)malloc16_clear(7*2*fp->N_RB_DL*12);
pdsch_vars_th1[eNB_id]->llr_shifts_p = pdsch_vars_th1[eNB_id]->llr_shifts;
pdsch_vars_th1[eNB_id]->dl_ch_mag1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch_vars_th1[eNB_id]->dl_ch_magb1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch_vars_th1[eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
for (k=0; k<8; k++)
pdsch_vars_th1[eNB_id]->rxdataF_comp1[k] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
for (i=0; i<fp->nb_antennas_rx; i++) for (i=0; i<fp->nb_antennas_rx; i++)
for (j=0; j<4; j++) { for (j=0; j<4; j++) {
int idx = (j<<1)+i; int idx = (j<<1)+i;
pdsch_vars[eNB_id]->dl_ch_mag1[idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) ); pdsch_vars_th0[eNB_id]->dl_ch_mag1[idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
pdsch_vars[eNB_id]->dl_ch_magb1[idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) ); pdsch_vars_th0[eNB_id]->dl_ch_magb1[idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
pdsch_vars_th1[eNB_id]->dl_ch_mag1[idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
pdsch_vars_th1[eNB_id]->dl_ch_magb1[idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
for (k=0; k<8; k++) for (k=0; k<8; k++)
pdsch_vars[eNB_id]->rxdataF_comp1[idx][k] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*14) ); {
pdsch_vars_th0[eNB_id]->rxdataF_comp1[idx][k] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*14) );
pdsch_vars_th1[eNB_id]->rxdataF_comp1[idx][k] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*14) );
}
} }
phy_init_lte_ue__PDSCH( pdsch_vars_SI[eNB_id], fp ); phy_init_lte_ue__PDSCH( pdsch_vars_SI[eNB_id], fp );
...@@ -1225,14 +1249,17 @@ int phy_init_lte_ue(PHY_VARS_UE *ue, ...@@ -1225,14 +1249,17 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
// initialization for the last instance of pdsch_vars (used for MU-MIMO) // initialization for the last instance of pdsch_vars (used for MU-MIMO)
pdsch_vars[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) ); pdsch_vars_th0[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) );
pdsch_vars_th1[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) );
pdsch_vars_SI[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) ); pdsch_vars_SI[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) );
pdsch_vars_ra[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) ); pdsch_vars_ra[eNB_id] = (LTE_UE_PDSCH *)malloc16_clear( sizeof(LTE_UE_PDSCH) );
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
phy_init_lte_ue__PDSCH( pdsch_vars[eNB_id], fp ); phy_init_lte_ue__PDSCH( pdsch_vars_th0[eNB_id], fp );
pdsch_vars[eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) ); pdsch_vars_th0[eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
phy_init_lte_ue__PDSCH( pdsch_vars_th1[eNB_id], fp );
pdsch_vars_th1[eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
} else { //abstraction == 1 } else { //abstraction == 1
ue->sinr_dB = (double*) malloc16_clear( fp->N_RB_DL*12*sizeof(double) ); ue->sinr_dB = (double*) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
*/ */
/*!\brief Timing drift hysterisis in samples*/ /*!\brief Timing drift hysterisis in samples*/
#define SYNCH_HYST 1 #define SYNCH_HYST 2
/*! /*!
\brief This function is used for time-frequency scanning prior to complete cell search. It scans \brief This function is used for time-frequency scanning prior to complete cell search. It scans
...@@ -180,6 +180,7 @@ This function computes the time domain channel response, finds the peak and adju ...@@ -180,6 +180,7 @@ This function computes the time domain channel response, finds the peak and adju
void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
PHY_VARS_UE *phy_vars_ue, PHY_VARS_UE *phy_vars_ue,
module_id_t eNb_id, module_id_t eNb_id,
uint8_t subframe,
unsigned char clear, unsigned char clear,
short coef); short coef);
...@@ -187,7 +188,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -187,7 +188,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue, void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue,
unsigned int subframe_offset, unsigned int subframe_offset,
unsigned char N0_symbol, unsigned char N0_symbol,
unsigned char abstraction_flag); unsigned char abstraction_flag,
uint8_t subframe);
//! \brief This function performance RSRP/RSCP measurements //! \brief This function performance RSRP/RSCP measurements
void ue_rrc_measurements(PHY_VARS_UE *phy_vars_ue, void ue_rrc_measurements(PHY_VARS_UE *phy_vars_ue,
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
PHY_VARS_UE *ue, PHY_VARS_UE *ue,
unsigned char eNB_id, unsigned char eNB_id,
uint8_t subframe,
unsigned char clear, unsigned char clear,
short coef) short coef)
{ {
...@@ -48,7 +49,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -48,7 +49,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
ncoef = 32767 - coef; ncoef = 32767 - coef;
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
LOG_D(PHY,"frame %d: rx_offset (before) = %d\n",ue->proc.proc_rxtx[0].frame_rx,ue->rx_offset); LOG_D(PHY,"AbsSubframe %d.%d: rx_offset (before) = %d\n",ue->proc.proc_rxtx[0].frame_rx%1024,subframe,ue->rx_offset);
#endif //DEBUG_PHY #endif //DEBUG_PHY
...@@ -57,8 +58,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -57,8 +58,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
temp = 0; temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) { for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)ue->common_vars.dl_ch_estimates_time[eNB_id][aa])[(i<<2)]; Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
Im = ((int16_t*)ue->common_vars.dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)]; Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
temp += (Re*Re/2) + (Im*Im/2); temp += (Re*Re/2) + (Im*Im/2);
} }
...@@ -74,13 +75,15 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -74,13 +75,15 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
else else
max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15; max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
// do not filter to have proactive timing adjustment
max_pos_fil = max_pos;
diff = max_pos_fil - frame_parms->nb_prefix_samples/8; diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
if ( diff > SYNCH_HYST ) if ( abs(diff) < SYNCH_HYST )
ue->rx_offset++; ue->rx_offset = 0;
else if (diff < -SYNCH_HYST) else
ue->rx_offset--; ue->rx_offset = diff;
if ( ue->rx_offset < 0 ) if ( ue->rx_offset < 0 )
ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES; ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES;
...@@ -91,8 +94,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -91,8 +94,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
LOG_D(PHY,"frame %d: rx_offset (after) = %d : max_pos = %d,max_pos_fil = %d (peak %d)\n", LOG_D(PHY,"AbsSubframe %d.%d: rx_offset (after) = %d : max_pos = %d,max_pos_fil = %d (peak %d) target_pos %d \n",
ue->proc.proc_rxtx[0].frame_rx,ue->rx_offset,max_pos,max_pos_fil,temp); ue->proc.proc_rxtx[0].frame_rx,subframe,ue->rx_offset,max_pos,max_pos_fil,temp,(frame_parms->nb_prefix_samples>>3));
#endif //DEBUG_PHY #endif //DEBUG_PHY
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
......
...@@ -70,9 +70,9 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -70,9 +70,9 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
else else
rballoc = dlsch0_harq->rb_alloc_even; rballoc = dlsch0_harq->rb_alloc_even;
rxdataF = phy_vars_ue->common_vars.rxdataF; rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF;
dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[eNB_id]->dl_bf_ch_estimates; dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[(Ns>>1)&0x1][eNB_id]->dl_bf_ch_estimates;
beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
......
...@@ -44,12 +44,14 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -44,12 +44,14 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
int ch_offset,symbol_offset; int ch_offset,symbol_offset;
// unsigned int n; // unsigned int n;
// int i; // int i;
static int interpolateS11S12 = 1;
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];
uint8_t nushift,pilot1,pilot2,pilot3; uint8_t nushift,pilot1,pilot2,pilot3;
int **dl_ch_estimates=ue->common_vars.dl_ch_estimates[eNB_offset]; int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[eNB_offset];
int **rxdataF=ue->common_vars.rxdataF; int **dl_ch_estimates_previous=ue->common_vars.common_vars_rx_data_per_thread[((Ns>>1)+1)&0x1].dl_ch_estimates[eNB_offset];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF;
if (ue->frame_parms.Ncp == 0) { // normal prefix if (ue->frame_parms.Ncp == 0) { // normal prefix
pilot1 = 4; pilot1 = 4;
...@@ -638,13 +640,19 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -638,13 +640,19 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
if (symbol == 0) { if (symbol == 0) {
// printf("Interpolating %d->0\n",4-ue->frame_parms.Ncp); // printf("Interpolating %d->0\n",4-ue->frame_parms.Ncp);
// dl_ch_prev = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][(4-ue->frame_parms.Ncp)*(ue->frame_parms.ofdm_symbol_size)]; // dl_ch_prev = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][(4-ue->frame_parms.Ncp)*(ue->frame_parms.ofdm_symbol_size)];
dl_ch_prev = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][pilot3*(ue->frame_parms.ofdm_symbol_size)]; if(((Ns>>1)!=0) || ( ((Ns>>1)==0) && interpolateS11S12))
{
//LOG_D(PHY,"Interpolate s11-->s0 to get s12 and s13 Ns %d \n", Ns);
dl_ch_prev = (int16_t *)&dl_ch_estimates_previous[(p<<1)+aarx][pilot3*(ue->frame_parms.ofdm_symbol_size)];
multadd_complex_vector_real_scalar(dl_ch_prev,21845,dl_ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)),1,ue->frame_parms.ofdm_symbol_size); multadd_complex_vector_real_scalar(dl_ch_prev,21845,dl_ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)),1,ue->frame_parms.ofdm_symbol_size);
multadd_complex_vector_real_scalar(dl_ch,10923,dl_ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)),0,ue->frame_parms.ofdm_symbol_size); multadd_complex_vector_real_scalar(dl_ch,10923,dl_ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)),0,ue->frame_parms.ofdm_symbol_size);
multadd_complex_vector_real_scalar(dl_ch_prev,10923,dl_ch_prev+(2*((ue->frame_parms.ofdm_symbol_size)<<1)),1,ue->frame_parms.ofdm_symbol_size); multadd_complex_vector_real_scalar(dl_ch_prev,10923,dl_ch_prev+(2*((ue->frame_parms.ofdm_symbol_size)<<1)),1,ue->frame_parms.ofdm_symbol_size);
multadd_complex_vector_real_scalar(dl_ch,21845,dl_ch_prev+(2*((ue->frame_parms.ofdm_symbol_size)<<1)),0,ue->frame_parms.ofdm_symbol_size); multadd_complex_vector_real_scalar(dl_ch,21845,dl_ch_prev+(2*((ue->frame_parms.ofdm_symbol_size)<<1)),0,ue->frame_parms.ofdm_symbol_size);
}
interpolateS11S12 = 1;
} // this is 1/3,2/3 combination for pilots spaced by 3 symbols } // this is 1/3,2/3 combination for pilots spaced by 3 symbols
else if (symbol == pilot1) { else if (symbol == pilot1) {
dl_ch_prev = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][0]; dl_ch_prev = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][0];
...@@ -693,6 +701,38 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -693,6 +701,38 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
multadd_complex_vector_real_scalar(dl_ch_prev,21845,dl_ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)<<1),1,ue->frame_parms.ofdm_symbol_size); multadd_complex_vector_real_scalar(dl_ch_prev,21845,dl_ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)<<1),1,ue->frame_parms.ofdm_symbol_size);
multadd_complex_vector_real_scalar(dl_ch,10923,dl_ch_prev+(2*((ue->frame_parms.ofdm_symbol_size)<<1)),0,ue->frame_parms.ofdm_symbol_size); multadd_complex_vector_real_scalar(dl_ch,10923,dl_ch_prev+(2*((ue->frame_parms.ofdm_symbol_size)<<1)),0,ue->frame_parms.ofdm_symbol_size);
} // pilot spacing 3 symbols (1/3,2/3 combination) } // pilot spacing 3 symbols (1/3,2/3 combination)
if((ue->rx_offset_diff !=0) && ((Ns>>1) == 9))
{
//LOG_D(PHY,"Extrapolate s7-->s11 to get s12 and s13 Ns %d\n", Ns);
interpolateS11S12 = 0;
//LOG_E(PHY,"Interpolate s7--s11 s12 s13 pilot 3 Ns %d l %d symbol %d \n", Ns, l, symbol);
int16_t *dlChEst_ofdm11 = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][pilot3*(ue->frame_parms.ofdm_symbol_size)];
int16_t *dlChEst_ofdm7 = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][pilot2*(ue->frame_parms.ofdm_symbol_size)];
// interpolate ofdm s12: 5/4*ofdms11 + -1/4*ofdms7 5/4 q1.15 40960 -1/4 q1.15 8192
int16_t *dlChEst_ofdm12 = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][12*ue->frame_parms.ofdm_symbol_size];
for(int i=0; i<(2*ue->frame_parms.ofdm_symbol_size); i++)
{
int64_t tmp_mult = 0;
tmp_mult = ((int64_t)dlChEst_ofdm11[i] * 40960 - (int64_t)dlChEst_ofdm7[i] * 8192);
tmp_mult = tmp_mult >> 15;
dlChEst_ofdm12[i] = tmp_mult;
}
// interpolate ofdm s13: 3/2*ofdms11 + -1/2*ofdms7 3/2 q1.15 49152 1/2 q1.15 16384
int16_t *dlChEst_ofdm13 = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][13*ue->frame_parms.ofdm_symbol_size];
for(int i=0; i<(2*ue->frame_parms.ofdm_symbol_size); i++)
{
int64_t tmp_mult = 0;
tmp_mult = ((int64_t)dlChEst_ofdm11[i] * 49152 - (int64_t)dlChEst_ofdm7[i] * 16384);
tmp_mult = tmp_mult >> 15;
dlChEst_ofdm13[i] = tmp_mult;
}
}
} }
} }
...@@ -734,15 +774,15 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -734,15 +774,15 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
// do ifft of channel estimate // do ifft of channel estimate
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) { for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
if (ue->common_vars.dl_ch_estimates[eNB_offset][(p<<1)+aarx]) if (ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[eNB_offset][(p<<1)+aarx])
idft((int16_t*) &ue->common_vars.dl_ch_estimates[eNB_offset][(p<<1)+aarx][8], idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
(int16_t*) ue->common_vars.dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1); (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
} }
#if T_TRACER #if T_TRACER
T(T_UE_PHY_DL_CHANNEL_ESTIMATE, T_INT(eNB_id), T_INT(ue->Mod_id), T(T_UE_PHY_DL_CHANNEL_ESTIMATE, T_INT(eNB_id), T_INT(ue->Mod_id),
T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].frame_rx%1024), T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].subframe_rx), T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].frame_rx%1024), T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].subframe_rx),
T_INT(0), T_BUFFER(&ue->common_vars.dl_ch_estimates_time[eNB_offset][0][0], 512 * 4)); T_INT(0), T_BUFFER(&ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates_time[eNB_offset][0][0], 512 * 4));
#endif #endif
return(0); return(0);
......
...@@ -44,8 +44,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, ...@@ -44,8 +44,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// unsigned int n; // unsigned int n;
// int i; // int i;
int **dl_ch_estimates=ue->common_vars.dl_ch_estimates[0]; int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[0];
int **rxdataF=ue->common_vars.rxdataF; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF;
ch_offset = (l*(ue->frame_parms.ofdm_symbol_size)); ch_offset = (l*(ue->frame_parms.ofdm_symbol_size));
symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l; symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
...@@ -734,31 +734,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, ...@@ -734,31 +734,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// do ifft of channel estimate // do ifft of channel estimate
for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) { for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) {
if (ue->common_vars.dl_ch_estimates[eNB_offset][aa]) { if (ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa]) {
switch (ue->frame_parms.N_RB_DL) { switch (ue->frame_parms.N_RB_DL) {
case 6: case 6:
idft128((int16_t*) &ue->common_vars.dl_ch_estimates[eNB_offset][aa][8], idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 25: case 25:
idft512((int16_t*) &ue->common_vars.dl_ch_estimates[eNB_offset][aa][8], idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 50: case 50:
idft1024((int16_t*) &ue->common_vars.dl_ch_estimates[eNB_offset][aa][8], idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 75: case 75:
idft1536((int16_t*) &ue->common_vars.dl_ch_estimates[eNB_offset][aa][8], idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 100: case 100:
idft2048((int16_t*) &ue->common_vars.dl_ch_estimates[eNB_offset][aa][8], idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
default: default:
......
...@@ -197,9 +197,8 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -197,9 +197,8 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
if (ue->frame_parms.Ncp==NORMAL) { if (ue->frame_parms.Ncp==NORMAL) {
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) { for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(5*ue->frame_parms.ofdm_symbol_size)];
rxF_sss = (int16_t *)&ue->common_vars.rxdataF[aarx][(5*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
rxF_pss = (int16_t *)&ue->common_vars.rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
//-ve spectrum from SSS //-ve spectrum from SSS
...@@ -224,7 +223,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -224,7 +223,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+66]*rxF_pss[2+66])+((int32_t)rxF_pss[2+65]*rxF_pss[2+65])); ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+66]*rxF_pss[2+66])+((int32_t)rxF_pss[2+65]*rxF_pss[2+65]));
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+64]*rxF_pss[2+64])+((int32_t)rxF_pss[2+63]*rxF_pss[2+63])); // ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+64]*rxF_pss[2+64])+((int32_t)rxF_pss[2+63]*rxF_pss[2+63]));
// printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS // printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS
rxF_pss = (int16_t *)&ue->common_vars.rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)];
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71])); // ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71]));
// printf("pssm36 %d\n",ue->measurements.n0_power[aarx]); // printf("pssm36 %d\n",ue->measurements.n0_power[aarx]);
ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-70]*rxF_pss[-70])+((int32_t)rxF_pss[-69]*rxF_pss[-69])); ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-70]*rxF_pss[-70])+((int32_t)rxF_pss[-69]*rxF_pss[-69]));
...@@ -296,10 +295,10 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -296,10 +295,10 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
if (ue->frame_parms.Ncp==NORMAL) { if (ue->frame_parms.Ncp==NORMAL) {
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) { for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
rxF_sss = (int16_t *)&ue->common_vars.rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)]; rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
// note this is a dummy pointer, the pss is not really there! // note this is a dummy pointer, the pss is not really there!
// in FDD the pss is in the symbol after the sss, but not in TDD // in FDD the pss is in the symbol after the sss, but not in TDD
rxF_pss = (int16_t *)&ue->common_vars.rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)];
//-ve spectrum from SSS //-ve spectrum from SSS
// ue->measurements.n0_power[aarx] = (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71])); // ue->measurements.n0_power[aarx] = (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71]));
...@@ -351,7 +350,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -351,7 +350,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
#endif #endif
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) { for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
rxF = (int16_t *)&ue->common_vars.rxdataF[aarx][(l*ue->frame_parms.ofdm_symbol_size)]; rxF = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(l*ue->frame_parms.ofdm_symbol_size)];
off = (ue->frame_parms.first_carrier_offset+k)<<1; off = (ue->frame_parms.first_carrier_offset+k)<<1;
if (l==(4-ue->frame_parms.Ncp)) { if (l==(4-ue->frame_parms.Ncp)) {
...@@ -457,7 +456,8 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -457,7 +456,8 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
void lte_ue_measurements(PHY_VARS_UE *ue, void lte_ue_measurements(PHY_VARS_UE *ue,
unsigned int subframe_offset, unsigned int subframe_offset,
unsigned char N0_symbol, unsigned char N0_symbol,
unsigned char abstraction_flag) unsigned char abstraction_flag,
uint8_t subframe)
{ {
...@@ -507,7 +507,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -507,7 +507,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) { for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
ue->measurements.rx_spatial_power[eNB_id][aatx][aarx] = ue->measurements.rx_spatial_power[eNB_id][aatx][aarx] =
(signal_energy_nodc(&ue->common_vars.dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0], (signal_energy_nodc(&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0],
(N_RB_DL*12)));