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
......
This diff is collapsed.
This diff is collapsed.
...@@ -240,6 +240,8 @@ typedef struct { ...@@ -240,6 +240,8 @@ typedef struct {
typedef struct { typedef struct {
/// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding) /// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding)
uint32_t *txdataF[8]; uint32_t *txdataF[8];
/// beamforming weights for UE-spec transmission (antenna ports 5 or 7..14), for each codeword, maximum 4 layers?
uint32_t **ue_spec_bf_weights[4];
/// Allocated RNTI (0 means DLSCH_t is not currently used) /// Allocated RNTI (0 means DLSCH_t is not currently used)
uint16_t rnti; uint16_t rnti;
/// Active flag for baseband transmitter processing /// Active flag for baseband transmitter processing
......
...@@ -117,12 +117,13 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) ...@@ -117,12 +117,13 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
} }
LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigned char N_RB_DL, uint8_t abstraction_flag) LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigned char N_RB_DL, uint8_t abstraction_flag, LTE_DL_FRAME_PARMS* frame_parms)
{ {
LTE_eNB_DLSCH_t *dlsch; LTE_eNB_DLSCH_t *dlsch;
unsigned char exit_flag = 0,i,j,r; unsigned char exit_flag = 0,i,j,r,aa;
unsigned char bw_scaling =1; unsigned char bw_scaling =1;
uint8_t nb_antennas_tx = frame_parms->nb_antennas_tx;
switch (N_RB_DL) { switch (N_RB_DL) {
case 6: case 6:
...@@ -193,6 +194,15 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne ...@@ -193,6 +194,15 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
exit_flag=3; exit_flag=3;
} }
} }
for (i=0; i<4; i++) {
dlsch->ue_spec_bf_weights[i] = (int32_t **)malloc16(nb_antennas_tx*sizeof(int32_t*));
dlsch->ue_spec_bf_weights[i] = (int32_t **)malloc16(nb_antennas_tx*sizeof(int32_t*));
for (aa=0; aa<nb_antennas_tx; aa++) {
dlsch->ue_spec_bf_weights[i][aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
}
}
if (exit_flag==0) { if (exit_flag==0) {
for (i=0; i<Mdlharq; i++) { for (i=0; i<Mdlharq; i++) {
......
...@@ -163,7 +163,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -163,7 +163,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
else else
rballoc = dlsch0_harq->rb_alloc_even; rballoc = dlsch0_harq->rb_alloc_even;
if (frame_parms->nb_antennas_tx_eNB>1 && beamforming_mode==0) { if (frame_parms->nb_antenna_ports_eNB>1 && beamforming_mode==0) {
#ifdef DEBUG_DLSCH_MOD #ifdef DEBUG_DLSCH_MOD
LOG_I(PHY,"dlsch: using pmi %x (%p), rb_alloc %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),dlsch_ue[0],dlsch0_harq->rb_alloc_even[0]); LOG_I(PHY,"dlsch: using pmi %x (%p), rb_alloc %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),dlsch_ue[0],dlsch0_harq->rb_alloc_even[0]);
#endif #endif
...@@ -296,7 +296,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -296,7 +296,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
// in case of precoding we add an additional factor of two for the precoding gain // in case of precoding we add an additional factor of two for the precoding gain
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,avg[(aatx<<1)+aarx]); avgs = cmax(avgs,avg[(aatx<<1)+aarx]);
...@@ -304,7 +304,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -304,7 +304,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2); lte_ue_pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2);
// + log2_approx(frame_parms->nb_antennas_tx_eNB-1) //-1 because log2_approx counts the number of bits // + log2_approx(frame_parms->nb_antenna_ports_eNB-1) //-1 because log2_approx counts the number of bits
// + log2_approx(frame_parms->nb_antennas_rx-1); // + log2_approx(frame_parms->nb_antennas_rx-1);
if ((dlsch0_harq->mimo_mode>=UNIFORM_PRECODING11) && if ((dlsch0_harq->mimo_mode>=UNIFORM_PRECODING11) &&
...@@ -317,11 +317,11 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -317,11 +317,11 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
Nb_tx*Nb_rx in TM2,4,5 Nb_tx*Nb_rx in TM2,4,5
Nb_tx^2*Nb_rx in TM6 */ Nb_tx^2*Nb_rx in TM6 */
/* /*
K = frame_parms->nb_antennas_rx*frame_parms->nb_antennas_tx_eNB; //that also covers TM1 since Nb_tx=1 K = frame_parms->nb_antennas_rx*frame_parms->nb_antenna_ports_eNB; //that also covers TM1 since Nb_tx=1
if ((dlsch0_harq->mimo_mode>=UNIFORM_PRECODING11) && if ((dlsch0_harq->mimo_mode>=UNIFORM_PRECODING11) &&
(dlsch0_harq->mimo_mode< DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode< DUALSTREAM_UNIFORM_PRECODING1) &&
(dlsch0_harq->dl_power_off==1)) // we are in TM 6 (dlsch0_harq->dl_power_off==1)) // we are in TM 6
K *= frame_parms->nb_antennas_tx_eNB; K *= frame_parms->nb_antenna_ports_eNB;
lte_ue_pdsch_vars[eNB_id]->log2_maxh = (log2_approx(K*avgs)/2); lte_ue_pdsch_vars[eNB_id]->log2_maxh = (log2_approx(K*avgs)/2);
*/ */
...@@ -332,7 +332,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -332,7 +332,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
#endif #endif
} }
aatx = frame_parms->nb_antennas_tx_eNB; aatx = frame_parms->nb_antenna_ports_eNB;
aarx = frame_parms->nb_antennas_rx; aarx = frame_parms->nb_antennas_rx;
if (dlsch0_harq->mimo_mode<LARGE_CDD) {// SISO or ALAMOUTI if (dlsch0_harq->mimo_mode<LARGE_CDD) {// SISO or ALAMOUTI
...@@ -393,7 +393,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -393,7 +393,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
} }
} else if (dlsch0_harq->mimo_mode == LARGE_CDD) { // TM3 } else if (dlsch0_harq->mimo_mode == LARGE_CDD) { // TM3
// LOG_I(PHY,"Running PDSCH RX for TM3\n"); // LOG_I(PHY,"Running PDSCH RX for TM3\n");
if (frame_parms->nb_antennas_tx_eNB == 2) { if (frame_parms->nb_antenna_ports_eNB == 2) {
if (first_symbol_flag==1) { if (first_symbol_flag==1) {
// effective channel of desired user is always stronger than interfering eff. channel // effective channel of desired user is always stronger than interfering eff. channel
dlsch_channel_level_TM3(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext, dlsch_channel_level_TM3(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
...@@ -573,7 +573,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -573,7 +573,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
// printf("MRC\n"); // printf("MRC\n");
if (frame_parms->nb_antennas_rx > 1) { if (frame_parms->nb_antennas_rx > 1) {
if (dlsch0_harq->mimo_mode == LARGE_CDD) { if (dlsch0_harq->mimo_mode == LARGE_CDD) {
if (frame_parms->nb_antennas_tx_eNB == 2) { if (frame_parms->nb_antenna_ports_eNB == 2) {
dlsch_detection_mrc(frame_parms, dlsch_detection_mrc(frame_parms,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[dlsch0_harq->round], lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[dlsch0_harq->round],
...@@ -870,7 +870,7 @@ void dlsch_channel_compensation(int **rxdataF_ext, ...@@ -870,7 +870,7 @@ void dlsch_channel_compensation(int **rxdataF_ext,
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 (mod_order == 4) { if (mod_order == 4) {
QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10) QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10)
QAM_amp128b = _mm_setzero_si128(); QAM_amp128b = _mm_setzero_si128();
...@@ -1130,7 +1130,7 @@ void dlsch_channel_compensation(int **rxdataF_ext, ...@@ -1130,7 +1130,7 @@ void dlsch_channel_compensation(int **rxdataF_ext,
} }
} }
for (aatx=0; aatx<frame_parms->nb_antennas_tx_eNB; aatx++) { for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
if (mod_order == 4) { if (mod_order == 4) {
QAM_amp128 = vmovq_n_s16(QAM16_n1); // 2/sqrt(10) QAM_amp128 = vmovq_n_s16(QAM16_n1); // 2/sqrt(10)
QAM_amp128b = vmovq_n_s16(0); QAM_amp128b = vmovq_n_s16(0);
...@@ -2643,7 +2643,7 @@ void dlsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -2643,7 +2643,7 @@ void dlsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
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++) {
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];
...@@ -2703,7 +2703,7 @@ void dlsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -2703,7 +2703,7 @@ void dlsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
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++) {
rxdataF_comp128_0 = (int16x8_t *)&rxdataF_comp[(aatx<<1)][symbol*frame_parms->N_RB_DL*12]; rxdataF_comp128_0 = (int16x8_t *)&rxdataF_comp[(aatx<<1)][symbol*frame_parms->N_RB_DL*12];
rxdataF_comp128_1 = (int16x8_t *)&rxdataF_comp[(aatx<<1)+1][symbol*frame_parms->N_RB_DL*12]; rxdataF_comp128_1 = (int16x8_t *)&rxdataF_comp[(aatx<<1)+1][symbol*frame_parms->N_RB_DL*12];
...@@ -2785,7 +2785,7 @@ void dlsch_scale_channel(int **dl_ch_estimates_ext, ...@@ -2785,7 +2785,7 @@ void dlsch_scale_channel(int **dl_ch_estimates_ext,
ch_amp128 = _mm_set1_epi16(ch_amp); // Q3.13 ch_amp128 = _mm_set1_epi16(ch_amp); // Q3.13
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++) {
dl_ch128=(__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*frame_parms->N_RB_DL*12]; dl_ch128=(__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*frame_parms->N_RB_DL*12];
...@@ -2829,7 +2829,7 @@ void dlsch_channel_level(int **dl_ch_estimates_ext, ...@@ -2829,7 +2829,7 @@ void dlsch_channel_level(int **dl_ch_estimates_ext,
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
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
avg128D = _mm_setzero_si128(); avg128D = _mm_setzero_si128();
...@@ -2886,7 +2886,7 @@ void dlsch_channel_level(int **dl_ch_estimates_ext, ...@@ -2886,7 +2886,7 @@ void dlsch_channel_level(int **dl_ch_estimates_ext,
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
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
avg128D = vdupq_n_s32(0); avg128D = vdupq_n_s32(0);
...@@ -3119,7 +3119,7 @@ void dlsch_channel_level_TM7(int **dl_bf_ch_estimates_ext, ...@@ -3119,7 +3119,7 @@ void dlsch_channel_level_TM7(int **dl_bf_ch_estimates_ext,
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
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
avg128D = _mm_setzero_si128(); avg128D = _mm_setzero_si128();
...@@ -4931,7 +4931,7 @@ void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint16_t coded_bits_per ...@@ -4931,7 +4931,7 @@ void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint16_t coded_bits_per
write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
} }
if (phy_vars_ue->lte_frame_parms.nb_antennas_tx_eNB == 2) { if (phy_vars_ue->lte_frame_parms.nb_antenna_ports_eNB == 2) {
sprintf(fname,"dlsch%d_ch_r%d_ext10.m",eNB_id,round); sprintf(fname,"dlsch%d_ch_r%d_ext10.m",eNB_id,round);
sprintf(vname,"dl%d_ch_r%d_ext10",eNB_id,round); sprintf(vname,"dl%d_ch_r%d_ext10",eNB_id,round);
write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
...@@ -4959,7 +4959,7 @@ void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint16_t coded_bits_per ...@@ -4959,7 +4959,7 @@ void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint16_t coded_bits_per
sprintf(fname,"dlsch%d_rxF_r%d_comp0.m",eNB_id,round); sprintf(fname,"dlsch%d_rxF_r%d_comp0.m",eNB_id,round);
sprintf(vname,"dl%d_rxF_r%d_comp0",eNB_id,round); sprintf(vname,"dl%d_rxF_r%d_comp0",eNB_id,round);
write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1);
if (phy_vars_ue->lte_frame_parms.nb_antennas_tx_eNB == 2) { if (phy_vars_ue->lte_frame_parms.nb_antenna_ports_eNB == 2) {
sprintf(fname,"dlsch%d_rxF_r%d_comp1.m",eNB_id,round); sprintf(fname,"dlsch%d_rxF_r%d_comp1.m",eNB_id,round);
sprintf(vname,"dl%d_rxF_r%d_comp1",eNB_id,round); sprintf(vname,"dl%d_rxF_r%d_comp1",eNB_id,round);
write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[0][round],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[0][round],12*N_RB_DL*nsymb,1,1);
......
...@@ -163,7 +163,7 @@ char phich_resource[6]; ...@@ -163,7 +163,7 @@ char phich_resource[6];
if (pbch_decoded) { if (pbch_decoded) {
frame_parms->nb_antennas_tx_eNB = pbch_tx_ant; frame_parms->nb_antenna_ports_eNB = pbch_tx_ant;
// set initial transmission mode to 1 or 2 depending on number of detected TX antennas // set initial transmission mode to 1 or 2 depending on number of detected TX antennas
frame_parms->mode1_flag = (pbch_tx_ant==1); frame_parms->mode1_flag = (pbch_tx_ant==1);
...@@ -566,7 +566,7 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode) ...@@ -566,7 +566,7 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode)
phy_vars_ue->lte_frame_parms.N_RB_DL, phy_vars_ue->lte_frame_parms.N_RB_DL,
phy_vars_ue->lte_frame_parms.phich_config_common.phich_duration, phy_vars_ue->lte_frame_parms.phich_config_common.phich_duration,
phich_string[phy_vars_ue->lte_frame_parms.phich_config_common.phich_resource], phich_string[phy_vars_ue->lte_frame_parms.phich_config_common.phich_resource],
phy_vars_ue->lte_frame_parms.nb_antennas_tx_eNB); phy_vars_ue->lte_frame_parms.nb_antenna_ports_eNB);
#if defined(OAI_USRP) || defined(EXMIMO) #if defined(OAI_USRP) || defined(EXMIMO)
LOG_I(PHY,"[UE %d] Frame %d Measured Carrier Frequency %.0f Hz (offset %d Hz)\n", LOG_I(PHY,"[UE %d] Frame %d Measured Carrier Frequency %.0f Hz (offset %d Hz)\n",
phy_vars_ue->Mod_id, phy_vars_ue->Mod_id,
......
...@@ -200,7 +200,7 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, ...@@ -200,7 +200,7 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
/* /*
// scramble crc with PBCH CRC mask (Table 5.3.1.1-1 of 3GPP 36.212-860) // scramble crc with PBCH CRC mask (Table 5.3.1.1-1 of 3GPP 36.212-860)
switch (frame_parms->nb_antennas_tx_eNB) { switch (frame_parms->nb_antenna_ports_eNB) {
case 1: case 1:
crc = crc ^ (uint16_t) 0; crc = crc ^ (uint16_t) 0;
break; break;
...@@ -232,7 +232,7 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, ...@@ -232,7 +232,7 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
if (frame_parms->mode1_flag == 1) if (frame_parms->mode1_flag == 1)
amask = 0x0000; amask = 0x0000;
else { else {
switch (frame_parms->nb_antennas_tx_eNB) { switch (frame_parms->nb_antenna_ports_eNB) {
case 1: case 1:
amask = 0x0000; amask = 0x0000;
break; break;
...@@ -492,7 +492,7 @@ uint16_t pbch_extract(int **rxdataF, ...@@ -492,7 +492,7 @@ uint16_t pbch_extract(int **rxdataF,
} }
} }
for (aatx=0; aatx<4; aatx++) { //frame_parms->nb_antennas_tx_eNB;aatx++) { for (aatx=0; aatx<4; aatx++) { //frame_parms->nb_antenna_ports_eNB;aatx++) {
if (high_speed_flag == 1) if (high_speed_flag == 1)
dl_ch0 = &dl_ch_estimates[(aatx<<1)+aarx][LTE_CE_OFFSET+ch_offset+(symbol*(frame_parms->ofdm_symbol_size))]; dl_ch0 = &dl_ch_estimates[(aatx<<1)+aarx][LTE_CE_OFFSET+ch_offset+(symbol*(frame_parms->ofdm_symbol_size))];
else else
...@@ -554,7 +554,7 @@ int pbch_channel_level(int **dl_ch_estimates_ext, ...@@ -554,7 +554,7 @@ int pbch_channel_level(int **dl_ch_estimates_ext,
uint32_t nsymb = (frame_parms->Ncp==0) ? 7:6; uint32_t nsymb = (frame_parms->Ncp==0) ? 7:6;
uint32_t symbol_mod = symbol % nsymb; uint32_t symbol_mod = symbol % nsymb;
for (aatx=0; aatx<4; aatx++) //frame_parms->nb_antennas_tx_eNB;aatx++) for (aatx=0; aatx<4; 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
...@@ -624,7 +624,7 @@ void pbch_channel_compensation(int **rxdataF_ext, ...@@ -624,7 +624,7 @@ void pbch_channel_compensation(int **rxdataF_ext,
#endif #endif
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
for (aatx=0; aatx<4; aatx++) //frame_parms->nb_antennas_tx_eNB;aatx++) for (aatx=0; aatx<4; 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++) {
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
...@@ -731,7 +731,7 @@ void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -731,7 +731,7 @@ void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
if (frame_parms->nb_antennas_rx>1) { if (frame_parms->nb_antennas_rx>1) {
for (aatx=0; aatx<4; aatx++) { //frame_parms->nb_antennas_tx_eNB;aatx++) { for (aatx=0; aatx<4; 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_mod*6*12]; rxdataF_comp128_0 = (__m128i *)&rxdataF_comp[(aatx<<1)][symbol_mod*6*12];
rxdataF_comp128_1 = (__m128i *)&rxdataF_comp[(aatx<<1)+1][symbol_mod*6*12]; rxdataF_comp128_1 = (__m128i *)&rxdataF_comp[(aatx<<1)+1][symbol_mod*6*12];
...@@ -1077,7 +1077,7 @@ uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -1077,7 +1077,7 @@ uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue,
if (pbch_phase == (phy_vars_ue->frame_rx % 4)) { if (pbch_phase == (phy_vars_ue->frame_rx % 4)) {
if (uniformrandom() >= bler) { if (uniformrandom() >= bler) {
memcpy(phy_vars_ue->lte_ue_pbch_vars[eNB_id]->decoded_output,PHY_vars_eNB_g[eNB_id][CC_id]->pbch_pdu,PBCH_PDU_SIZE); memcpy(phy_vars_ue->lte_ue_pbch_vars[eNB_id]->decoded_output,PHY_vars_eNB_g[eNB_id][CC_id]->pbch_pdu,PBCH_PDU_SIZE);
return(PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.nb_antennas_tx_eNB); return(PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.nb_antenna_ports_eNB);
} else } else
return(-1); return(-1);
} else } else
......
...@@ -217,7 +217,7 @@ void generate_pcfich(uint8_t num_pdcch_symbols, ...@@ -217,7 +217,7 @@ void generate_pcfich(uint8_t num_pdcch_symbols,
if ((i!=nushiftmod3)&&(i!=(nushiftmod3+3))) { if ((i!=nushiftmod3)&&(i!=(nushiftmod3+3))) {
txdataF[0][symbol_offset+reg_offset+i] = pcfich_d[0][m]; txdataF[0][symbol_offset+reg_offset+i] = pcfich_d[0][m];
if (frame_parms->nb_antennas_tx_eNB>1) if (frame_parms->nb_antenna_ports_eNB>1)
txdataF[1][symbol_offset+reg_offset+i] = pcfich_d[1][m]; txdataF[1][symbol_offset+reg_offset+i] = pcfich_d[1][m];
m++; m++;
......
...@@ -70,7 +70,7 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB, ...@@ -70,7 +70,7 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB,
// printf("tti %d : offset %d (slot %d)\n",tti,tti_offset,slot_offset); // printf("tti %d : offset %d (slot %d)\n",tti,tti_offset,slot_offset);
//Generate Pilots //Generate Pilots
//antenna 0 symbol 0 slot 0 //antenna port 0 symbol 0 slot 0
lte_dl_cell_spec(phy_vars_eNB,&txdataF[0][tti_offset], lte_dl_cell_spec(phy_vars_eNB,&txdataF[0][tti_offset],
amp, amp,
slot_offset, slot_offset,
...@@ -79,7 +79,7 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB, ...@@ -79,7 +79,7 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB,
// printf("tti %d : second_pilot offset %d \n",tti,tti_offset+(second_pilot*samples_per_symbol)); // printf("tti %d : second_pilot offset %d \n",tti,tti_offset+(second_pilot*samples_per_symbol));
//antenna 0 symbol 3/4 slot 0 //antenna port 0 symbol 3/4 slot 0
lte_dl_cell_spec(phy_vars_eNB,&txdataF[0][tti_offset+(second_pilot*samples_per_symbol)], lte_dl_cell_spec(phy_vars_eNB,&txdataF[0][tti_offset+(second_pilot*samples_per_symbol)],
amp, amp,
slot_offset, slot_offset,
...@@ -87,7 +87,7 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB, ...@@ -87,7 +87,7 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB,
0); 0);
// printf("tti %d : third_pilot offset %d \n",tti,tti_offset+((Nsymb>>1)*samples_per_symbol)); // printf("tti %d : third_pilot offset %d \n",tti,tti_offset+((Nsymb>>1)*samples_per_symbol));
//antenna 0 symbol 0 slot 1 //antenna port 0 symbol 0 slot 1
lte_dl_cell_spec(phy_vars_eNB,&txdataF[0][tti_offset+((Nsymb>>1)*samples_per_symbol)], lte_dl_cell_spec(phy_vars_eNB,&txdataF[0][tti_offset+((Nsymb>>1)*samples_per_symbol)],
amp, amp,
1+slot_offset, 1+slot_offset,
...@@ -95,7 +95,7 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB, ...@@ -95,7 +95,7 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB,
0); 0);
// printf("tti %d : third_pilot offset %d \n",tti,tti_offset+(((Nsymb>>1)+second_pilot)*samples_per_symbol)); // printf("tti %d : third_pilot offset %d \n",tti,tti_offset+(((Nsymb>>1)+second_pilot)*samples_per_symbol));
//antenna 0 symbol 3/4 slot 1 //antenna port 0 symbol 3/4 slot 1
lte_dl_cell_spec(phy_vars_eNB,&txdataF[0][tti_offset+(((Nsymb>>1)+second_pilot)*samples_per_symbol)], lte_dl_cell_spec(phy_vars_eNB,&txdataF[0][tti_offset+(((Nsymb>>1)+second_pilot)*samples_per_symbol)],
amp, amp,
1+slot_offset, 1+slot_offset,
...@@ -103,66 +103,35 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB, ...@@ -103,66 +103,35 @@ void generate_pilots(PHY_VARS_eNB *phy_vars_eNB,
0); 0);
if (frame_parms->nb_antennas_tx > 1) { if (frame_parms->nb_antenna_ports_eNB > 1) {
if (frame_parms->mode1_flag) {
// antenna 1 symbol 0 slot 0
lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset],
amp,
slot_offset,
0,
0);
// antenna 1 symbol 3 slot 0
lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset+(second_pilot*samples_per_symbol)],
amp,
slot_offset,
1,
0);
//antenna 1 symbol 0 slot 1 // antenna port 1 symbol 0 slot 0
lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset+(Nsymb>>1)*samples_per_symbol],
amp,
1+slot_offset,
0,
0);
// antenna 1 symbol 3 slot 1
lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset+(((Nsymb>>1)+second_pilot)*samples_per_symbol)],
amp,
1+slot_offset,
1,
0);
} else {
// antenna 1 symbol 0 slot 0
lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset], lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset],
amp, amp,
slot_offset, slot_offset,
0, 0,
1); 1);
// antenna 1 symbol 3 slot 0 // antenna port 1 symbol 3 slot 0
lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset+(second_pilot*samples_per_symbol)], lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset+(second_pilot*samples_per_symbol)],
amp, amp,
slot_offset, slot_offset,
1, 1,
1); 1);
//antenna 1 symbol 0 slot 1 //antenna port 1 symbol 0 slot 1
lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset+(Nsymb>>1)*samples_per_symbol], lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset+(Nsymb>>1)*samples_per_symbol],
amp, amp,
1+slot_offset, 1+slot_offset,
0, 0,
1); 1);
// antenna 1 symbol 3 slot 1 // antenna port 1 symbol 3 slot 1
lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset+(((Nsymb>>1)+second_pilot)*samples_per_symbol)], lte_dl_cell_spec(phy_vars_eNB,&txdataF[1][tti_offset+(((Nsymb>>1)+second_pilot)*samples_per_symbol)],
amp, amp,
1+slot_offset, 1+slot_offset,
1, 1,
1); 1);
}
} }
} }
} }
...@@ -193,7 +162,7 @@ int generate_pilots_slot(PHY_VARS_eNB *phy_vars_eNB, ...@@ -193,7 +162,7 @@ int generate_pilots_slot(PHY_VARS_eNB *phy_vars_eNB,
// printf("tti %d : offset %d (slot %d)\n",tti,tti_offset,slot_offset); // printf("tti %d : offset %d (slot %d)\n",tti,tti_offset,slot_offset);
//Generate Pilots //Generate Pilots
//antenna 0 symbol 0 slot 0 //antenna port 0 symbol 0 slot 0
lte_dl_cell_spec(phy_vars_eNB, lte_dl_cell_spec(phy_vars_eNB,
&txdataF[0][slot_offset], &txdataF[0][slot_offset],
amp, amp,
...@@ -212,44 +181,24 @@ int generate_pilots_slot(PHY_VARS_eNB *phy_vars_eNB, ...@@ -212,44 +181,24 @@ int generate_pilots_slot(PHY_VARS_eNB *phy_vars_eNB,
0); 0);
} }
if (frame_parms->nb_antennas_tx > 1) { if (frame_parms->nb_antenna_ports_eNB > 1) {
if (frame_parms->mode1_flag) {
// antenna 1 symbol 0 slot 0
lte_dl_cell_spec(phy_vars_eNB,
&txdataF[1][slot_offset],
amp,
slot,
0,
0);
if (first_pilot_only==0) { // antenna port 1 symbol 0 slot 0
// antenna 1 symbol 3 slot 0 lte_dl_cell_spec(phy_vars_eNB,
lte_dl_cell_spec(phy_vars_eNB, &txdataF[1][slot_offset],
&txdataF[1][slot_offset+(second_pilot*samples_per_symbol)], amp,
amp, slot,
slot, 0,
1, 1);
0);
}
} else {
// antenna 1 symbol 0 slot 0 if (first_pilot_only == 0) {
// antenna port 1 symbol 3 slot 0
lte_dl_cell_spec(phy_vars_eNB, lte_dl_cell_spec(phy_vars_eNB,
&txdataF[1][slot_offset], &txdataF[1][slot_offset+(second_pilot*samples_per_symbol)],
amp, amp,
slot, slot,
0, 1,
1); 1);
if (first_pilot_only == 0) {
// antenna 1 symbol 3 slot 0
lte_dl_cell_spec(phy_vars_eNB,
&txdataF[1][slot_offset+(second_pilot*samples_per_symbol)],
amp,
slot,
1,
1);
}
} }
} }
......
...@@ -63,8 +63,10 @@ void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch, uint8_t abstraction_flag); ...@@ -63,8 +63,10 @@ void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch, uint8_t abstraction_flag);
@param Mdlharq Maximum number of HARQ rounds (36-212/36-213) @param Mdlharq Maximum number of HARQ rounds (36-212/36-213)
@params N_RB_DL total number of resource blocks (determine the operating BW) @params N_RB_DL total number of resource blocks (determine the operating BW)
@param abstraction_flag Flag to indicate abstracted interface @param abstraction_flag Flag to indicate abstracted interface
@param nb_antenna_tx number of physical transmit antennas at eNB
*/ */
LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t N_RB_DL, uint8_t abstraction_flag); LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t
N_RB_DL, uint8_t abstraction_flag, LTE_DL_FRAME_PARMS* frame_parms);
/** \fn free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) /** \fn free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
\brief This function frees memory allocated for a particular DLSCH at UE \brief This function frees memory allocated for a particular DLSCH at UE
...@@ -157,7 +159,6 @@ void dlsch_encoding_emul(PHY_VARS_eNB *phy_vars_eNB, ...@@ -157,7 +159,6 @@ void dlsch_encoding_emul(PHY_VARS_eNB *phy_vars_eNB,
\param skip_half indicate that first or second half of RB must be skipped for PBCH/PSS/SSS \param skip_half indicate that first or second half of RB must be skipped for PBCH/PSS/SSS
\param ue_spec_rs UE specific RS indicator \param ue_spec_rs UE specific RS indicator
\param nb_antennas_tx_phy Physical antenna elements which can be different with antenna port number, especially in beamforming case \param nb_antennas_tx_phy Physical antenna elements which can be different with antenna port number, especially in beamforming case
\param beamforming_weights_rb Beamforming weights applied on each antenna element and each carrier in case of TM7-10
\param use2ndpilots Set to use the pilots from antenna port 1 for PDSCH \param use2ndpilots Set to use the pilots from antenna port 1 for PDSCH
\param frame_parms Frame parameter descriptor \param frame_parms Frame parameter descriptor
*/ */
...@@ -168,8 +169,8 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -168,8 +169,8 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
uint32_t *jj2, uint32_t *jj2,
uint16_t re_offset, uint16_t re_offset,
uint32_t symbol_offset, uint32_t symbol_offset,
LTE_DL_eNB_HARQ_t *dlsch0_harq, LTE_eNB_DLSCH_t *dlsch0,
LTE_DL_eNB_HARQ_t *dlsch1_harq, LTE_eNB_DLSCH_t *dlsch1,
uint8_t pilots, uint8_t pilots,
int16_t amp, int16_t amp,
uint8_t precoder_index, uint8_t precoder_index,
...@@ -178,10 +179,9 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -178,10 +179,9 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
uint32_t *re_allocated, uint32_t *re_allocated,
uint8_t skip_dc, uint8_t skip_dc,
uint8_t skip_half, uint8_t skip_half,
uint8_t lprime, uint8_t lprime,
uint8_t mprime, uint8_t mprime,
uint8_t Ns, uint8_t Ns);
int32_t **beamforming_weights);
/** \fn int32_t dlsch_modulation(mod_sym_t **txdataF, /** \fn int32_t dlsch_modulation(mod_sym_t **txdataF,
int16_t amp, int16_t amp,
...@@ -198,8 +198,6 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -198,8 +198,6 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
@param num_pdcch_symbols Number of PDCCH symbols in this subframe @param num_pdcch_symbols Number of PDCCH symbols in this subframe
@param dlsch0 Pointer to Transport Block 0 DLSCH descriptor for this allocation @param dlsch0 Pointer to Transport Block 0 DLSCH descriptor for this allocation
@param dlsch1 Pointer to Transport Block 0 DLSCH descriptor for this allocation @param dlsch1 Pointer to Transport Block 0 DLSCH descriptor for this allocation
@param nb_antennas_tx_phy Physical antenna elements which can be different with antenna port number, especially in beamforming case
@param beamforming_weights Beamforming weights applied on each antenna element and each carrier in case of TM7-10
*/ */
int32_t dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, int32_t dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
mod_sym_t **txdataF, mod_sym_t **txdataF,
...@@ -207,8 +205,7 @@ int32_t dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -207,8 +205,7 @@ int32_t dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
uint32_t sub_frame_offset, uint32_t sub_frame_offset,
uint8_t num_pdcch_symbols, uint8_t num_pdcch_symbols,
LTE_eNB_DLSCH_t *dlsch0, LTE_eNB_DLSCH_t *dlsch0,
LTE_eNB_DLSCH_t *dlsch1, LTE_eNB_DLSCH_t *dlsch1);
int32_t **beamforming_weights);
/* /*
\brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH. \brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH.
@param txdataF Table of pointers for frequency-domain TX signals @param txdataF Table of pointers for frequency-domain TX signals
...@@ -331,6 +328,41 @@ int32_t generate_pbch(LTE_eNB_PBCH *eNB_pbch, ...@@ -331,6 +328,41 @@ int32_t generate_pbch(LTE_eNB_PBCH *eNB_pbch,
int32_t generate_pbch_emul(PHY_VARS_eNB *phy_vars_eNB,uint8_t *pbch_pdu); int32_t generate_pbch_emul(PHY_VARS_eNB *phy_vars_eNB,uint8_t *pbch_pdu);
/** \brief This function performs UE specific beamforming especially for
* transmission mode TM7-10
@param txdataF Table of pointers for frequency-domain TX signals
@param txdataF_BF Table of pointers for frequency-domain TX signals
after beamforming
@param frame_parms Frame descriptor structure
@param ue_spec_bf_weights UE specific beamforming weights applied on
each antenna element and each carrier
@param slot Slot number
@param symbol Symbol index on which to act*/
int ue_spec_beamforming(int32_t **txdataF,
int32_t **txdataF_BF,
LTE_DL_FRAME_PARMS *frame_parms,
int32_t ***ue_spec_bf_weights,
int slot,
int symbol);
/** \brief This function performs cell specific beamforming for common
* data
@param txdataF Table of pointers for frequency-domain TX signals
@param txdataF_BF Table of pointers for frequency-domain TX signals
@param frame_parms Frame descriptor structure
after beamforming
@param cell_spec_bf_weights Common beamforming weights applied on each
antenna element and each carrier
@param slot Slot number
@param symbol Symbol index on which to act*/
int cell_spec_beamforming(int32_t **txdataF,
int32_t **txdataF_BF,
LTE_DL_FRAME_PARMS *frame_parms,
int32_t ***cell_spec_bf_weights,
int slot,
int symbol);
/** \brief This function computes the LLRs for ML (max-logsum approximation) dual-stream QPSK/QPSK reception. /** \brief This function computes the LLRs for ML (max-logsum approximation) dual-stream QPSK/QPSK reception.
@param stream0_in Input from channel compensated (MR combined) stream 0 @param stream0_in Input from channel compensated (MR combined) stream 0
@param stream1_in Input from channel compensated (MR combined) stream 1 @param stream1_in Input from channel compensated (MR combined) stream 1
......
...@@ -184,7 +184,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, ...@@ -184,7 +184,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
if (phy_vars_ue->perfect_ce == 0) { if (phy_vars_ue->perfect_ce == 0) {
if ((l==0) || (l==(4-frame_parms->Ncp))) { if ((l==0) || (l==(4-frame_parms->Ncp))) {
for (aa=0; aa<frame_parms->nb_antennas_tx_eNB; aa++) { for (aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) {
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
msg("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l); msg("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l);
......
...@@ -482,7 +482,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -482,7 +482,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->lte_frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->lte_frame_parms;
int nsymb_ce = frame_parms->ofdm_symbol_size;//*frame_parms->symbols_per_tti; int nsymb_ce = frame_parms->ofdm_symbol_size;//*frame_parms->symbols_per_tti;
uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx; uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx;
uint8_t nb_antennas_tx = frame_parms->nb_antennas_tx_eNB; uint8_t nb_antennas_tx = frame_parms->nb_antennas_ports_eNB;
int16_t **rxsig_t; int16_t **rxsig_t;
int16_t **chest_t; int16_t **chest_t;
int16_t **chest_f; int16_t **chest_f;
......
...@@ -127,7 +127,7 @@ int smbv_write_config_from_frame_parms(const char* fname, LTE_DL_FRAME_PARMS *fr ...@@ -127,7 +127,7 @@ int smbv_write_config_from_frame_parms(const char* fname, LTE_DL_FRAME_PARMS *fr
fprintf(f_ptr, "BB:EUTR:TDD:SPSC %d\n",frame_parms->tdd_config_S); fprintf(f_ptr, "BB:EUTR:TDD:SPSC %d\n",frame_parms->tdd_config_S);
// MIMO // MIMO
fprintf(f_ptr, "BB:EUTR:DL:MIMO:CONF TX%d\n",frame_parms->nb_antennas_tx_eNB); fprintf(f_ptr, "BB:EUTR:DL:MIMO:CONF TX%d\n",frame_parms->nb_antenna_ports_eNB);
fprintf(f_ptr, "BB:EUTR:DL:MIMO:ANTA ANT1\n"); fprintf(f_ptr, "BB:EUTR:DL:MIMO:ANTA ANT1\n");
fprintf(f_ptr, "BB:EUTR:DL:MIMO:ANTB NONE\n"); fprintf(f_ptr, "BB:EUTR:DL:MIMO:ANTB NONE\n");
......
...@@ -220,8 +220,8 @@ typedef struct PHY_VARS_eNB_s { ...@@ -220,8 +220,8 @@ typedef struct PHY_VARS_eNB_s {
LTE_eNB_PUSCH *lte_eNB_pusch_vars[NUMBER_OF_UE_MAX]; LTE_eNB_PUSCH *lte_eNB_pusch_vars[NUMBER_OF_UE_MAX];
LTE_eNB_PRACH lte_eNB_prach_vars; LTE_eNB_PRACH lte_eNB_prach_vars;
LTE_eNB_DLSCH_t *dlsch_eNB[NUMBER_OF_UE_MAX][2]; // Nusers times two spatial streams LTE_eNB_DLSCH_t *dlsch_eNB[NUMBER_OF_UE_MAX][2]; // Nusers times two spatial streams
// old: LTE_eNB_DLSCH_t **dlsch_eNB[2]; // Nusers times two spatial streams // old: LTE_eNB_DLSCH_t **dlsch_eNB[2]; // Nusers times two spatial streams
LTE_eNB_ULSCH_t *ulsch_eNB[NUMBER_OF_UE_MAX+1]; // Nusers + number of RA LTE_eNB_ULSCH_t *ulsch_eNB[NUMBER_OF_UE_MAX+1]; // Nusers + number of RA
LTE_eNB_DLSCH_t *dlsch_eNB_SI,*dlsch_eNB_ra; LTE_eNB_DLSCH_t *dlsch_eNB_SI,*dlsch_eNB_ra;
LTE_eNB_DLSCH_t *dlsch_eNB_MCH; LTE_eNB_DLSCH_t *dlsch_eNB_MCH;
LTE_eNB_UE_stats eNB_UE_stats[NUMBER_OF_UE_MAX]; LTE_eNB_UE_stats eNB_UE_stats[NUMBER_OF_UE_MAX];
......
...@@ -530,12 +530,12 @@ typedef struct { ...@@ -530,12 +530,12 @@ typedef struct {
uint32_t samples_per_tti; uint32_t samples_per_tti;
/// Number of OFDM/SC-FDMA symbols in one subframe (to be modified to account for potential different in UL/DL) /// Number of OFDM/SC-FDMA symbols in one subframe (to be modified to account for potential different in UL/DL)
uint16_t symbols_per_tti; uint16_t symbols_per_tti;
/// Number of Transmit antennas in node /// Number of Physical transmit antennas in node
uint8_t nb_antennas_tx; uint8_t nb_antennas_tx;
/// Number of Receive antennas in node /// Number of Receive antennas in node
uint8_t nb_antennas_rx; uint8_t nb_antennas_rx;
/// Number of Transmit antennas in eNodeB /// Number of Logical transmit antenna ports in eNodeB
uint8_t nb_antennas_tx_eNB; uint8_t nb_antenna_ports_eNB;
/// PRACH_CONFIG /// PRACH_CONFIG
PRACH_CONFIG_COMMON prach_config_common; PRACH_CONFIG_COMMON prach_config_common;
/// PUCCH Config Common (from 36-331 RRC spec) /// PUCCH Config Common (from 36-331 RRC spec)
...@@ -602,11 +602,17 @@ typedef struct { ...@@ -602,11 +602,17 @@ typedef struct {
/// - third index: /// - third index:
int32_t **txdata[3]; int32_t **txdata[3];
/// \brief holds the transmit data in the frequency domain. /// \brief holds the transmit data in the frequency domain.
/// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. /// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. //?
/// - first index: eNB id [0..2] (hard coded) /// - first index: eNB id [0..2] (hard coded)
/// - second index: tx antenna [0..nb_antennas_tx[ /// - second index: tx antenna [0..14[ where 14 is the total supported antenna ports.
/// - third index: sample [0..] /// - third index: sample [0..]
mod_sym_t **txdataF[3]; mod_sym_t **txdataF[3];
/// \brief holds the transmit data after beamforming in the frequency domain.
/// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. //?
/// - first index: eNB id [0..2] (hard coded)
/// - second index: tx antenna [0..nb_antennas_tx[
/// - third index: sample [0..]
mod_sym_t **txdataF_BF[3];
/// \brief Holds the received data in time domain. /// \brief Holds the received data in time domain.
/// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. /// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER.
/// - first index: eNB id [0..2] (hard coded) /// - first index: eNB id [0..2] (hard coded)
...@@ -627,6 +633,18 @@ typedef struct { ...@@ -627,6 +633,18 @@ typedef struct {
/// - first index: eNB id [0..2] (hard coded) /// - first index: eNB id [0..2] (hard coded)
/// - second index: sample [0..samples_per_tti*10[ /// - second index: sample [0..samples_per_tti*10[
uint32_t *sync_corr[3]; uint32_t *sync_corr[3];
/// \brief Holds the cell specific beamforming weights
/// - first index: eNB id [0..2] (hard coded)
/// - second index: cell specific eNB antenna port index, up to 2 logical antenna ports are supported
/// - third index: tx antenna [0..nb_antennas_tx[
/// - fourth index: sample [0..]
int32_t **cell_spec_bf_weights[3][2];
/// \brief Holds the ue specific beamforming weights
/// - first index: eNB id [0..2] (hard coded)
/// - second index: ue specific eNB antenna port index, port5->index0, port7-15->index0-7
/// - third index: tx antenna [0..nb_antennas_tx[
/// - fourth index: sample [0..]
int32_t **ue_spec_bf_weights[3][8];
} LTE_eNB_COMMON; } LTE_eNB_COMMON;
typedef struct { typedef struct {
......
...@@ -183,6 +183,7 @@ ...@@ -183,6 +183,7 @@
#define DMA_BLKS_PER_SLOT (SLOT_LENGTH_BYTES/2048) // Number of DMA blocks per slot #define DMA_BLKS_PER_SLOT (SLOT_LENGTH_BYTES/2048) // Number of DMA blocks per slot
#define SLOT_TIME_NS (SLOT_LENGTH_SAMPLES*(1e3)/7.68) // slot time in ns #define SLOT_TIME_NS (SLOT_LENGTH_SAMPLES*(1e3)/7.68) // slot time in ns
#define NB_ANTENNA_PORTS_ENB 14 // total number of eNB antenna ports
#ifdef EXMIMO #ifdef EXMIMO
#define TARGET_RX_POWER 55 // Target digital power for the AGC #define TARGET_RX_POWER 55 // Target digital power for the AGC
......
...@@ -1434,7 +1434,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -1434,7 +1434,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
if (abstraction_flag==0) { if (abstraction_flag==0) {
// clear the transmit data array for the current subframe // clear the transmit data array for the current subframe
for (aa=0; aa<phy_vars_eNB->lte_frame_parms.nb_antennas_tx_eNB; aa++) { for (aa=0; aa<phy_vars_eNB->lte_frame_parms.nb_antenna_ports_eNB; aa++) {
memset(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][subframe*phy_vars_eNB->lte_frame_parms.ofdm_symbol_size*(phy_vars_eNB->lte_frame_parms.symbols_per_tti)], memset(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][subframe*phy_vars_eNB->lte_frame_parms.ofdm_symbol_size*(phy_vars_eNB->lte_frame_parms.symbols_per_tti)],
0,phy_vars_eNB->lte_frame_parms.ofdm_symbol_size*(phy_vars_eNB->lte_frame_parms.symbols_per_tti)*sizeof(mod_sym_t)); 0,phy_vars_eNB->lte_frame_parms.ofdm_symbol_size*(phy_vars_eNB->lte_frame_parms.symbols_per_tti)*sizeof(mod_sym_t));
...@@ -2243,8 +2243,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -2243,8 +2243,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
subframe, subframe,
num_pdcch_symbols, num_pdcch_symbols,
phy_vars_eNB->dlsch_eNB_SI, phy_vars_eNB->dlsch_eNB_SI,
(LTE_eNB_DLSCH_t *)NULL, (LTE_eNB_DLSCH_t *)NULL);
(int32_t **)NULL);
stop_meas(&phy_vars_eNB->dlsch_modulation_stats); stop_meas(&phy_vars_eNB->dlsch_modulation_stats);
} }
...@@ -2381,8 +2380,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -2381,8 +2380,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
subframe, subframe,
num_pdcch_symbols, num_pdcch_symbols,
phy_vars_eNB->dlsch_eNB_ra, phy_vars_eNB->dlsch_eNB_ra,
(LTE_eNB_DLSCH_t *)NULL, (LTE_eNB_DLSCH_t *)NULL);
(int32_t **)NULL);
} }
...@@ -2560,8 +2558,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e ...@@ -2560,8 +2558,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
subframe, subframe,
num_pdcch_symbols, num_pdcch_symbols,
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0], phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0],
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][1], phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][1]);
(int32_t **)NULL);
stop_meas(&phy_vars_eNB->dlsch_modulation_stats); stop_meas(&phy_vars_eNB->dlsch_modulation_stats);
} }
......
This diff is collapsed.
...@@ -401,7 +401,7 @@ void lte_param_init( unsigned char transmission_mode, ...@@ -401,7 +401,7 @@ void lte_param_init( unsigned char transmission_mode,
lte_frame_parms->Nid_cell = Nid_cell; lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6; lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = (transmission_mode == 1) ? 1 : 2; lte_frame_parms->nb_antennas_tx = (transmission_mode == 1) ? 1 : 2;
lte_frame_parms->nb_antennas_tx_eNB = (transmission_mode == 1) ? 1 : 2; lte_frame_parms->nb_antenna_ports_eNB = (transmission_mode == 1) ? 1 : 2;
lte_frame_parms->nb_antennas_rx = (transmission_mode == 1) ? 1 : 2; lte_frame_parms->nb_antennas_rx = (transmission_mode == 1) ? 1 : 2;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
lte_frame_parms->phich_config_common.phich_resource = oneSixth; lte_frame_parms->phich_config_common.phich_resource = oneSixth;
......
...@@ -88,7 +88,7 @@ void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmi ...@@ -88,7 +88,7 @@ void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmi
lte_frame_parms->Nid_cell = Nid_cell; lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6; lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx; lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_tx_eNB = N_tx; lte_frame_parms->nb_antenna_ports_eNB = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx; lte_frame_parms->nb_antennas_rx = N_rx;
// lte_frame_parms->Csrs = 2; // lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0; // lte_frame_parms->Bsrs = 0;
......
...@@ -85,7 +85,7 @@ void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmi ...@@ -85,7 +85,7 @@ void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmi
lte_frame_parms->Ncp = extended_prefix_flag; lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell; lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6; lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx_eNB = N_tx; lte_frame_parms->nb_antenna_ports_eNB = N_tx;
lte_frame_parms->nb_antennas_tx = N_tx; lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx; lte_frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->phich_config_common.phich_resource = one; //half lte_frame_parms->phich_config_common.phich_resource = one; //half
...@@ -858,7 +858,7 @@ int main(int argc, char **argv) ...@@ -858,7 +858,7 @@ int main(int argc, char **argv)
break; break;
} }
eNB2UE = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx_eNB, eNB2UE = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antenna_ports_eNB,
PHY_vars_UE->lte_frame_parms.nb_antennas_rx, PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
channel_model, channel_model,
BW, BW,
...@@ -940,7 +940,7 @@ int main(int argc, char **argv) ...@@ -940,7 +940,7 @@ int main(int argc, char **argv)
for (trial=0; trial<n_frames; trial++) { for (trial=0; trial<n_frames; trial++) {
// printf("DCI (SF %d): txdataF %p (0 %p)\n",subframe,&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][512*14*subframe],&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][0]); // printf("DCI (SF %d): txdataF %p (0 %p)\n",subframe,&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][512*14*subframe],&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][0]);
for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_tx_eNB; aa++) { for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antenna_ports_eNB; aa++) {
memset(&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][0],0,FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t)); memset(&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][0],0,FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t));
/* /*
...@@ -1090,7 +1090,7 @@ int main(int argc, char **argv) ...@@ -1090,7 +1090,7 @@ int main(int argc, char **argv)
if (n_frames==1) { if (n_frames==1) {
write_output("txsigF0.m","txsF0", PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][0],4*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX,1,1); write_output("txsigF0.m","txsF0", PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][0],4*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX,1,1);
if (PHY_vars_eNB->lte_frame_parms.nb_antennas_tx_eNB > 1) if (PHY_vars_eNB->lte_frame_parms.nb_antenna_ports_eNB > 1)
write_output("txsigF1.m","txsF1", PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][1],4*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX,1,1); write_output("txsigF1.m","txsF1", PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][1],4*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX,1,1);
} }
...@@ -1098,7 +1098,7 @@ int main(int argc, char **argv) ...@@ -1098,7 +1098,7 @@ int main(int argc, char **argv)
for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_tx_eNB; aa++) { for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antenna_ports_eNB; aa++) {
if (PHY_vars_eNB->lte_frame_parms.Ncp == 1) if (PHY_vars_eNB->lte_frame_parms.Ncp == 1)
PHY_ofdm_mod(&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][subframe*nsymb*PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size], // input, PHY_ofdm_mod(&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][subframe*nsymb*PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size], // input,
&txdata[aa][subframe*PHY_vars_eNB->lte_frame_parms.samples_per_tti], // output &txdata[aa][subframe*PHY_vars_eNB->lte_frame_parms.samples_per_tti], // output
...@@ -1123,7 +1123,7 @@ int main(int argc, char **argv) ...@@ -1123,7 +1123,7 @@ int main(int argc, char **argv)
for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) { for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) {
for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antennas_tx_eNB; aa++) { for (aa=0; aa<PHY_vars_eNB->lte_frame_parms.nb_antenna_ports_eNB; aa++) {
if (awgn_flag == 0) { if (awgn_flag == 0) {
s_re[aa][i] = ((double)(((short *)txdata[aa]))[(2*subframe*PHY_vars_UE->lte_frame_parms.samples_per_tti) + (i<<1)]); s_re[aa][i] = ((double)(((short *)txdata[aa]))[(2*subframe*PHY_vars_UE->lte_frame_parms.samples_per_tti) + (i<<1)]);
s_im[aa][i] = ((double)(((short *)txdata[aa]))[(2*subframe*PHY_vars_UE->lte_frame_parms.samples_per_tti) + (i<<1)+1]); s_im[aa][i] = ((double)(((short *)txdata[aa]))[(2*subframe*PHY_vars_UE->lte_frame_parms.samples_per_tti) + (i<<1)+1]);
...@@ -1211,7 +1211,7 @@ int main(int argc, char **argv) ...@@ -1211,7 +1211,7 @@ int main(int argc, char **argv)
} }
} }
} else { } else {
for(aa=0; aa<frame_parms->nb_antennas_tx_eNB; aa++) { for(aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) {
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
for (i=0; i<frame_parms->N_RB_DL*12; i++) { for (i=0; i<frame_parms->N_RB_DL*12; i++) {
((int16_t *) PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][(aa<<1)+aarx])[2*i+(l*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(short)(AMP); ((int16_t *) PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][(aa<<1)+aarx])[2*i+(l*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(short)(AMP);
......
...@@ -88,7 +88,7 @@ void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmi ...@@ -88,7 +88,7 @@ void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmi
lte_frame_parms->Nid_cell = Nid_cell; lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6; lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx; lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_tx_eNB = N_tx; lte_frame_parms->nb_antenna_ports_eNB = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx; lte_frame_parms->nb_antennas_rx = N_rx;
// lte_frame_parms->Csrs = 2; // lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0; // lte_frame_parms->Bsrs = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment