Commit 006654f8 authored by Imad ALAWE's avatar Imad ALAWE Committed by Frédéric Leroy

openair2: fix abstraction mode for oaisim with MME

When using abstraction mode, layer2_init_UE() and openair_rrc_ue_init()
are called according to first_sync state and only without MME support.

We added the global variable abstraction_flag to allow abstraction mode
when MME is enabled.
Openair2 is also used in lte-softmodem, so it must have a global variable
abstraction_flag. So we moved it out from the main() scope.
parent de79d350
...@@ -62,24 +62,26 @@ ...@@ -62,24 +62,26 @@
#endif //PHY_EMUL #endif //PHY_EMUL
#include "SCHED/defs.h" #include "SCHED/defs.h"
extern uint8_t abstraction_flag;
void dl_phy_sync_success(module_id_t module_idP, void dl_phy_sync_success(module_id_t module_idP,
frame_t frameP, frame_t frameP,
unsigned char eNB_index, unsigned char eNB_index,
uint8_t first_sync) //init as MR uint8_t first_sync) //init as MR
{ {
LOG_D(MAC,"[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n", module_idP, frameP, eNB_index); LOG_D(MAC,"[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n", module_idP, frameP, eNB_index);
#if ! defined(ENABLE_USE_MME) #if defined(ENABLE_USE_MME)
int mme_enabled=1;
#else
int mme_enabled=0;
#endif
if (first_sync==1) { if (first_sync==1 && !(mme_enabled==1 && abstraction_flag==0)) {
layer2_init_UE(module_idP); layer2_init_UE(module_idP);
openair_rrc_ue_init(module_idP,eNB_index); openair_rrc_ue_init(module_idP,eNB_index);
} else } else
#endif
{ {
rrc_in_sync_ind(module_idP,frameP,eNB_index); rrc_in_sync_ind(module_idP,frameP,eNB_index);
} }
} }
void mrbch_phy_sync_failure(module_id_t module_idP, frame_t frameP, uint8_t free_eNB_index) //init as CH void mrbch_phy_sync_failure(module_id_t module_idP, frame_t frameP, uint8_t free_eNB_index) //init as CH
......
...@@ -121,6 +121,27 @@ extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openai ...@@ -121,6 +121,27 @@ extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openai
extern void fill_ue_band_info(void); extern void fill_ue_band_info(void);
extern void init_UE(int); extern void init_UE(int);
struct timing_info_t {
//unsigned int frame, hw_slot, last_slot, next_slot;
RTIME time_min, time_max, time_avg, time_last, time_now;
//unsigned int mbox0, mbox1, mbox2, mbox_target;
unsigned int n_samples;
} timing_info;
uint8_t abstraction_flag=0;
openair0_config_t openair0_cfg[MAX_CARDS];
int32_t **rxdata;
int32_t **txdata;
int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg, openair0_rf_map rf_map[MAX_NUM_CCs]);
int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_cfg, openair0_rf_map rf_map[MAX_NUM_CCs]);
uint16_t runtime_phy_rx[29][6]; // SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75, 100]
uint16_t runtime_phy_tx[29][6]; // SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75, 100]
double cpuf;
void fill_ue_band_info(void);
#ifdef XFORMS #ifdef XFORMS
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0) // current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
// at eNB 0, an UL scope for every UE // at eNB 0, an UL scope for every UE
...@@ -1395,7 +1416,12 @@ int main( int argc, char **argv ) ...@@ -1395,7 +1416,12 @@ int main( int argc, char **argv )
#endif #endif
int CC_id; int CC_id;
<<<<<<< 3fdcf5b676124652c36f1b343370d6f94b246f5c
uint8_t abstraction_flag=0; uint8_t abstraction_flag=0;
=======
uint16_t Nid_cell = 0;
uint8_t cooperation_flag=0;
>>>>>>> openair2: fix abstraction mode for oaisim with MME
uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2; uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
#if defined (XFORMS) #if defined (XFORMS)
......
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