Commit 91193c2c authored by Florian Kaltenberger's avatar Florian Kaltenberger

add tm7 case into asn1 message

set transmission mode in phy_config_dedicated_[UE|eNB] after RRCConnectionReconfiguration(eNB) and RRCConnectionReconfigurationComplete(UE)

add ue_TransmissionMode in RrcConfigurationReq

added ue_transmission_mode and nb_antenna_ports to eNB config file

transmisison mode gets set with RRCReconfiguration
parent 47d8583b
......@@ -652,6 +652,38 @@ void phy_config_dedicated_eNB(uint8_t Mod_id,
if (physicalConfigDedicated) {
phy_vars_eNB->physicalConfigDedicated[UE_id] = physicalConfigDedicated;
LOG_I(PHY,"phy_config_dedicated_eNB: physicalConfigDedicated=%p\n",physicalConfigDedicated);
if (physicalConfigDedicated->antennaInfo) {
switch(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode) {
case AntennaInfoDedicated__transmissionMode_tm1:
phy_vars_eNB->transmission_mode[UE_id] = 1;
break;
case AntennaInfoDedicated__transmissionMode_tm2:
phy_vars_eNB->transmission_mode[UE_id] = 2;
break;
case AntennaInfoDedicated__transmissionMode_tm3:
phy_vars_eNB->transmission_mode[UE_id] = 3;
break;
case AntennaInfoDedicated__transmissionMode_tm4:
phy_vars_eNB->transmission_mode[UE_id] = 4;
break;
case AntennaInfoDedicated__transmissionMode_tm5:
phy_vars_eNB->transmission_mode[UE_id] = 5;
break;
case AntennaInfoDedicated__transmissionMode_tm6:
phy_vars_eNB->transmission_mode[UE_id] = 6;
break;
case AntennaInfoDedicated__transmissionMode_tm7:
phy_vars_eNB->transmission_mode[UE_id] = 7;
break;
default:
LOG_E(PHY,"Unknown transmission mode!\n");
break;
}
} else {
LOG_D(PHY,"[eNB %d] Frame %d: Received NULL radioResourceConfigDedicated->antennaInfo from eNB %d\n",Mod_id, phy_vars_eNB->proc[8].frame_tx,UE_id);
}
} else {
LOG_E(PHY,"[eNB %d] Frame %d: Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id, phy_vars_eNB->proc[8].frame_tx,UE_id);
return;
......@@ -814,6 +846,34 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t CH_index,
phy_vars_ue->transmission_mode[CH_index] = 1+(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode);
LOG_D(PHY,"Transmission Mode %d\n",phy_vars_ue->transmission_mode[CH_index]);
LOG_D(PHY,"\n");
switch(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode) {
case AntennaInfoDedicated__transmissionMode_tm1:
phy_vars_ue->transmission_mode[CH_index] = 1;
break;
case AntennaInfoDedicated__transmissionMode_tm2:
phy_vars_ue->transmission_mode[CH_index] = 2;
break;
case AntennaInfoDedicated__transmissionMode_tm3:
phy_vars_ue->transmission_mode[CH_index] = 3;
break;
case AntennaInfoDedicated__transmissionMode_tm4:
phy_vars_ue->transmission_mode[CH_index] = 4;
break;
case AntennaInfoDedicated__transmissionMode_tm5:
phy_vars_ue->transmission_mode[CH_index] = 5;
break;
case AntennaInfoDedicated__transmissionMode_tm6:
phy_vars_ue->transmission_mode[CH_index] = 6;
break;
case AntennaInfoDedicated__transmissionMode_tm7:
phy_vars_ue->transmission_mode[CH_index] = 7;
break;
default:
LOG_E(PHY,"Unknown transmission mode!\n");
break;
}
} else {
LOG_D(PHY,"[UE %d] Frame %d: Received NULL physicalConfigDedicated->antennaInfo from eNB %d\n",Mod_id, phy_vars_ue->frame_rx,CH_index);
}
if (physicalConfigDedicated->schedulingRequestConfig) {
......
......@@ -179,7 +179,7 @@ typedef struct RrcConfigurationReq_s {
long ue_TimersAndConstants_t311[MAX_NUM_CCs];
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
long ue_TransmissionMode[MAX_NUM_CCs];
} RrcConfigurationReq;
// UE: NAS -> RRC messages
......
......@@ -187,6 +187,9 @@ static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_pro
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[CC_id] = enb_properties->properties[enb_id]->ue_TimersAndConstants_n310[CC_id];
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[CC_id] = enb_properties->properties[enb_id]->ue_TimersAndConstants_t311[CC_id];
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[CC_id] = enb_properties->properties[enb_id]->ue_TimersAndConstants_n311[CC_id];
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[CC_id] = enb_properties->properties[enb_id]->ue_TransmissionMode[CC_id];
}
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
......
......@@ -84,6 +84,7 @@
#define ENB_CONFIG_STRING_NID_CELL "Nid_cell"
#define ENB_CONFIG_STRING_N_RB_DL "N_RB_DL"
#define ENB_CONFIG_STRING_CELL_MBSFN "Nid_cell_mbsfn"
#define ENB_CONFIG_STRING_NB_ANT_PORTS "nb_antenna_ports"
#define ENB_CONFIG_STRING_NB_ANT_TX "nb_antennas_tx"
#define ENB_CONFIG_STRING_NB_ANT_RX "nb_antennas_rx"
#define ENB_CONFIG_STRING_TX_GAIN "tx_gain"
......@@ -145,6 +146,7 @@
#define ENB_CONFIG_STRING_UETIMERS_T311 "ue_TimersAndConstants_t311"
#define ENB_CONFIG_STRING_UETIMERS_N310 "ue_TimersAndConstants_n310"
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
#define ENB_CONFIG_STRING_SRB1 "srb1_parameters"
#define ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT "timer_poll_retransmit"
......@@ -322,6 +324,7 @@ void enb_config_display(void)
printf( "\n\tCell ID for CC %d:\t%"PRId16":\n",j,enb_properties.properties[i]->Nid_cell[j]);
printf( "\tN_RB_DL for CC %d:\t%"PRId16":\n",j,enb_properties.properties[i]->N_RB_DL[j]);
printf( "\tnb_antenna_ports for CC %d:\t%d:\n",j,enb_properties.properties[i]->nb_antenna_ports[j]);
printf( "\tnb_antennas_tx for CC %d:\t%d:\n",j,enb_properties.properties[i]->nb_antennas_tx[j]);
printf( "\tnb_antennas_rx for CC %d:\t%d:\n",j,enb_properties.properties[i]->nb_antennas_rx[j]);
......@@ -411,6 +414,8 @@ void enb_config_display(void)
printf( "\tue_TimersAndConstants_t311 for CC %d:\t%ld:\n",j,enb_properties.properties[i]->ue_TimersAndConstants_t311[j]);
printf( "\tue_TimersAndConstants_n311 for CC %d:\t%ld:\n",j,enb_properties.properties[i]->ue_TimersAndConstants_n311[j]);
printf( "\tue_TransmissionMode for CC %d:\t%ld:\n",j,enb_properties.properties[i]->ue_TransmissionMode[j]);
}
for (j=0; j < enb_properties.properties[i]->num_otg_elements; j++) {
......@@ -526,6 +531,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
libconfig_int Nid_cell = 0;
libconfig_int Nid_cell_mbsfn = 0;
libconfig_int N_RB_DL = 0;
libconfig_int nb_antenna_ports = 0;
libconfig_int nb_antennas_tx = 0;
libconfig_int nb_antennas_rx = 0;
libconfig_int tx_gain = 0;
......@@ -589,7 +595,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
libconfig_int ue_TimersAndConstants_t311 = 0;
libconfig_int ue_TimersAndConstants_n310 = 0;
libconfig_int ue_TimersAndConstants_n311 = 0;
libconfig_int ue_TransmissionMode = 0;
libconfig_int srb1_timer_poll_retransmit = 0;
......@@ -797,6 +803,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NID_CELL, &Nid_cell)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_N_RB_DL, &N_RB_DL)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_CELL_MBSFN, &Nid_cell_mbsfn)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NB_ANT_PORTS, &nb_antenna_ports)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NB_ANT_TX, &nb_antennas_tx)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_NB_ANT_RX, &nb_antennas_rx)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_TX_GAIN, &tx_gain)
......@@ -852,6 +859,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_T311, &ue_TimersAndConstants_t311)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N310, &ue_TimersAndConstants_n310)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UETIMERS_N311, &ue_TimersAndConstants_n311)
&& config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, &ue_TransmissionMode)
#ifdef Rel10
......@@ -968,7 +976,14 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->nb_antennas_tx[j] = nb_antennas_tx;
if ((nb_antennas_tx <1) || (nb_antennas_tx > 4))
if ((nb_antenna_ports <1) || (nb_antenna_ports > 2))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n",
lib_config_file_name_pP, i, nb_antenna_ports);
enb_properties.properties[enb_properties_index]->nb_antenna_ports[j] = nb_antenna_ports;
if ((nb_antennas_tx <1) || (nb_antennas_tx > 64))
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antennas_tx choice: 1..4 !\n",
lib_config_file_name_pP, i, nb_antennas_tx);
......@@ -1832,6 +1847,35 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
break;
}
switch (ue_TransmissionMode) {
case 1:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm1;
break;
case 2:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm2;
break;
case 3:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm3;
break;
case 4:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm4;
break;
case 5:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm5;
break;
case 6:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm6;
break;
case 7:
enb_properties.properties[enb_properties_index]->ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm7;
break;
default:
AssertError (0, parse_errors ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7",
lib_config_file_name_pP, i, ue_TransmissionMode);
break;
}
}
}
......
......@@ -136,9 +136,10 @@ typedef struct Enb_properties_s {
int16_t Nid_cell[1+MAX_NUM_CCs];// for testing, change later
int16_t N_RB_DL[1+MAX_NUM_CCs];// for testing, change later
int nb_antennas_tx[1+MAX_NUM_CCs];
int nb_antenna_ports[1+MAX_NUM_CCs];
int nb_antennas_tx[1+MAX_NUM_CCs];
int nb_antennas_rx[1+MAX_NUM_CCs];
int tx_gain[1+MAX_NUM_CCs];
int tx_gain[1+MAX_NUM_CCs];
int rx_gain[1+MAX_NUM_CCs];
long prach_root[1+MAX_NUM_CCs];
long prach_config_index[1+MAX_NUM_CCs];
......@@ -198,7 +199,7 @@ typedef struct Enb_properties_s {
long ue_TimersAndConstants_t311[1+MAX_NUM_CCs];
long ue_TimersAndConstants_n310[1+MAX_NUM_CCs];
long ue_TimersAndConstants_n311[1+MAX_NUM_CCs];
long ue_TransmissionMode[1+MAX_NUM_CCs];
long srb1_timer_poll_retransmit;
long srb1_timer_reordering;
......
......@@ -1602,6 +1602,7 @@ do_RRCConnectionSetup(
// AntennaInfoDedicated__transmissionMode_tm2);
switch (transmission_mode) {
default:
case 1:
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm1;
break;
......@@ -1634,6 +1635,10 @@ do_RRCConnectionSetup(
case 6:
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm6;
break;
case 7:
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm7;
break;
}
......
......@@ -432,6 +432,9 @@ typedef struct eNB_RRC_INST_s {
/// localization list for aggregated measurements from PHY
struct list loc_list;
#endif
//pointer to configuration
RrcConfigurationReq *configuration;
} eNB_RRC_INST;
#define MAX_UE_CAPABILITY_SIZE 255
......
......@@ -101,7 +101,7 @@
#include "SIMULATION/TOOLS/defs.h" // for taus
//#define XER_PRINT
#define XER_PRINT
#ifdef PHY_EMUL
extern EMULATION_VARS *Emul_vars;
......@@ -1162,8 +1162,8 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
int i;
// configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE
//eNB_RRC_INST* rrc_inst = &eNB_rrc_inst[ctxt_pP->module_id];
//struct PhysicalConfigDedicated** physicalConfigDedicated = &ue_context_pP->ue_context.physicalConfigDedicated;
eNB_RRC_INST* rrc_inst = &eNB_rrc_inst[ctxt_pP->module_id];
struct PhysicalConfigDedicated** physicalConfigDedicated = &ue_context_pP->ue_context.physicalConfigDedicated;
struct SRB_ToAddMod *SRB2_config = NULL;
struct SRB_ToAddMod__rlc_Config *SRB2_rlc_config = NULL;
......@@ -1393,6 +1393,14 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
//sps_RA_ConfigList_rlola = NULL;
#endif
//change the transmission mode for the primary component carrier
//TODO: change TM for secondary CC in SCelltoaddmodlist
if (*physicalConfigDedicated)
if ((*physicalConfigDedicated)->antennaInfo) {
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.transmissionMode = rrc_inst->configuration->ue_TransmissionMode[0];
LOG_D(RRC,"Setting transmission mode to %d+1\n",rrc_inst->configuration->ue_TransmissionMode[0]);
}
// Measurement ID list
MeasId_list = CALLOC(1, sizeof(*MeasId_list));
memset((void *)MeasId_list, 0, sizeof(*MeasId_list));
......@@ -1705,10 +1713,10 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
(DRB_ToAddModList_t*)*DRB_configList,
(DRB_ToReleaseList_t*)NULL, // DRB2_list,
(struct SPS_Config*)NULL, // *sps_Config,
(struct PhysicalConfigDedicated*)*physicalConfigDedicated,
#ifdef EXMIMO_IOT
NULL, NULL, NULL, NULL,NULL,
NULL, NULL, NULL,NULL,
#else
(struct PhysicalConfigDedicated*)*physicalConfigDedicated,
(MeasObjectToAddModList_t*)MeasObj_list,
(ReportConfigToAddModList_t*)ReportConfig_list,
(QuantityConfig_t*)quantityConfig,
......@@ -3340,7 +3348,7 @@ rrc_eNB_generate_RRCConnectionSetup(
do_RRCConnectionSetup(ctxt_pP,
ue_context_pP,
(uint8_t*) eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload,
(mac_xface->lte_frame_parms->nb_antennas_tx==2)?2:1,
(mac_xface->lte_frame_parms->nb_antennas_tx_eNB==2)?2:1, //at this point we do not have the UE capability information, so it can only be TM1 or TM2
rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
mac_xface->lte_frame_parms,
SRB_configList,
......@@ -3499,6 +3507,7 @@ openair_rrc_eNB_init(
eNB_rrc_inst[ctxt.module_id].initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
eNB_rrc_inst[ctxt.module_id].s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
eNB_rrc_inst[ctxt.module_id].configuration = configuration;
/// System Information INIT
......
......@@ -33,6 +33,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 25;
......@@ -97,6 +98,8 @@ eNBs =
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2;
}
);
......@@ -165,13 +168,13 @@ eNBs =
*/
log_config :
{
global_log_level ="info";
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="debug";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_level ="debug";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_level ="debug";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
......
......@@ -33,6 +33,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 25;
......@@ -97,6 +98,8 @@ eNBs =
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
......
......@@ -50,7 +50,6 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
uint8_t Nid_cell,
uint8_t cooperation_flag,
uint8_t transmission_mode,
uint8_t abstraction_flag)
{
......@@ -69,7 +68,6 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
LOG_I(PHY,"init eNB: number of ue max %d number of enb max %d number of harq pid max %d\n",
NUMBER_OF_UE_MAX, NUMBER_OF_eNB_MAX, NUMBER_OF_HARQ_PID_MAX);
LOG_I(PHY,"init eNB: N_RB_DL %d\n", frame_parms->N_RB_DL);
LOG_I(PHY,"init eNB: Transmission mode %d\n", transmission_mode);
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
for (j=0; j<2; j++) {
......@@ -93,7 +91,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
// this is the transmission mode for the signalling channels
// this will be overwritten with the real transmission mode by the RRC once the UE is connected
PHY_vars_eNB->transmission_mode[i] = transmission_mode;
PHY_vars_eNB->transmission_mode[i] = frame_parms->nb_antennas_tx_eNB==1 ? 1 : 2;
#ifdef LOCALIZATION
PHY_vars_eNB->ulsch_eNB[1+i]->aggregation_period_ms = 5000; // 5000 milliseconds // could be given as an argument (TBD))
struct timeval ts;
......@@ -153,8 +151,8 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t UE_id,
uint8_t abstraction_flag,
uint8_t transmission_mode)
uint8_t abstraction_flag)
{
int i,j;
......@@ -187,7 +185,7 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
PHY_vars_UE->dlsch_ue_SI[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
PHY_vars_UE->dlsch_ue_ra[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag);
PHY_vars_UE->transmission_mode[i] = transmission_mode;
PHY_vars_UE->transmission_mode[i] = frame_parms->nb_antennas_tx_eNB==1 ? 1 : 2;
}
PHY_vars_UE->lte_frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
......@@ -225,8 +223,12 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
uint8_t extended_prefix_flag,
uint8_t N_RB_DL,
uint16_t Nid_cell,
uint8_t cooperation_flag,uint8_t transmission_mode,uint8_t abstraction_flag,
int nb_antennas_rx, uint8_t eMBMS_active_state)
uint8_t cooperation_flag,
uint8_t nb_antenna_ports,
uint8_t abstraction_flag,
int nb_antennas_rx,
int nb_antennas_tx,
uint8_t eMBMS_active_state)
{
uint8_t eNB_id,UE_id,RN_id,CC_id;
......@@ -250,10 +252,10 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
(frame_parms[CC_id])->Ncp_UL = extended_prefix_flag;
(frame_parms[CC_id])->Nid_cell = Nid_cell;
(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_eNB = (transmission_mode == 1) ? 1 : 2;
(frame_parms[CC_id])->nb_antennas_rx = (transmission_mode == 1) ? 1 : 2;
(frame_parms[CC_id])->mode1_flag = (transmission_mode == 1) ? 1 : 0;
(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_antennas_tx_eNB = nb_antenna_ports;
(frame_parms[CC_id])->mode1_flag = (frame_parms[CC_id])->nb_antennas_tx_eNB==1 ? 1 : 0;
init_frame_parms(frame_parms[CC_id],1);
......@@ -275,7 +277,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
PHY_vars_eNB_g[eNB_id] = (PHY_VARS_eNB**) malloc(MAX_NUM_CCs*sizeof(PHY_VARS_eNB*));
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
PHY_vars_eNB_g[eNB_id][CC_id] = init_lte_eNB(frame_parms[CC_id],eNB_id,Nid_cell,cooperation_flag,transmission_mode,abstraction_flag);
PHY_vars_eNB_g[eNB_id][CC_id] = init_lte_eNB(frame_parms[CC_id],eNB_id,Nid_cell,cooperation_flag,abstraction_flag);
PHY_vars_eNB_g[eNB_id][CC_id]->Mod_id=eNB_id;
PHY_vars_eNB_g[eNB_id][CC_id]->CC_id=CC_id;
}
......@@ -292,7 +294,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
(frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx;
PHY_vars_UE_g[UE_id][CC_id] = init_lte_UE(frame_parms[CC_id], UE_id,abstraction_flag,transmission_mode);
PHY_vars_UE_g[UE_id][CC_id] = init_lte_UE(frame_parms[CC_id], UE_id,abstraction_flag);
PHY_vars_UE_g[UE_id][CC_id]->Mod_id=UE_id;
PHY_vars_UE_g[UE_id][CC_id]->CC_id=CC_id;
}
......
......@@ -34,13 +34,11 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
uint8_t Nid_cell,
uint8_t cooperation_flag,
uint8_t transmission_mode,
uint8_t abstraction_flag);
PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t UE_id,
uint8_t abstraction_flag,
uint8_t transmission_mode);
uint8_t abstraction_flag);
PHY_VARS_RN* init_lte_RN(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t RN_id,
......@@ -54,7 +52,8 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
uint8_t N_RB_DL,
uint16_t Nid_cell,
uint8_t cooperation_flag,
uint8_t transmission_mode,
uint8_t nb_antenna_ports,
uint8_t abstraction_flag,
int nb_antennas_rx,
int nb_antennas_tx,
uint8_t eMBMS_active_state);
......@@ -173,10 +173,11 @@ extern time_stats_t ul_chan_stats;
extern int xforms;
const Enb_properties_array_t *enb_properties;
void get_simulation_options(int argc, char *argv[])
{
int option;
const Enb_properties_array_t *enb_properties;
char *conf_config_file_name = NULL;
enum long_option_e {
......@@ -714,6 +715,7 @@ void get_simulation_options(int argc, char *argv[])
break;
case 'x':
/*
oai_emulation.info.transmission_mode[0] = atoi (optarg);
if ((oai_emulation.info.transmission_mode[0] != 1) && (oai_emulation.info.transmission_mode[0] != 2) && (oai_emulation.info.transmission_mode[0] != 3)
......@@ -721,6 +723,9 @@ void get_simulation_options(int argc, char *argv[])
printf("Unsupported transmission mode %d\n",oai_emulation.info.transmission_mode[0]);
exit(-1);
}
*/
printf("Option -x deprecated. Please set transmission mode in eNB config file\n");
exit(-1);
break;
......@@ -956,8 +961,19 @@ void init_openair1(void)
// change the nb_connected_eNB
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],
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);
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,
enb_properties->properties[0]->nb_antenna_ports[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++) {
......
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