Add 802.21 in oaisim exe, work in progress.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4658 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Lionel Gauthier
2013-12-10 15:58:00 +00:00
parent 568128e190
commit a632b032c6
30 changed files with 728 additions and 225 deletions
+14 -5
View File
@@ -5,11 +5,11 @@ default: oaisim
include $(OPENAIR_TARGETS)/Makefile.common
TOP_DIR = $(OPENAIR1_DIR)
OPENAIR1_TOP = $(OPENAIR1_DIR)
OPENAIR2_TOP = $(OPENAIR2_DIR)
OPENAIR3_TOP = $(OPENAIR3_DIR)
OPENAIR3 = $(OPENAIR3_DIR)
TOP_DIR = $(OPENAIR1_DIR)
OPENAIR1_TOP = $(OPENAIR1_DIR)
OPENAIR2_TOP = $(OPENAIR2_DIR)
OPENAIR3_TOP = $(OPENAIR3_DIR)
OPENAIR3 = $(OPENAIR3_DIR)
CPUFLAGS = -mmmx -msse -msse2 -msse4.1 -march=native
# FORCE ssse3 for compilation of openair on User Mode Linux
@@ -131,6 +131,14 @@ CFLAGS += -DRel8
#endif
endif
ifeq ($(ENABLE_RAL), 1)
CFLAGS += -DENABLE_RAL
endif
ifeq ($(MIH_C_MEDIEVAL_EXTENSIONS), 1)
CFLAGS += -DMIH_C_MEDIEVAL_EXTENSIONS
endif
ifeq ($(NAS), 1)
CFLAGS += -DNAS_NETLINK -DLINUX
NAS_FLAG=1
@@ -185,6 +193,7 @@ include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
include $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/Makefile.inc
include $(OPENAIR2_DIR)/RRC/NAS/Makefile.inc
include $(OPENAIR2_DIR)/UTIL/Makefile.inc
include $(OPENAIR3_DIR)/RAL-LTE/Makefile.inc
include $(OPENAIR2_DIR)/ENB_APP/Makefile.inc
INCLUDES += -I$(TOP_DIR)
+28 -18
View File
@@ -13,6 +13,10 @@
#include "UTIL/OTG/otg.h"
#include "UTIL/OTG/otg_vars.h"
#include "oml.h"
#ifdef ENABLE_RAL
#include "lteRALenb.h"
#include "lteRALue.h"
#endif
#if defined(ENABLE_ITTI)
# include "intertask_interface_init.h"
@@ -400,7 +404,10 @@ void oaisim_config() {
}
}
// init other comps
#ifdef ENABLE_RAL
mRAL_init_default_values();
eRAL_init_default_values();
#endif
olg_config();
ocg_config_emu();
ocg_config_env();// mobility gen
@@ -444,27 +451,30 @@ int olg_config() {
oai_emulation.info.g_log_level,
oai_emulation.info.g_log_verbosity,
oai_emulation.emulation_config.log_emu.interval);
/*
// if perf eval then reset the otg log level
set_comp_log(PHY, LOG_NONE, 0x15,1);
set_comp_log(EMU, LOG_FULL, 0x15,1);
set_comp_log(OCG, LOG_NONE, 0x15,1);
set_comp_log(OCM, LOG_NONE, 0x15,1);
set_comp_log(OTG, LOG_NONE, 0x15,1);
set_comp_log(MAC, LOG_NONE, 0x15,1);
set_comp_log(OMG, LOG_NONE, 0x15,1);
set_comp_log(OPT, LOG_ERR, 0x15,1); */
/*
set_log(OCG, LOG_DEBUG, 1);
set_log(EMU, LOG_INFO, 20);
set_log(MAC, LOG_DEBUG, 1);
set_comp_log(PHY, LOG_EMERG, 0x15,1);
set_comp_log(EMU, LOG_EMERG, 0x15,1);
set_comp_log(OCG, LOG_EMERG, 0x15,1);
set_comp_log(OCM, LOG_EMERG, 0x15,1);
set_comp_log(OTG, LOG_EMERG, 0x15,1);
set_comp_log(MAC, LOG_EMERG, 0x15,1);
set_comp_log(OMG, LOG_EMERG, 0x15,1);
set_comp_log(OPT, LOG_EMERG, 0x15,1);
set_comp_log(PDCP, LOG_TRACE, LOG_MED,1);
set_comp_log(RLC, LOG_TRACE, LOG_MED,1);
set_comp_log(RRC, LOG_TRACE, LOG_MED,1);
//set_log(OCG, LOG_DEBUG, 1);
//set_log(EMU, LOG_INFO, 20);
//set_log(MAC, LOG_DEBUG, 1);
set_log(RLC, LOG_TRACE, 1);
set_log(PHY, LOG_DEBUG, 1);
//set_log(PHY, LOG_DEBUG, 1);
set_log(PDCP, LOG_TRACE, 1);
set_log(RRC, LOG_DEBUG, 1);
set_log(OCM, LOG_INFO, 20);
set_log(OTG, LOG_INFO, 1);
set_comp_log(OCG, LOG_ERR, 0x15,1);
//set_log(OCM, LOG_INFO, 20);
//set_log(OTG, LOG_INFO, 1);
/* set_comp_log(OCG, LOG_ERR, 0x15,1);
set_comp_log(EMU, LOG_ERR, 0x15,20);
set_comp_log(MAC, LOG_ERR, 0x15,1);
set_comp_log(RLC, LOG_INFO, 0x15,1);
+122 -6
View File
@@ -25,6 +25,8 @@
#include "UTIL/OPT/opt.h"
#include "UTIL/OTG/otg_config.h"
#include "UTIL/OTG/otg_tx.h"
#include "lteRALenb.h"
#include "lteRALue.h"
#include "cor_SF_sim.h"
@@ -74,6 +76,7 @@ Node_list ue_node_list = NULL;
Node_list enb_node_list = NULL;
int pdcp_period, omg_period;
// time calibration for soft realtime mode
struct timespec time_spec;
unsigned long time_last, time_now;
@@ -114,8 +117,22 @@ void get_simulation_options(int argc, char *argv[]) {
char c;
int option_index;
static struct option long_options[] = {
{"pdcp_period", 1, 0, 0},
{"omg_period", 1, 0, 0},
{"pdcp_period", 1, 0, 0},
{"omg_period", 1, 0, 0},
{"enb-ral-listening-port", required_argument, 0, 0},
{"enb-ral-ip-address", required_argument, 0, 0},
{"enb-ral-link-id", required_argument, 0, 0},
{"enb-ral-link-address", required_argument, 0, 0},
{"enb-mihf-remote-port", required_argument, 0, 0},
{"enb-mihf-ip-address", required_argument, 0, 0},
{"enb-mihf-id", required_argument, 0, 0},
{"ue-ral-listening-port", required_argument, 0, 0},
{"ue-ral-ip-address", required_argument, 0, 0},
{"ue-ral-link-id", required_argument, 0, 0},
{"ue-ral-link-address", required_argument, 0, 0},
{"ue-mihf-remote-port", required_argument, 0, 0},
{"ue-mihf-ip-address", required_argument, 0, 0},
{"ue-mihf-id", required_argument, 0, 0},
{NULL, 0, NULL, 0}
};
@@ -128,10 +145,80 @@ void get_simulation_options(int argc, char *argv[]) {
printf("PDCP period is %d\n", pdcp_period);
}
} else if (! strcmp(long_options[option_index].name, "omg_period")) {
if (optarg) {
omg_period = atoi(optarg);
printf("OMG period is %d\n", omg_period);
}
if (optarg) {
omg_period = atoi(optarg);
printf("OMG period is %d\n", omg_period);
}
} else if (! strcmp(long_options[option_index].name, "enb-ral-listening-port")) {
if (optarg) {
g_conf_enb_ral_listening_port = strdup(optarg);
printf("eNB RAL listening port is %s\n", g_conf_enb_ral_listening_port);
}
} else if (! strcmp(long_options[option_index].name, "enb-ral-ip-address")) {
if (optarg) {
g_conf_enb_ral_ip_address = strdup(optarg);
printf("eNB RAL IP address is %s\n", g_conf_enb_ral_ip_address);
}
} else if (! strcmp(long_options[option_index].name, "enb-ral-link-address")) {
if (optarg) {
g_conf_enb_ral_link_address = strdup(optarg);
printf("eNB RAL link address is %s\n", g_conf_enb_ral_link_address);
}
} else if (! strcmp(long_options[option_index].name, "enb-mihf-remote-port")) {
if (optarg) {
g_conf_enb_mihf_remote_port = strdup(optarg);
printf("eNB MIH-F remote port is %s\n", g_conf_enb_mihf_remote_port);
}
} else if (! strcmp(long_options[option_index].name, "enb-mihf-ip-address")) {
if (optarg) {
g_conf_enb_mihf_ip_address = strdup(optarg);
printf("eNB MIH-F IP address is %s\n", g_conf_enb_mihf_ip_address);
}
} else if (! strcmp(long_options[option_index].name, "enb-ral-link-id")) {
if (optarg) {
g_conf_enb_ral_link_id = strdup(optarg);
printf("eNB RAL link id is %s\n", g_conf_enb_ral_link_id);
}
} else if (! strcmp(long_options[option_index].name, "enb-mihf-id")) {
if (optarg) {
g_conf_enb_mihf_id = strdup(optarg);
printf("eNB MIH-F id is %s\n", g_conf_enb_mihf_id);
}
} else if (! strcmp(long_options[option_index].name, "ue-ral-listening-port")) {
if (optarg) {
g_conf_ue_ral_listening_port = strdup(optarg);
printf("UE RAL listening port is %s\n", g_conf_ue_ral_listening_port);
}
} else if (! strcmp(long_options[option_index].name, "ue-ral-ip-address")) {
if (optarg) {
g_conf_ue_ral_ip_address = strdup(optarg);
printf("UE RAL IP address is %s\n", g_conf_ue_ral_ip_address);
}
} else if (! strcmp(long_options[option_index].name, "ue-ral-link-address")) {
if (optarg) {
g_conf_ue_ral_link_address = strdup(optarg);
printf("UE RAL link address is %s\n", g_conf_ue_ral_link_address);
}
} else if (! strcmp(long_options[option_index].name, "ue-mihf-remote-port")) {
if (optarg) {
g_conf_ue_mihf_remote_port = strdup(optarg);
printf("UE MIH-F remote port is %s\n", g_conf_ue_mihf_remote_port);
}
} else if (! strcmp(long_options[option_index].name, "ue-mihf-ip-address")) {
if (optarg) {
g_conf_ue_mihf_ip_address = strdup(optarg);
printf("UE MIH-F IP address is %s\n", g_conf_ue_mihf_ip_address);
}
} else if (! strcmp(long_options[option_index].name, "ue-ral-link-id")) {
if (optarg) {
g_conf_ue_ral_link_id = strdup(optarg);
printf("UE RAL link id is %s\n", g_conf_ue_ral_link_id);
}
} else if (! strcmp(long_options[option_index].name, "ue-mihf-id")) {
if (optarg) {
g_conf_ue_mihf_id = strdup(optarg);
printf("UE MIH-F id is %s\n", g_conf_ue_mihf_id);
}
}
break;
case 'L': // set FDD
@@ -603,9 +690,38 @@ void init_openair2() {
}
mac_xface->macphy_exit = exit_fun;
#ifdef ENABLE_RAL
init_802_21_link_saps();
#endif
#endif
}
void init_802_21_link_saps() {
#ifdef ENABLE_RAL
#ifdef OPENAIR2
#if defined(ENABLE_ITTI)
if (NB_eNB_INST > 0) {
if (itti_create_task (TASK_RAL_ENB, eRAL_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing RAL eNB task interface: FAILED\n");
exit (-1);
}
}
if (NB_UE_INST > 0) {
if (itti_create_task (TASK_RAL_UE, mRAL_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing RAL UE task interface: FAILED\n");
exit (-1);
}
}
#endif
#endif
#endif
}
void init_ocm() {
s32 UE_id, eNB_id;
/* Added for PHY abstraction */
+2
View File
@@ -20,6 +20,8 @@ void init_openair1();
void init_openair2();
void init_802_21_link_saps();
void init_ocm();
void init_otg_pdcp_buffer();
+2
View File
@@ -437,6 +437,8 @@ void run(int argc, char *argv[]) {
pdcp_period = 1;
omg_period = 10;
mRAL_init_default_values(); //Default values
eRAL_init_default_values(); //Default values
init_oai_emulation(); //Default values