Commit a04682d4 authored by Xiwen JIANG's avatar Xiwen JIANG

oaisim takes tx and rx antenna number from config file and transmission mode from the command line

parent 5a40c9a8
...@@ -229,7 +229,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs], ...@@ -229,7 +229,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
uint8_t N_RB_DL, uint8_t N_RB_DL,
uint16_t Nid_cell, uint16_t Nid_cell,
uint8_t cooperation_flag,uint8_t transmission_mode,uint8_t abstraction_flag, uint8_t cooperation_flag,uint8_t transmission_mode,uint8_t abstraction_flag,
int nb_antennas_rx, uint8_t eMBMS_active_state) int nb_antennas_rx, int nb_antennas_tx, uint8_t eMBMS_active_state)
{ {
uint8_t eNB_id,UE_id,RN_id,CC_id; uint8_t eNB_id,UE_id,RN_id,CC_id;
...@@ -252,10 +252,10 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs], ...@@ -252,10 +252,10 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
(frame_parms[CC_id])->Ncp = extended_prefix_flag; (frame_parms[CC_id])->Ncp = extended_prefix_flag;
(frame_parms[CC_id])->Nid_cell = Nid_cell; (frame_parms[CC_id])->Nid_cell = Nid_cell;
(frame_parms[CC_id])->nushift = (Nid_cell%6); (frame_parms[CC_id])->nushift = (Nid_cell%6);
(frame_parms[CC_id])->nb_antennas_tx = (transmission_mode == 1) ? 1 : 2; (frame_parms[CC_id])->nb_antennas_tx = nb_antennas_tx;
(frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx;
(frame_parms[CC_id])->nb_antenna_ports_eNB = (transmission_mode == 1 || transmission_mode == 7) ? 1 : 2; (frame_parms[CC_id])->nb_antenna_ports_eNB = (transmission_mode == 1 || transmission_mode == 7) ? 1 : 2;
(frame_parms[CC_id])->nb_antennas_rx = (transmission_mode == 1) ? 1 : 2; (frame_parms[CC_id])->mode1_flag = (frame_parms[CC_id])->nb_antenna_ports_eNB==1 ? 1 : 0;
(frame_parms[CC_id])->mode1_flag = (transmission_mode == 1) ? 1 : 0;
init_frame_parms(frame_parms[CC_id],1); init_frame_parms(frame_parms[CC_id],1);
......
...@@ -57,4 +57,5 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs], ...@@ -57,4 +57,5 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
uint8_t transmission_mode, uint8_t transmission_mode,
uint8_t abstraction_flag, uint8_t abstraction_flag,
int nb_antennas_rx, int nb_antennas_rx,
int nb_antennas_tx,
uint8_t eMBMS_active_state); uint8_t eMBMS_active_state);
...@@ -174,10 +174,11 @@ extern time_stats_t ul_chan_stats; ...@@ -174,10 +174,11 @@ extern time_stats_t ul_chan_stats;
extern int xforms; extern int xforms;
const Enb_properties_array_t *enb_properties;
void get_simulation_options(int argc, char *argv[]) void get_simulation_options(int argc, char *argv[])
{ {
int option; int option;
const Enb_properties_array_t *enb_properties;
char *conf_config_file_name = NULL; char *conf_config_file_name = NULL;
enum long_option_e { enum long_option_e {
...@@ -925,7 +926,7 @@ void init_openair1(void) ...@@ -925,7 +926,7 @@ void init_openair1(void)
// change the nb_connected_eNB // change the nb_connected_eNB
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
init_lte_vars (&frame_parms[CC_id], oai_emulation.info.frame_type[CC_id], oai_emulation.info.tdd_config[CC_id], oai_emulation.info.tdd_config_S[CC_id],oai_emulation.info.extended_prefix_flag[CC_id], init_lte_vars (&frame_parms[CC_id], oai_emulation.info.frame_type[CC_id], oai_emulation.info.tdd_config[CC_id], oai_emulation.info.tdd_config_S[CC_id],oai_emulation.info.extended_prefix_flag[CC_id],
oai_emulation.info.N_RB_DL[CC_id], Nid_cell, cooperation_flag, oai_emulation.info.transmission_mode[CC_id], abstraction_flag,nb_antennas_rx, oai_emulation.info.eMBMS_active_state); oai_emulation.info.N_RB_DL[CC_id], Nid_cell, cooperation_flag, oai_emulation.info.transmission_mode[CC_id], abstraction_flag,enb_properties->properties[0]->nb_antennas_tx[CC_id],enb_properties->properties[0]->nb_antennas_tx[CC_id], oai_emulation.info.eMBMS_active_state);
} }
for (eNB_id=0; eNB_id<NB_eNB_INST; eNB_id++) { for (eNB_id=0; eNB_id<NB_eNB_INST; eNB_id++) {
......
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