Commit a731de2f authored by Imad ALAWE's avatar Imad ALAWE Committed by FredericLeroy

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 3fdcf5b6
......@@ -62,24 +62,26 @@
#endif //PHY_EMUL
#include "SCHED/defs.h"
extern uint8_t abstraction_flag;
void dl_phy_sync_success(module_id_t module_idP,
frame_t frameP,
unsigned char eNB_index,
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);
#if ! defined(ENABLE_USE_MME)
#if defined(ENABLE_USE_MME)
int mme_enabled=1;
int mme_enabled=0;
if (first_sync==1) {
if (first_sync==1 && !(mme_enabled==1 && abstraction_flag==0)) {
} else
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
extern void fill_ue_band_info(void);
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
// 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
......@@ -1395,7 +1416,12 @@ int main( int argc, char **argv )
int CC_id;
<<<<<<< 3fdcf5b676124652c36f1b343370d6f94b246f5c
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;
#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