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

initialisation beamforming weights in lte_init.c and only in softmodem for phy-test mode

parent 8dc51127
......@@ -1339,6 +1339,10 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
common_vars->beam_weights[eNB_id][i] = (int32_t **)malloc16_clear(fp->nb_antennas_tx*sizeof(int32_t*));
for (j=0; j<fp->nb_antennas_tx; j++) {
common_vars->beam_weights[eNB_id][i][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
for (re=0; re<fp->ofdm_symbol_size; re++)
common_vars->beam_weights[eNB_id][i][j][re] = 0x00007fff;
//common_vars->beam_weights[eNB_id][i][j][re] = 0x14147fff;//0x434e434e; //0x3d432a22;
/*
// antenna ports 0-3 are mapped on antennas 0-3
// antenna port 4 is mapped on antenna 0
// antenna ports 5-14 are mapped on all antennas
......@@ -1348,8 +1352,9 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
}
else if (i>4) {
for (re=0; re<fp->ofdm_symbol_size; re++)
common_vars->beam_weights[eNB_id][i][j][re] = 0x00007fff/sqrt(fp->nb_antennas_tx);
}
//common_vars->beam_weights[eNB_id][i][j][re] = 0x00007fff/sqrt(fp->nb_antennas_tx);
common_vars->beam_weights[eNB_id][i][j][re] = 0x00007fff;
}*/
#ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] lte_common_vars->beam_weights[%d][%d][%d] = %p (%d bytes)\n",
eNB_id,i,j,common_vars->beam_weights[eNB_id][i][j],
......
......@@ -128,7 +128,7 @@ FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX];
FD_lte_phy_scope_enb *form_enb[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
char title[255];
unsigned char scope_enb_num_ue = 2;
unsigned char scope_enb_num_ue = 1;//2;
#endif //XFORMS
......@@ -1663,20 +1663,22 @@ int main( int argc, char **argv )
PHY_vars_eNB_g[0][CC_id]->target_ue_ul_mcs=target_ul_mcs;
// initialization for phy-test
for (k=0;k<NUMBER_OF_UE_MAX;k++) {
PHY_vars_eNB_g[0][CC_id]->transmission_mode[k] = transmission_mode;
if (transmission_mode==7)
lte_gold_ue_spec_port5(PHY_vars_eNB_g[0][CC_id]->lte_gold_uespec_port5_table[k],frame_parms[CC_id]->Nid_cell,0x1235+k);
}
if ((transmission_mode==1) || (transmission_mode==7)) {
for (j=0; j<frame_parms[CC_id]->nb_antennas_tx; j++)
for (re=0; re<frame_parms[CC_id]->ofdm_symbol_size; re++)
//In softmodem: the power constraint is on each antenna, so we do not norm the beam weights
PHY_vars_eNB_g[0][CC_id]->common_vars.beam_weights[0][0][j][re] = 0x00007fff;
//PHY_vars_eNB_g[0][CC_id]->common_vars.beam_weights[0][0][j][re] = 0x00007fff/sqrt(frame_parms[CC_id]->nb_antennas_tx);
}
if (phy_test==1) PHY_vars_eNB_g[0][CC_id]->mac_enabled = 0;
else PHY_vars_eNB_g[0][CC_id]->mac_enabled = 1;
if (phy_test==1) {
PHY_vars_eNB_g[0][CC_id]->mac_enabled = 0;
for (k=0;k<NUMBER_OF_UE_MAX;k++) {
PHY_vars_eNB_g[0][CC_id]->transmission_mode[k] = transmission_mode;
if (transmission_mode==7)
lte_gold_ue_spec_port5(PHY_vars_eNB_g[0][CC_id]->lte_gold_uespec_port5_table[k],frame_parms[CC_id]->Nid_cell,0x1235+k);
}
if ((transmission_mode==1) || (transmission_mode==7)) {
for (j=0; j<frame_parms[CC_id]->nb_antennas_tx; j++)
for (re=0; re<frame_parms[CC_id]->ofdm_symbol_size; re++)
//In softmodem: the power constraint is on each antenna, so we do not norm the beam weights
PHY_vars_eNB_g[0][CC_id]->common_vars.beam_weights[0][0][j][re] = 0x00007fff;
//PHY_vars_eNB_g[0][CC_id]->common_vars.beam_weights[0][0][j][re] = 0x00007fff/sqrt(frame_parms[CC_id]->nb_antennas_tx);
}
} else
PHY_vars_eNB_g[0][CC_id]->mac_enabled = 1;
if (PHY_vars_eNB_g[0][CC_id]->mac_enabled == 0) { //set default parameters for testing mode
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
......
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