Commit ed83cbd1 authored by Xiwen JIANG's avatar Xiwen JIANG

TM7 dlsim works

parent 0d681a0e
...@@ -119,6 +119,7 @@ endmacro(add_list_string_option) ...@@ -119,6 +119,7 @@ endmacro(add_list_string_option)
#################################################### ####################################################
# compilation flags # compilation flags
############################################# #############################################
set(CMAKE_BUILD_TYPE "Debug")
if (CMAKE_BUILD_TYPE STREQUAL "") if (CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "RelWithDebInfo") set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif() endif()
...@@ -406,7 +407,7 @@ include_directories ("${X2AP_DIR}") ...@@ -406,7 +407,7 @@ include_directories ("${X2AP_DIR}")
# Hardware dependant options # Hardware dependant options
################################### ###################################
add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4") add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4")
add_list1_option(NB_ANTENNAS_TX "2" "Number of antennas in transmission" "1" "2" "4") add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
add_list1_option(NB_ANTENNAS_TXRX "2" "Number of antennas in ????" "1" "2" "4") add_list1_option(NB_ANTENNAS_TXRX "2" "Number of antennas in ????" "1" "2" "4")
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "False" "EXMIMO" "OAI_USRP" "ETHERNET" "OAI_BLADERF" "CPRIGW") add_list2_option(RF_BOARD "EXMIMO" "RF head type" "False" "EXMIMO" "OAI_USRP" "ETHERNET" "OAI_BLADERF" "CPRIGW")
...@@ -819,6 +820,7 @@ set(PHY_SRC ...@@ -819,6 +820,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/initial_sync.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/initial_sync.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/beamforming.c
${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c ${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c ${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c ${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
......
...@@ -11,8 +11,8 @@ CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing ...@@ -11,8 +11,8 @@ CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing
CFLAGS += $(call cc-option,-mpreferred-stack-boundary=4) CFLAGS += $(call cc-option,-mpreferred-stack-boundary=4)
#For performance, if some option doesn't exist in all gcc versions, use $(call cc-option,MY_OPTION) #For performance, if some option doesn't exist in all gcc versions, use $(call cc-option,MY_OPTION)
CFLAGS += -O2 #CFLAGS += -O2
CFLAGS += -funroll-loops #CFLAGS += -funroll-loops
CFLAGS += -Wno-packed-bitfield-compat CFLAGS += -Wno-packed-bitfield-compat
# This is the minimum CPU faetures for OAI # This is the minimum CPU faetures for OAI
......
...@@ -77,7 +77,7 @@ void phy_config_mib(LTE_DL_FRAME_PARMS *lte_frame_parms, ...@@ -77,7 +77,7 @@ void phy_config_mib(LTE_DL_FRAME_PARMS *lte_frame_parms,
lte_frame_parms->nushift = Nid_cell%6; lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->Ncp = Ncp; lte_frame_parms->Ncp = Ncp;
lte_frame_parms->frame_type = frame_type; lte_frame_parms->frame_type = frame_type;
lte_frame_parms->nb_antennas_tx_eNB = p_eNB; lte_frame_parms->nb_antenna_ports_eNB = p_eNB;
lte_frame_parms->phich_config_common.phich_resource = phich_config->phich_resource; lte_frame_parms->phich_config_common.phich_resource = phich_config->phich_resource;
lte_frame_parms->phich_config_common.phich_duration = phich_config->phich_duration; lte_frame_parms->phich_config_common.phich_duration = phich_config->phich_duration;
} }
...@@ -1262,8 +1262,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1262,8 +1262,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
phy_vars_eNB->physicalConfigDedicated[UE_id] = NULL; phy_vars_eNB->physicalConfigDedicated[UE_id] = NULL;
} }
phy_vars_eNB->first_run_I0_measurements = phy_vars_eNB->first_run_I0_measurements = 1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
#ifndef USER_MODE #ifndef USER_MODE
AssertFatal( frame_parms->nb_antennas_tx <= NB_ANTENNAS_TX, "nb_antennas_tx too large" ); AssertFatal( frame_parms->nb_antennas_tx <= NB_ANTENNAS_TX, "nb_antennas_tx too large" );
...@@ -1275,24 +1274,57 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1275,24 +1274,57 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
if (abstraction_flag==0) { if (abstraction_flag==0) {
// TX vars // TX vars
eNB_common_vars->txdata[eNB_id] = (int32_t**)malloc16(frame_parms->nb_antennas_tx*sizeof(int32_t*) ); 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->txdataF[eNB_id] = (mod_sym_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(mod_sym_t*));
eNB_common_vars->txdataF_BF[eNB_id] = (mod_sym_t ***)malloc16(frame_parms->nb_antennas_tx*sizeof(mod_sym_t**));
for (i=0; i<14; i++) {
eNB_common_vars->txdataF[eNB_id][i] = (mod_sym_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t) );
#ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->txdataF[%d][%d] = %p (%d bytes)\n",
eNB_id,i,eNB_common_vars->txdataF[eNB_id][i],
FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t));
#endif
}
for (i=0; i<frame_parms->nb_antennas_tx; i++) { for (i=0; i<frame_parms->nb_antennas_tx; i++) {
eNB_common_vars->txdataF_BF[eNB_id][i] = (mod_sym_t*)malloc16_clear( OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(mod_sym_t*) );
#ifdef USER_MODE #ifdef USER_MODE
eNB_common_vars->txdata[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(int32_t) ); 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) ); #else // USER_MODE
#else // USER_MODE
eNB_common_vars->txdata[eNB_id][i] = TX_DMA_BUFFER[eNB_id][i]; eNB_common_vars->txdata[eNB_id][i] = TX_DMA_BUFFER[eNB_id][i];
eNB_common_vars->txdataF[eNB_id][i] = (mod_sym_t *)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t) ); #endif // USER_MODE
#endif //USER_MODE
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->txdataF_BF[%d][%d][%d] = %p (%d bytes)\n",
eNB_id,i,j,eNB_common_vars->txdataF_BF[eNB_id][i][j],
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(mod_sym_t));
msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->txdata[%d][%d] = %p\n",eNB_id,i,eNB_common_vars->txdata[eNB_id][i]); msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->txdata[%d][%d] = %p\n",eNB_id,i,eNB_common_vars->txdata[eNB_id][i]);
msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->txdataF[%d][%d] = %p (%d bytes)\n",
eNB_id,i,eNB_common_vars->txdataF[eNB_id][i],
FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t));
#endif #endif
} }
for (i=0; i<2; i++) { // 2 is the total number of cell specific antenna ports
eNB_common_vars->cell_spec_bf_weights[eNB_id][i] = (int32_t **)malloc16_clear(frame_parms->nb_antennas_tx*sizeof(int32_t*));
for (j=0; j<frame_parms->nb_antennas_tx; j++) {
eNB_common_vars->cell_spec_bf_weights[eNB_id][i][j] = (int32_t*)malloc16_clear(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
#ifdef DEBUG_PUY
msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->cell_spec_bf_weights[%d][%d][%d] = %p (%d bytes)\n",
eNB_id,i,j,eNB_common_vars->cell_spec_bf_weights[eNB_id][i][j],
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
#endif
}
}
for (i=0; i<8; i++) { //antenna port 5 for TM7, antenna port 7-15 for TM8-10
eNB_common_vars->ue_spec_bf_weights[eNB_id][i] = (int32_t **)malloc16_clear(frame_parms->nb_antennas_tx*sizeof(int32_t*));
for (j=0; j<frame_parms->nb_antennas_tx; j++) {
eNB_common_vars->ue_spec_bf_weights[eNB_id][i][j] = (int32_t*)malloc16_clear(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
#ifdef DEBUG_PUY
msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->ue_spec_bf_weights[%d][%d][%d] = %p (%d bytes)\n",
eNB_id,i,j,eNB_common_vars->ue_spec_bf_weights[eNB_id][i][j],
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
#endif
}
}
// RX vars // RX vars
eNB_common_vars->rxdata[eNB_id] = (int32_t**)malloc16(frame_parms->nb_antennas_rx*sizeof(int32_t*) ); eNB_common_vars->rxdata[eNB_id] = (int32_t**)malloc16(frame_parms->nb_antennas_rx*sizeof(int32_t*) );
......
...@@ -728,7 +728,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -728,7 +728,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
// do ifft of channel estimate // do ifft of channel estimate
for (aarx=0; aarx<phy_vars_ue->lte_frame_parms.nb_antennas_rx; aarx++) for (aarx=0; aarx<phy_vars_ue->lte_frame_parms.nb_antennas_rx; aarx++)
for (p=0; p<phy_vars_ue->lte_frame_parms.nb_antennas_tx_eNB; p++) { for (p=0; p<phy_vars_ue->lte_frame_parms.nb_antenna_ports_eNB; p++) {
if (phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][(p<<1)+aarx]) if (phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][(p<<1)+aarx])
idft((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][(p<<1)+aarx][8], idft((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
(int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1); (int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
......
...@@ -453,7 +453,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue, ...@@ -453,7 +453,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue,
// signal measurements // signal measurements
for (eNB_id=0; eNB_id<phy_vars_ue->n_connected_eNB; eNB_id++) { for (eNB_id=0; eNB_id<phy_vars_ue->n_connected_eNB; eNB_id++) {
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_antennas_tx_eNB; aatx++) { for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
phy_vars_ue->PHY_measurements.rx_spatial_power[eNB_id][aatx][aarx] = phy_vars_ue->PHY_measurements.rx_spatial_power[eNB_id][aatx][aarx] =
(signal_energy_nodc(&phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0], (signal_energy_nodc(&phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0],
(N_RB_DL*12))); (N_RB_DL*12)));
......
...@@ -84,7 +84,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB, ...@@ -84,7 +84,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
int16_t ul_ch_estimates_re,ul_ch_estimates_im; int16_t ul_ch_estimates_re,ul_ch_estimates_im;
int32_t rx_power_correction; int32_t rx_power_correction;
//uint8_t nb_antennas_rx = frame_parms->nb_antennas_tx_eNB; //uint8_t nb_antennas_rx = frame_parms->nb_antenna_ports_eNB;
uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx; uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx;
uint8_t cyclic_shift; uint8_t cyclic_shift;
...@@ -678,7 +678,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -678,7 +678,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
int T_SFC,aa; int T_SFC,aa;
int N_symb,symbol; int N_symb,symbol;
uint8_t nb_antennas_rx = frame_parms->nb_antennas_tx_eNB; uint8_t nb_antennas_rx = frame_parms->nb_antenna_ports_eNB;
#ifdef DEBUG_SRS #ifdef DEBUG_SRS
char fname[40], vname[40]; char fname[40], vname[40];
#endif #endif
......
...@@ -74,7 +74,7 @@ uint32_t check_phich_reg(LTE_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t ...@@ -74,7 +74,7 @@ uint32_t check_phich_reg(LTE_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t
// compute REG based on symbol // compute REG based on symbol
if ((lprime == 0)|| if ((lprime == 0)||
((lprime==1)&&(frame_parms->nb_antennas_tx_eNB == 4))) ((lprime==1)&&(frame_parms->nb_antenna_ports_eNB == 4)))
mprime = kprime/6; mprime = kprime/6;
else else
mprime = kprime>>2; mprime = kprime>>2;
...@@ -301,7 +301,7 @@ void pdcch_interleaving(LTE_DL_FRAME_PARMS *frame_parms,mod_sym_t **z, mod_sym_t ...@@ -301,7 +301,7 @@ void pdcch_interleaving(LTE_DL_FRAME_PARMS *frame_parms,mod_sym_t **z, mod_sym_t
for (row=0; row<RCC; row++) { for (row=0; row<RCC; row++) {
//printf("col %d, index %d, row %d\n",col,index,row); //printf("col %d, index %d, row %d\n",col,index,row);
if (index>=ND) { if (index>=ND) {
for (a=0; a<frame_parms->nb_antennas_tx_eNB; a++) { for (a=0; a<frame_parms->nb_antenna_ports_eNB; a++) {
//printf("a %d k %d\n",a,k); //printf("a %d k %d\n",a,k);
wptr = &wtemp[a][k<<2]; wptr = &wtemp[a][k<<2];
...@@ -325,7 +325,7 @@ void pdcch_interleaving(LTE_DL_FRAME_PARMS *frame_parms,mod_sym_t **z, mod_sym_t ...@@ -325,7 +325,7 @@ void pdcch_interleaving(LTE_DL_FRAME_PARMS *frame_parms,mod_sym_t **z, mod_sym_t
// permutation // permutation
for (i=0; i<Mquad; i++) { for (i=0; i<Mquad; i++) {
for (a=0; a<frame_parms->nb_antennas_tx_eNB; a++) { for (a=0; a<frame_parms->nb_antenna_ports_eNB; a++) {
//wptr = &wtemp[a][i<<2]; //wptr = &wtemp[a][i<<2];
//wptr2 = &wbar[a][((i+frame_parms->Nid_cell)%Mquad)<<2]; //wptr2 = &wbar[a][((i+frame_parms->Nid_cell)%Mquad)<<2];
...@@ -417,7 +417,7 @@ void pdcch_demapping(uint16_t *llr,uint16_t *wbar,LTE_DL_FRAME_PARMS *frame_parm ...@@ -417,7 +417,7 @@ void pdcch_demapping(uint16_t *llr,uint16_t *wbar,LTE_DL_FRAME_PARMS *frame_parm
re_offset0++; re_offset0++;
} }
} }
} else if ((lprime==1)&&(frame_parms->nb_antennas_tx_eNB == 4)) { } else if ((lprime==1)&&(frame_parms->nb_antenna_ports_eNB == 4)) {
// LATER!!!! // LATER!!!!
} else { // no pilots in this symbol } else { // no pilots in this symbol
kprime_mod12 = kprime%12; kprime_mod12 = kprime%12;
...@@ -655,7 +655,7 @@ void pdcch_channel_level(int32_t **dl_ch_estimates_ext, ...@@ -655,7 +655,7 @@ void pdcch_channel_level(int32_t **dl_ch_estimates_ext,
int16x8_t *dl_ch128; int16x8_t *dl_ch128;
int32x4_t *avg128P; int32x4_t *avg128P;
#endif #endif
for (aatx=0; aatx<frame_parms->nb_antennas_tx_eNB; aatx++) for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++)
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
//clear average level //clear average level
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
...@@ -833,7 +833,7 @@ void pdcch_detection_mrc_i(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -833,7 +833,7 @@ void pdcch_detection_mrc_i(LTE_DL_FRAME_PARMS *frame_parms,
int32_t i; int32_t i;
if (frame_parms->nb_antennas_rx>1) { if (frame_parms->nb_antennas_rx>1) {
for (aatx=0; aatx<frame_parms->nb_antennas_tx_eNB; aatx++) { for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
//if (frame_parms->mode1_flag && (aatx>0)) break; //if (frame_parms->mode1_flag && (aatx>0)) break;
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
...@@ -1396,8 +1396,8 @@ void pdcch_channel_compensation(int32_t **rxdataF_ext, ...@@ -1396,8 +1396,8 @@ void pdcch_channel_compensation(int32_t **rxdataF_ext,
if (symbol==0) if (symbol==0)
pilots=1; pilots=1;
for (aatx=0; aatx<frame_parms->nb_antennas_tx_eNB; aatx++) { for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
//if (frame_parms->mode1_flag && aatx>0) break; //if mode1_flag is set then there is only one stream to extract, independent of nb_antennas_tx_eNB //if (frame_parms->mode1_flag && aatx>0) break; //if mode1_flag is set then there is only one stream to extract, independent of nb_antenna_ports_eNB
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
...@@ -1603,7 +1603,7 @@ void pdcch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1603,7 +1603,7 @@ void pdcch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
int32_t i; int32_t i;
if (frame_parms->nb_antennas_rx>1) { if (frame_parms->nb_antennas_rx>1) {
for (aatx=0; aatx<frame_parms->nb_antennas_tx_eNB; aatx++) { for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
rxdataF_comp128_0 = (__m128i *)&rxdataF_comp[(aatx<<1)][symbol*frame_parms->N_RB_DL*12]; rxdataF_comp128_0 = (__m128i *)&rxdataF_comp[(aatx<<1)][symbol*frame_parms->N_RB_DL*12];
rxdataF_comp128_1 = (__m128i *)&rxdataF_comp[(aatx<<1)+1][symbol*frame_parms->N_RB_DL*12]; rxdataF_comp128_1 = (__m128i *)&rxdataF_comp[(aatx<<1)+1][symbol*frame_parms->N_RB_DL*12];
...@@ -1724,7 +1724,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars, ...@@ -1724,7 +1724,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
#endif //MU_RECEIVER #endif //MU_RECEIVER
} else if (frame_parms->nb_antennas_tx_eNB>1) { } else if (frame_parms->nb_antenna_ports_eNB>1) {
pdcch_extract_rbs_dual(lte_ue_common_vars->rxdataF, pdcch_extract_rbs_dual(lte_ue_common_vars->rxdataF,
lte_ue_common_vars->dl_ch_estimates[eNB_id], lte_ue_common_vars->dl_ch_estimates[eNB_id],
lte_ue_pdcch_vars[eNB_id]->rxdataF_ext, lte_ue_pdcch_vars[eNB_id]->rxdataF_ext,
...@@ -1750,7 +1750,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars, ...@@ -1750,7 +1750,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
avgs = 0; avgs = 0;
for (aatx=0; aatx<frame_parms->nb_antennas_tx_eNB; aatx++) for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++)
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++)
avgs = cmax(avgs,avgP[(aarx<<1)+aatx]); avgs = cmax(avgs,avgP[(aarx<<1)+aatx]);
...@@ -1991,10 +1991,10 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci, ...@@ -1991,10 +1991,10 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci,
//if ((9*numCCE) <= (frame_parms->N_RB_DL*2)) //if ((9*numCCE) <= (frame_parms->N_RB_DL*2))
if (numCCE <= get_nCCE(1, frame_parms, get_mi(frame_parms, subframe))) if (numCCE <= get_nCCE(1, frame_parms, get_mi(frame_parms, subframe)))
return(cmax(1,nCCEmin)); return(cmax(1,nCCEmin));
//else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antennas_tx_eNB==4) ? 4 : 5))) //else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 4 : 5)))
else if (numCCE <= get_nCCE(2, frame_parms, get_mi(frame_parms, subframe))) else if (numCCE <= get_nCCE(2, frame_parms, get_mi(frame_parms, subframe)))
return(cmax(2,nCCEmin)); return(cmax(2,nCCEmin));
//else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antennas_tx_eNB==4) ? 7 : 8))) //else if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 7 : 8)))
else if (numCCE <= get_nCCE(3, frame_parms, get_mi(frame_parms, subframe))) else if (numCCE <= get_nCCE(3, frame_parms, get_mi(frame_parms, subframe)))
return(cmax(3,nCCEmin)); return(cmax(3,nCCEmin));
else if (frame_parms->N_RB_DL<=10) { else if (frame_parms->N_RB_DL<=10) {
...@@ -2004,10 +2004,10 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci, ...@@ -2004,10 +2004,10 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci,
get_nCCE(2, frame_parms, get_mi(frame_parms, subframe)), get_nCCE(2, frame_parms, get_mi(frame_parms, subframe)),
get_nCCE(3, frame_parms, get_mi(frame_parms, subframe))); get_nCCE(3, frame_parms, get_mi(frame_parms, subframe)));
if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antennas_tx_eNB==4) ? 10 : 11))) if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 10 : 11)))
return(4); return(4);
} else { // extended CP } else { // extended CP
if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antennas_tx_eNB==4) ? 9 : 10))) if ((9*numCCE) <= (frame_parms->N_RB_DL*((frame_parms->nb_antenna_ports_eNB==4) ? 9 : 10)))
return(4); return(4);
} }
} }
...@@ -2246,7 +2246,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2246,7 +2246,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
// Copy REG to TX buffer // Copy REG to TX buffer
if ((lprime == 0)|| if ((lprime == 0)||
((lprime==1)&&(frame_parms->nb_antennas_tx_eNB == 4))) { ((lprime==1)&&(frame_parms->nb_antenna_ports_eNB == 4))) {
// first symbol, or second symbol+4 TX antennas skip pilots // first symbol, or second symbol+4 TX antennas skip pilots
kprime_mod12 = kprime%12; kprime_mod12 = kprime%12;
...@@ -2258,7 +2258,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2258,7 +2258,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
if ((i!=(nushiftmod3))&&(i!=(nushiftmod3+3))) { if ((i!=(nushiftmod3))&&(i!=(nushiftmod3+3))) {
txdataF[0][tti_offset+i] = wbar[0][mprime]; txdataF[0][tti_offset+i] = wbar[0][mprime];
if (frame_parms->nb_antennas_tx_eNB > 1) if (frame_parms->nb_antenna_ports_eNB > 1)
txdataF[1][tti_offset+i] = wbar[1][mprime]; txdataF[1][tti_offset+i] = wbar[1][mprime];
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
...@@ -2277,7 +2277,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2277,7 +2277,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
for (i=0; i<4; i++) { for (i=0; i<4; i++) {
txdataF[0][tti_offset+i] = wbar[0][mprime]; txdataF[0][tti_offset+i] = wbar[0][mprime];
if (frame_parms->nb_antennas_tx_eNB > 1) if (frame_parms->nb_antenna_ports_eNB > 1)
txdataF[1][tti_offset+i] = wbar[1][mprime]; txdataF[1][tti_offset+i] = wbar[1][mprime];
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
...@@ -2288,7 +2288,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2288,7 +2288,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
} else { } else {
txdataF[0][tti_offset+0] = wbar[0][mprime]; txdataF[0][tti_offset+0] = wbar[0][mprime];
if (frame_parms->nb_antennas_tx_eNB > 1) if (frame_parms->nb_antenna_ports_eNB > 1)
txdataF[1][tti_offset+0] = wbar[1][mprime]; txdataF[1][tti_offset+0] = wbar[1][mprime];
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
...@@ -2297,7 +2297,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2297,7 +2297,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
mprime++; mprime++;
txdataF[0][tti_offset+1] = wbar[0][mprime]; txdataF[0][tti_offset+1] = wbar[0][mprime];
if (frame_parms->nb_antennas_tx_eNB > 1) if (frame_parms->nb_antenna_ports_eNB > 1)
txdataF[1][tti_offset+1] = wbar[1][mprime]; txdataF[1][tti_offset+1] = wbar[1][mprime];
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
...@@ -2306,7 +2306,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2306,7 +2306,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
mprime++; mprime++;
txdataF[0][tti_offset-frame_parms->ofdm_symbol_size+3] = wbar[0][mprime]; txdataF[0][tti_offset-frame_parms->ofdm_symbol_size+3] = wbar[0][mprime];
if (frame_parms->nb_antennas_tx_eNB > 1) if (frame_parms->nb_antenna_ports_eNB > 1)
txdataF[1][tti_offset-frame_parms->ofdm_symbol_size+3] = wbar[1][mprime]; txdataF[1][tti_offset-frame_parms->ofdm_symbol_size+3] = wbar[1][mprime];
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
...@@ -2316,7 +2316,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2316,7 +2316,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
mprime++; mprime++;
txdataF[0][tti_offset-frame_parms->ofdm_symbol_size+4] = wbar[0][mprime]; txdataF[0][tti_offset-frame_parms->ofdm_symbol_size+4] = wbar[0][mprime];
if (frame_parms->nb_antennas_tx_eNB > 1) if (frame_parms->nb_antenna_ports_eNB > 1)
txdataF[1][tti_offset-frame_parms->ofdm_symbol_size+4] = wbar[1][mprime]; txdataF[1][tti_offset-frame_parms->ofdm_symbol_size+4] = wbar[1][mprime];
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
...@@ -2820,12 +2820,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue, ...@@ -2820,12 +2820,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format1_size_bits = sizeof_DCI1_1_5MHz_TDD_t; format1_size_bits = sizeof_DCI1_1_5MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_1_5MHz_TDD_t); format1_size_bytes = sizeof(DCI1_1_5MHz_TDD_t);
if (frame_parms->nb_antennas_tx_eNB == 2) { if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_1_5MHz_2A_TDD_t; format2_size_bits = sizeof_DCI2_1_5MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_2A_TDD_t); format2_size_bytes = sizeof(DCI2_1_5MHz_2A_TDD_t);
format2A_size_bits = sizeof_DCI2A_1_5MHz_2A_TDD_t; format2A_size_bits = sizeof_DCI2A_1_5MHz_2A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_1_5MHz_2A_TDD_t); format2A_size_bytes = sizeof(DCI2A_1_5MHz_2A_TDD_t);
} else if (frame_parms->nb_antennas_tx_eNB == 4) { } else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_1_5MHz_4A_TDD_t; format2_size_bits = sizeof_DCI2_1_5MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_4A_TDD_t); format2_size_bytes = sizeof(DCI2_1_5MHz_4A_TDD_t);
format2A_size_bits = sizeof_DCI2A_1_5MHz_4A_TDD_t; format2A_size_bits = sizeof_DCI2A_1_5MHz_4A_TDD_t;
...@@ -2841,12 +2841,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue, ...@@ -2841,12 +2841,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format1_size_bits = sizeof_DCI1_1_5MHz_FDD_t; format1_size_bits = sizeof_DCI1_1_5MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_1_5MHz_FDD_t); format1_size_bytes = sizeof(DCI1_1_5MHz_FDD_t);
if (frame_parms->nb_antennas_tx_eNB == 2) { if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_1_5MHz_2A_FDD_t; format2_size_bits = sizeof_DCI2_1_5MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_2A_FDD_t); format2_size_bytes = sizeof(DCI2_1_5MHz_2A_FDD_t);
format2A_size_bits = sizeof_DCI2A_1_5MHz_2A_FDD_t; format2A_size_bits = sizeof_DCI2A_1_5MHz_2A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_1_5MHz_2A_FDD_t); format2A_size_bytes = sizeof(DCI2A_1_5MHz_2A_FDD_t);
} else if (frame_parms->nb_antennas_tx_eNB == 4) { } else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_1_5MHz_4A_FDD_t; format2_size_bits = sizeof_DCI2_1_5MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_1_5MHz_4A_FDD_t); format2_size_bytes = sizeof(DCI2_1_5MHz_4A_FDD_t);
format2A_size_bits = sizeof_DCI2A_1_5MHz_4A_FDD_t; format2A_size_bits = sizeof_DCI2A_1_5MHz_4A_FDD_t;
...@@ -2868,12 +2868,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue, ...@@ -2868,12 +2868,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format1_size_bits = sizeof_DCI1_5MHz_TDD_t; format1_size_bits = sizeof_DCI1_5MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_5MHz_TDD_t); format1_size_bytes = sizeof(DCI1_5MHz_TDD_t);
if (frame_parms->nb_antennas_tx_eNB == 2) { if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_5MHz_2A_TDD_t; format2_size_bits = sizeof_DCI2_5MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_2A_TDD_t); format2_size_bytes = sizeof(DCI2_5MHz_2A_TDD_t);
format2A_size_bits = sizeof_DCI2A_5MHz_2A_TDD_t; format2A_size_bits = sizeof_DCI2A_5MHz_2A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_5MHz_2A_TDD_t); format2A_size_bytes = sizeof(DCI2A_5MHz_2A_TDD_t);
} else if (frame_parms->nb_antennas_tx_eNB == 4) { } else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_5MHz_4A_TDD_t; format2_size_bits = sizeof_DCI2_5MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_4A_TDD_t); format2_size_bytes = sizeof(DCI2_5MHz_4A_TDD_t);
format2A_size_bits = sizeof_DCI2A_5MHz_4A_TDD_t; format2A_size_bits = sizeof_DCI2A_5MHz_4A_TDD_t;
...@@ -2889,12 +2889,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue, ...@@ -2889,12 +2889,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format1_size_bits = sizeof_DCI1_5MHz_FDD_t; format1_size_bits = sizeof_DCI1_5MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_5MHz_FDD_t); format1_size_bytes = sizeof(DCI1_5MHz_FDD_t);
if (frame_parms->nb_antennas_tx_eNB == 2) { if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_5MHz_2A_FDD_t; format2_size_bits = sizeof_DCI2_5MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_2A_FDD_t); format2_size_bytes = sizeof(DCI2_5MHz_2A_FDD_t);
format2A_size_bits = sizeof_DCI2A_5MHz_2A_FDD_t; format2A_size_bits = sizeof_DCI2A_5MHz_2A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_5MHz_2A_FDD_t); format2A_size_bytes = sizeof(DCI2A_5MHz_2A_FDD_t);
} else if (frame_parms->nb_antennas_tx_eNB == 4) { } else if (frame_parms->nb_antenna_ports_eNB == 4) {
format2_size_bits = sizeof_DCI2_5MHz_4A_FDD_t; format2_size_bits = sizeof_DCI2_5MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_5MHz_4A_FDD_t); format2_size_bytes = sizeof(DCI2_5MHz_4A_FDD_t);
format2A_size_bits = sizeof_DCI2A_5MHz_4A_FDD_t; format2A_size_bits = sizeof_DCI2A_5MHz_4A_FDD_t;
...@@ -2915,12 +2915,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue, ...@@ -2915,12 +2915,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format1_size_bits = sizeof_DCI1_10MHz_TDD_t; format1_size_bits = sizeof_DCI1_10MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_10MHz_TDD_t); format1_size_bytes = sizeof(DCI1_10MHz_TDD_t);
if (frame_parms->nb_antennas_tx_eNB == 2) { if (frame_parms->