Commit ed83cbd1 authored by Xiwen JIANG's avatar Xiwen JIANG

TM7 dlsim works

parent 0d681a0e
......@@ -119,6 +119,7 @@ endmacro(add_list_string_option)
####################################################
# compilation flags
#############################################
set(CMAKE_BUILD_TYPE "Debug")
if (CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()
......@@ -406,7 +407,7 @@ include_directories ("${X2AP_DIR}")
# Hardware dependant options
###################################
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_list2_option(RF_BOARD "EXMIMO" "RF head type" "False" "EXMIMO" "OAI_USRP" "ETHERNET" "OAI_BLADERF" "CPRIGW")
......@@ -819,6 +820,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.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/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
......
......@@ -11,8 +11,8 @@ CFLAGS += -Wall -g -ggdb -Wstrict-prototypes -fno-strict-aliasing
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)
CFLAGS += -O2
CFLAGS += -funroll-loops
#CFLAGS += -O2
#CFLAGS += -funroll-loops
CFLAGS += -Wno-packed-bitfield-compat
# This is the minimum CPU faetures for OAI
......
......@@ -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->Ncp = Ncp;
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_duration = phich_config->phich_duration;
}
......@@ -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->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.
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.
#ifndef USER_MODE
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,
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(frame_parms->nb_antennas_tx*sizeof(int32_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++) {
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
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->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
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->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<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
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,
// do ifft of channel estimate
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])
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);
......
......@@ -453,7 +453,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue,
// signal measurements
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 (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] =
(signal_energy_nodc(&phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0],
(N_RB_DL*12)));
......
......@@ -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;
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 cyclic_shift;
......@@ -678,7 +678,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
int T_SFC,aa;
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
char fname[40], vname[40];
#endif
......
......@@ -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
if ((lprime == 0)||
((lprime==1)&&(frame_parms->nb_antennas_tx_eNB == 4)))
((lprime==1)&&(frame_parms->nb_antenna_ports_eNB == 4)))
mprime = kprime/6;
else
mprime = kprime>>2;
......@@ -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++) {
//printf("col %d, index %d, row %d\n",col,index,row);
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);
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
// permutation
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];
//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
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!!!!
} else { // no pilots in this symbol
kprime_mod12 = kprime%12;
......@@ -655,7 +655,7 @@ void pdcch_channel_level(int32_t **dl_ch_estimates_ext,
int16x8_t *dl_ch128;
int32x4_t *avg128P;
#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++) {
//clear average level
#if defined(__x86_64__) || defined(__i386__)
......@@ -833,7 +833,7 @@ void pdcch_detection_mrc_i(LTE_DL_FRAME_PARMS *frame_parms,
int32_t i;
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 defined(__x86_64__) || defined(__i386__)
......@@ -1396,8 +1396,8 @@ void pdcch_channel_compensation(int32_t **rxdataF_ext,
if (symbol==0)
pilots=1;
for (aatx=0; aatx<frame_parms->nb_antennas_tx_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
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_antenna_ports_eNB
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
......@@ -1603,7 +1603,7 @@ void pdcch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
int32_t i;
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__)
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];
......@@ -1724,7 +1724,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
high_speed_flag,
frame_parms);
#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,
lte_ue_common_vars->dl_ch_estimates[eNB_id],
lte_ue_pdcch_vars[eNB_id]->rxdataF_ext,
......@@ -1750,7 +1750,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
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++)
avgs = cmax(avgs,avgP[(aarx<<1)+aatx]);
......@@ -1991,10 +1991,10 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci,
//if ((9*numCCE) <= (frame_parms->N_RB_DL*2))
if (numCCE <= get_nCCE(1, frame_parms, get_mi(frame_parms, subframe)))
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)))
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)))
return(cmax(3,nCCEmin));
else if (frame_parms->N_RB_DL<=10) {
......@@ -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(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);
} 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);
}
}
......@@ -2246,7 +2246,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
// Copy REG to TX buffer
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
kprime_mod12 = kprime%12;
......@@ -2258,7 +2258,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
if ((i!=(nushiftmod3))&&(i!=(nushiftmod3+3))) {
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];
#ifdef DEBUG_DCI_ENCODING
......@@ -2277,7 +2277,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
for (i=0; i<4; i++) {
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];
#ifdef DEBUG_DCI_ENCODING
......@@ -2288,7 +2288,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
} else {
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];
#ifdef DEBUG_DCI_ENCODING
......@@ -2297,7 +2297,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
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];
#ifdef DEBUG_DCI_ENCODING
......@@ -2306,7 +2306,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
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];
#ifdef DEBUG_DCI_ENCODING
......@@ -2316,7 +2316,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
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];
#ifdef DEBUG_DCI_ENCODING
......@@ -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_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_bytes = sizeof(DCI2_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);
} 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_bytes = sizeof(DCI2_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,
format1_size_bits = 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_bytes = sizeof(DCI2_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);
} 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_bytes = sizeof(DCI2_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,
format1_size_bits = 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_bytes = sizeof(DCI2_5MHz_2A_TDD_t);
format2A_size_bits = 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_bytes = sizeof(DCI2_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,
format1_size_bits = 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_bytes = sizeof(DCI2_5MHz_2A_FDD_t);
format2A_size_bits = 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_bytes = sizeof(DCI2_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,
format1_size_bits = sizeof_DCI1_10MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_10MHz_TDD_t);
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_10MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_2A_TDD_t);
format2A_size_bits = sizeof_DCI2A_10MHz_2A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_10MHz_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_10MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_4A_TDD_t);
format2A_size_bits = sizeof_DCI2A_10MHz_4A_TDD_t;
......@@ -2936,12 +2936,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format1_size_bits = sizeof_DCI1_10MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_10MHz_FDD_t);
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_10MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_2A_FDD_t);
format2A_size_bits = sizeof_DCI2A_10MHz_2A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_10MHz_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_10MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_10MHz_4A_FDD_t);
format2A_size_bits = sizeof_DCI2A_10MHz_4A_FDD_t;
......@@ -2962,12 +2962,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format1_size_bits = sizeof_DCI1_20MHz_TDD_t;
format1_size_bytes = sizeof(DCI1_20MHz_TDD_t);
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_20MHz_2A_TDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_2A_TDD_t);
format2A_size_bits = sizeof_DCI2A_20MHz_2A_TDD_t;
format2A_size_bytes = sizeof(DCI2A_20MHz_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_20MHz_4A_TDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_4A_TDD_t);
format2A_size_bits = sizeof_DCI2A_20MHz_4A_TDD_t;
......@@ -2983,12 +2983,12 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
format1_size_bits = sizeof_DCI1_20MHz_FDD_t;
format1_size_bytes = sizeof(DCI1_20MHz_FDD_t);
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
format2_size_bits = sizeof_DCI2_20MHz_2A_FDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_2A_FDD_t);
format2A_size_bits = sizeof_DCI2A_20MHz_2A_FDD_t;
format2A_size_bytes = sizeof(DCI2A_20MHz_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_20MHz_4A_FDD_t;
format2_size_bytes = sizeof(DCI2_20MHz_4A_FDD_t);
format2A_size_bits = sizeof_DCI2A_20MHz_4A_FDD_t;
......
......@@ -2662,7 +2662,7 @@ int generate_eNB_dlsch_params_from_dci(int frame,
// compute DL power control parameters
computeRhoA_eNB(pdsch_config_dedicated, dlsch[0],dlsch0_harq->dl_power_off);
computeRhoB_eNB(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antennas_tx_eNB,dlsch[0],dlsch0_harq->dl_power_off);
computeRhoB_eNB(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antenna_ports_eNB,dlsch[0],dlsch0_harq->dl_power_off);
return(0);
}
......@@ -3428,7 +3428,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci)
if ((frame_parms->frame_type == TDD) &&
(frame_parms->tdd_config>0)) {
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
switch(frame_parms->N_RB_DL) {
case 6:
LOG_D(PHY,"DCI format2A 2 antennas (FDD 1.5 MHz), rnti %x (%x): rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d\n",
......@@ -3507,7 +3507,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci)
DevParam (frame_parms->N_RB_DL, 0, 0);
break;
}
} else if (frame_parms->nb_antennas_tx_eNB == 4) {
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
switch(frame_parms->N_RB_DL) {
case 6:
LOG_D(PHY,"DCI format2A 4 antennas (TDD 1.5 MHz), rnti %x (%llx): rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, TPC %d, dai %d, tbswap %d, tpmi %d\n",
......@@ -3592,7 +3592,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci)
}
}
} else if (frame_parms->frame_type == FDD) {
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
switch(frame_parms->N_RB_DL) {
case 6:
LOG_D(PHY,"DCI format2A 2 antennas (FDD, 1.5 MHz), rnti %x (%x): rb_alloc %x, mcs1 %d, mcs2 %d, harq_pid %d, ndi1 %d, ndi2 %d, RV1 %d, RV2 %d, tb_swap %d, TPC %d\n",
......@@ -3666,7 +3666,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci)
DevParam (frame_parms->N_RB_DL, 0, 0);
break;
}
} else if (frame_parms->nb_antennas_tx_eNB == 4) {
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
switch(frame_parms->N_RB_DL) {
case 6:
......@@ -4467,7 +4467,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
switch (frame_parms->N_RB_DL) {
case 6:
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
if (frame_type == TDD) {
mcs1 = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2_1_5MHz_2A_TDD_t *)dci_pdu)->mcs2;
......@@ -4487,7 +4487,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
tbswap = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->tb_swap;
tpmi = ((DCI2_1_5MHz_2A_FDD_t *)dci_pdu)->tpmi;
}
} else if (frame_parms->nb_antennas_tx_eNB == 4) {
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
if (frame_type == TDD) {
mcs1 = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2_1_5MHz_4A_TDD_t *)dci_pdu)->mcs2;
......@@ -4508,13 +4508,13 @@ int generate_ue_dlsch_params_from_dci(int frame,
tpmi = ((DCI2_1_5MHz_4A_FDD_t *)dci_pdu)->tpmi;
}
} else {
LOG_E(PHY,"UE: subframe %d Format2 DCI: unsupported number of TX antennas %d\n",subframe,frame_parms->nb_antennas_tx_eNB);
LOG_E(PHY,"UE: subframe %d Format2 DCI: unsupported number of TX antennas %d\n",subframe,frame_parms->nb_antenna_ports_eNB);
}
break;
case 25:
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
if (frame_type == TDD) {
mcs1 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2_5MHz_2A_TDD_t *)dci_pdu)->mcs2;
......@@ -4536,7 +4536,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
tbswap = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tb_swap;
tpmi = ((DCI2_5MHz_2A_FDD_t *)dci_pdu)->tpmi;
}
} else if (frame_parms->nb_antennas_tx_eNB == 4) {
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
if (frame_type == TDD) {
mcs1 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2_5MHz_4A_TDD_t *)dci_pdu)->mcs2;
......@@ -4559,13 +4559,13 @@ int generate_ue_dlsch_params_from_dci(int frame,
tpmi = ((DCI2_5MHz_4A_FDD_t *)dci_pdu)->tpmi;
}
} else {
LOG_E(PHY,"UE: Format2 DCI: unsupported number of TX antennas %d\n",frame_parms->nb_antennas_tx_eNB);
LOG_E(PHY,"UE: Format2 DCI: unsupported number of TX antennas %d\n",frame_parms->nb_antenna_ports_eNB);
}
break;
case 50:
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
if (frame_type == TDD) {
mcs1 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2_10MHz_2A_TDD_t *)dci_pdu)->mcs2;
......@@ -4587,7 +4587,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
tbswap = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->tb_swap;
tpmi = ((DCI2_10MHz_2A_FDD_t *)dci_pdu)->tpmi;
}
} else if (frame_parms->nb_antennas_tx_eNB == 4) {
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
if (frame_type == TDD) {
mcs1 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2_10MHz_4A_TDD_t *)dci_pdu)->mcs2;
......@@ -4610,13 +4610,13 @@ int generate_ue_dlsch_params_from_dci(int frame,
tpmi = ((DCI2_10MHz_4A_FDD_t *)dci_pdu)->tpmi;
}
} else {
LOG_E(PHY,"UE: Format2A DCI: unsupported number of TX antennas %d\n",frame_parms->nb_antennas_tx_eNB);
LOG_E(PHY,"UE: Format2A DCI: unsupported number of TX antennas %d\n",frame_parms->nb_antenna_ports_eNB);
}
break;
case 100:
if (frame_parms->nb_antennas_tx_eNB == 2) {
if (frame_parms->nb_antenna_ports_eNB == 2) {
if (frame_type == TDD) {
mcs1 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2_20MHz_2A_TDD_t *)dci_pdu)->mcs2;
......@@ -4638,7 +4638,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
tbswap = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->tb_swap;
tpmi = ((DCI2_20MHz_2A_FDD_t *)dci_pdu)->tpmi;
}
} else if (frame_parms->nb_antennas_tx_eNB == 4) {
} else if (frame_parms->nb_antenna_ports_eNB == 4) {
if (frame_type == TDD) {
mcs1 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2_20MHz_4A_TDD_t *)dci_pdu)->mcs2;
......@@ -4661,7 +4661,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
tpmi = ((DCI2_20MHz_4A_FDD_t *)dci_pdu)->tpmi;
}
} else {
LOG_E(PHY,"UE: Format2A DCI: unsupported number of TX antennas %d\n",frame_parms->nb_antennas_tx_eNB);