Commit 91dbe8d6 authored by Navid Nikaein's avatar Navid Nikaein

* Change the Linux Sched policy to SCHED_DEADLINE for the kernel version > 3.14

* Add MAC/RRC wireshark interface to LTE softmodem
* Add OTG support to the eNB App, and some cleanup


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6115 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 0b9c724a
...@@ -56,11 +56,21 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti ...@@ -56,11 +56,21 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti
if (first_time == 0) { if (first_time == 0) {
first_time=1; first_time=1;
if ((total_exec_time == NULL) || (sf_exec_time== NULL))
fprintf(stderr, "%25s %25s %25s %25s %6f\n","Name","Total","Per Trials", "Num Trials","CPU_F_GHz", cpu_freq_GHz);
else
fprintf(stderr, "%25s %25s %25s %20s %15s %6f\n","Name","Total","Average/Frame","Trials","CPU_F_GHz", cpu_freq_GHz); fprintf(stderr, "%25s %25s %25s %20s %15s %6f\n","Name","Total","Average/Frame","Trials","CPU_F_GHz", cpu_freq_GHz);
} }
if (ts->trials>0) { if (ts->trials>0) {
//printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials); //printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials);
if ((total_exec_time == NULL) || (sf_exec_time== NULL)){
fprintf(stderr, "%25s: %15.3f ms ; %15.3f us; %15d;\n",
name,
(ts->diff/cpu_freq_GHz/1000000.0),
(ts->diff/ts->trials/cpu_freq_GHz/1000.0),
ts->trials);
}else {
fprintf(stderr, "%25s: %15.3f ms (%5.2f%%); %15.3f us (%5.2f%%); %15d;\n", fprintf(stderr, "%25s: %15.3f ms (%5.2f%%); %15.3f us (%5.2f%%); %15d;\n",
name, name,
(ts->diff/cpu_freq_GHz/1000000.0), (ts->diff/cpu_freq_GHz/1000000.0),
...@@ -70,6 +80,7 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti ...@@ -70,6 +80,7 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti
ts->trials); ts->trials);
} }
} }
}
} }
......
...@@ -302,6 +302,11 @@ typedef struct PHY_VARS_eNB_s{ ...@@ -302,6 +302,11 @@ typedef struct PHY_VARS_eNB_s{
time_stats_t phy_proc; time_stats_t phy_proc;
time_stats_t phy_proc_tx; time_stats_t phy_proc_tx;
time_stats_t phy_proc_rx; time_stats_t phy_proc_rx;
/*
time_stats_t phy_proc_sf[10]; // for each subframe
time_stats_t phy_proc_tx_sf[10];
time_stats_t phy_proc_rx_sf[10];
*/
time_stats_t rx_prach; time_stats_t rx_prach;
time_stats_t ofdm_mod_stats; time_stats_t ofdm_mod_stats;
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#include "log_extern.h" #include "log_extern.h"
#include "assertions.h" #include "assertions.h"
#include "enb_config.h" #include "enb_config.h"
#include "UTIL/OTG/otg.h"
#include "UTIL/OTG/otg_externs.h"
#if defined(OAI_EMU) #if defined(OAI_EMU)
# include "OCG.h" # include "OCG.h"
# include "OCG_extern.h" # include "OCG_extern.h"
...@@ -162,6 +164,11 @@ ...@@ -162,6 +164,11 @@
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying" #define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying"
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info" #define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info"
// OTG config per ENB-UE DL
#define ENB_CONF_STRING_OTG_CONFIG "otg_config"
#define ENB_CONF_STRING_OTG_UE_ID "ue_id"
#define ENB_CONF_STRING_OTG_APP_TYPE "app_type"
#define ENB_CONF_STRING_OTG_BG_TRAFFIC "bg_traffic"
// per eNB configuration // per eNB configuration
#define ENB_CONFIG_STRING_LOG_CONFIG "log_config" #define ENB_CONFIG_STRING_LOG_CONFIG "log_config"
...@@ -185,8 +192,6 @@ ...@@ -185,8 +192,6 @@
#define ENB_CONFIG_STRING_UDP_LOG_VERBOSITY "udp_log_verbosity" #define ENB_CONFIG_STRING_UDP_LOG_VERBOSITY "udp_log_verbosity"
#define KHz (1000UL) #define KHz (1000UL)
#define MHz (1000 * KHz) #define MHz (1000 * KHz)
...@@ -345,6 +350,11 @@ static void enb_config_display(void) { ...@@ -345,6 +350,11 @@ static void enb_config_display(void) {
printf( "\tue_TimersAndConstants_n311 for CC %d:\t%d:\n",j,enb_properties.properties[i]->ue_TimersAndConstants_n311[j]); printf( "\tue_TimersAndConstants_n311 for CC %d:\t%d:\n",j,enb_properties.properties[i]->ue_TimersAndConstants_n311[j]);
} }
for (j=0; j < enb_properties.properties[i]->num_otg_elements; j++){
printf( "\n\tOTG Destination UE ID: \t%d", enb_properties.properties[i]->otg_ue_id[j]);
printf( "\n\tOTG App Type: \t%d", enb_properties.properties[i]->otg_app_type[j]);
printf( "\n\tOTG Background Traffic: \t%s\n", (enb_properties.properties[i]->otg_bg_traffic[j]==1) ? "Enabled" : "Disabled");
}
printf( "\n\tGlobal log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->glog_level)); printf( "\n\tGlobal log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->glog_level));
printf( "\tHW log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->hw_log_level)); printf( "\tHW log level: \t%s\n", map_int_to_str(log_level_names,enb_properties.properties[i]->hw_log_level));
...@@ -420,10 +430,13 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -420,10 +430,13 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
config_setting_t *setting_mme_addresses = NULL; config_setting_t *setting_mme_addresses = NULL;
config_setting_t *setting_mme_address = NULL; config_setting_t *setting_mme_address = NULL;
config_setting_t *setting_enb = NULL; config_setting_t *setting_enb = NULL;
config_setting_t *setting_otg = NULL;
config_setting_t *subsetting_otg = NULL;
int num_enb_properties = 0; int num_enb_properties = 0;
int enb_properties_index = 0; int enb_properties_index = 0;
int num_enbs; int num_enbs;
int num_mme_address; int num_mme_address;
int num_otg_elements =0;
int num_component_carriers =0; int num_component_carriers =0;
int i; int i;
int j; int j;
...@@ -523,6 +536,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -523,6 +536,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
char *address = NULL; char *address = NULL;
char *cidr = NULL; char *cidr = NULL;
char *astring = NULL; char *astring = NULL;
libconfig_int otg_ue_id = 0;
char* otg_app_type = NULL;
char* otg_bg_traffic = NULL;
char* glog_level = NULL; char* glog_level = NULL;
char* glog_verbosity = NULL; char* glog_verbosity = NULL;
char* hw_log_level = NULL; char* hw_log_level = NULL;
...@@ -1634,6 +1650,41 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -1634,6 +1650,41 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
} }
} }
} }
// OTG _CONFIG
setting_otg = config_setting_get_member (setting_enb, ENB_CONF_STRING_OTG_CONFIG);
if(setting_otg != NULL) {
num_otg_elements = config_setting_length(setting_otg);
printf("num otg elements %d \n", num_otg_elements);
enb_properties.properties[enb_properties_index]->num_otg_elements = 0;
for (j = 0; j < num_otg_elements; j++) {
subsetting_otg=config_setting_get_elem(setting_otg, j);
if(config_setting_lookup_int(subsetting_otg, ENB_CONF_STRING_OTG_UE_ID, &otg_ue_id))
enb_properties.properties[enb_properties_index]->otg_ue_id[j] = otg_ue_id;
else
enb_properties.properties[enb_properties_index]->otg_ue_id[j] = 1;
if(config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_APP_TYPE, (const char **)&otg_app_type)){
if ((enb_properties.properties[enb_properties_index]->otg_app_type[j] = map_str_to_int(otg_app_type_names,otg_app_type))== -1)
enb_properties.properties[enb_properties_index]->otg_app_type[j] = BCBR;
}else
enb_properties.properties[enb_properties_index]->otg_app_type[j] = NO_PREDEFINED_TRAFFIC; // 0
if(config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_BG_TRAFFIC, (const char **)&otg_bg_traffic)){
if ((enb_properties.properties[enb_properties_index]->otg_bg_traffic[j] = map_str_to_int(switch_names,otg_bg_traffic)) == -1){
enb_properties.properties[enb_properties_index]->otg_bg_traffic[j]=0;
}
}else{
enb_properties.properties[enb_properties_index]->otg_bg_traffic[j] = 0;
printf("otg bg %s\n", otg_bg_traffic);
}
enb_properties.properties[enb_properties_index]->num_otg_elements+=1;
}
}
// log_config // log_config
subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_LOG_CONFIG); subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_LOG_CONFIG);
if(subsetting != NULL) { if(subsetting != NULL) {
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
/* /*
enb_config.h enb_config.h
------------------- -------------------
AUTHOR : Lionel GAUTHIER, Laurent Winckel AUTHOR : Lionel GAUTHIER, Navid Nikaein, Laurent Winckel
COMPANY : EURECOM COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
*/ */
#ifndef ENB_CONFIG_H_ #ifndef ENB_CONFIG_H_
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "commonDef.h" #include "commonDef.h"
#include "platform_types.h" #include "platform_types.h"
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
#include "PHY/impl_defs_top.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h" #include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
...@@ -181,6 +182,13 @@ typedef struct Enb_properties_s { ...@@ -181,6 +182,13 @@ typedef struct Enb_properties_s {
char *enb_interface_name_for_S1_MME; char *enb_interface_name_for_S1_MME;
in_addr_t enb_ipv4_address_for_S1_MME; in_addr_t enb_ipv4_address_for_S1_MME;
// otg config
/* Nb of OTG elements */
uint8_t num_otg_elements;
/* element config*/
uint16_t otg_ue_id[NUMBER_OF_UE_MAX+1];
uint8_t otg_app_type[NUMBER_OF_UE_MAX+1];
uint8_t otg_bg_traffic[NUMBER_OF_UE_MAX+1];
// log config // log config
int16_t glog_level; int16_t glog_level;
int16_t glog_verbosity; int16_t glog_verbosity;
......
...@@ -2630,8 +2630,7 @@ uint8_t check_trigger_meas_event(module_id_t ue_mod_idP,frame_t frameP, uint8_t ...@@ -2630,8 +2630,7 @@ uint8_t check_trigger_meas_event(module_id_t ue_mod_idP,frame_t frameP, uint8_t
if(eNB_offset<eNB_index){ if(eNB_offset<eNB_index){
tmp_offset = eNB_offset; tmp_offset = eNB_offset;
} }
else else {
{
tmp_offset = eNB_offset-1; tmp_offset = eNB_offset-1;
} }
if(UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_offset]+ofn+ocn-hys > UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_index]+ofs+ocs-1/*+a3_offset*/) { if(UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_offset]+ofn+ocn-hys > UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_index]+ofs+ocs-1/*+a3_offset*/) {
......
...@@ -58,8 +58,8 @@ This header file must be included */ ...@@ -58,8 +58,8 @@ This header file must be included */
#define project_include #define project_include
#include "UTIL/LOG/log_if.h" #include "UTIL/LOG/log_if.h"
// #include "UTIL/LOG/log_extern.h" // #include "UTIL/LOG/log_extern.h"
#include "PHY/defs.h" //#include "PHY/defs.h"
#include "PHY/extern.h" //#include "PHY/extern.h"
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
#endif #endif
......
...@@ -42,13 +42,30 @@ ...@@ -42,13 +42,30 @@
# define __OTG_EXTERNS_H__ # define __OTG_EXTERNS_H__
/*!< \brief main log variables */ /*!< \brief main log variables */
extern otg_t *g_otg; /*!< \brief global params */ extern otg_t *g_otg; /*!< \brief global params */
extern otg_multicast_t *g_otg_multicast; /*!< \brief global params */ extern otg_multicast_t *g_otg_multicast; /*!< \brief global params */
extern otg_info_t *otg_info; /*!< \brief info otg */ extern otg_info_t *otg_info; /*!< \brief info otg */
extern otg_multicast_info_t *otg_multicast_info; /*!< \brief info otg: measurements about the simulation */ extern otg_multicast_info_t *otg_multicast_info; /*!< \brief info otg: measurements about the simulation */
extern otg_forms_info_t *otg_forms_info;
extern mapping otg_multicast_app_type_names[] ;
extern mapping otg_app_type_names[];
extern mapping otg_transport_protocol_names[];
extern mapping otg_ip_version_names[];
extern mapping otg_multicast_app_type_names[];
extern mapping otg_distribution_names[];
extern mapping frame_type_names[];
extern mapping switch_names[] ;
extern mapping packet_gen_names[];
#endif #endif
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
*/ */
#include "otg_form.h" #include "otg_form.h"
#include "otg_vars.h" #include "otg_externs.h"
#include "otg_kpi.h" #include "otg_kpi.h"
extern unsigned char NB_eNB_INST; extern unsigned char NB_eNB_INST;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
*/ */
#include "otg_rx.h" #include "otg_rx.h"
#include "otg_vars.h" #include "otg_externs.h"
#include "../UTIL/MATH/oml.h" #include "../UTIL/MATH/oml.h"
#include <math.h> #include <math.h>
#include "otg_form.h" #include "otg_form.h"
......
...@@ -41,11 +41,12 @@ ...@@ -41,11 +41,12 @@
#include "UTIL/MATH/oml.h" #include "UTIL/MATH/oml.h"
#include "otg_tx.h" #include "otg_tx.h"
#include "otg_vars.h" #include "otg_externs.h"
extern unsigned char NB_eNB_INST; extern unsigned char NB_eNB_INST;
extern unsigned char NB_UE_INST; extern unsigned char NB_UE_INST;
// char string for payload gen // char string for payload gen
const char HEADER_STRING[] = "048717272261061594909177115977673656394812939088509638561159848103044447631759621785741859753883189837913087874397230808338408049820398430984093477437879374893649639479575023646394693665969273071047"; const char HEADER_STRING[] = "048717272261061594909177115977673656394812939088509638561159848103044447631759621785741859753883189837913087874397230808338408049820398430984093477437879374893649639479575023646394693665969273071047";
const char PAYLOAD_STRING[] = "UVk5miARQfZGDFKf1wS0dt57kHigd0fXNrUZCjIhpyOS4pZWMHOP1GPdgXmlPtarLUjd3Rmkg05bhUZWtDDmdhrl5EzMZz6DkhIg0Uq7NlaU8ZGrt9EzgVLdr9SiBOLLXiTN3aMInMrlDYFYZ8n5WYbfZTnpz13lbMY4OBE4eWfIMLvBLLyzzzEqjUGILBVMfKGVccPi0VSCyg28RqAiR3z1P6zryk4FWFp0G78AUT1hZWhGcGOTDcKj9bCzny592m1Dj123KWczIm5KVLupO7AP83flqamimfLz6GtHrz5ZN2BAEVQjUhYSc35s5jDhofIlL2U4qPT3Ilsd7amTjaCl5zE0L89ZeIcPCWKSEuNdH5gG8sojuSvph1hU0gG4QOLhCk15IE8eCeMCz2LTL68U0hEQqeM6UmgmA9j7Eid7oPzQHbzj8A30HzGXGhWpt4CT3MSwWVvcCWSbYjkYGgOhHj5csTsONWyGAh5l3qquf8v3jGRSRu0nGXqYILCkw1SX9Na46qodrN6BnPl49djH2AuAaYKAStoR9oL7I1aZG6rVLFPMIZiAqF1tuDVcX9VWnyTVpTMXR6GtBp5bgfDyKuT4ZE9MDUASikGA5hoMfX5Gf2Ml7eLGBtEqZF4rouczHI0DRfgX4ev967n6dYFFkaXbFTvWdykN5bfMinzcrWeqVrmZhTvtUkvq3Rc9enM9qTNz6cDo0HHM0VD8EYtpaPH3yG2CYGDgogHlkaCcHaOyViyq8RH8wf4WQWoHuTNG1kWdkpgTrWic5Gv5p24O9YAPMOn6A1IsdvwpOF85qj8nPvj4nfIo385HOjGfadzfBXueruaKEa0lvbhLgS1bQWKv5fE7k2cMPzQ8USIpUyBhBGUHsLKaykvsr1qDTueAUWAGH8VqyozZ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the simulation ...@@ -48,8 +48,113 @@ otg_info_t *otg_info; /*!< \brief info otg: measurements about the simulation
otg_multicast_info_t *otg_multicast_info; /*!< \brief info otg: measurements about the simulation */ otg_multicast_info_t *otg_multicast_info; /*!< \brief info otg: measurements about the simulation */
otg_forms_info_t *otg_forms_info; otg_forms_info_t *otg_forms_info;
mapping otg_app_type_names[] =
{
{"no_predefined_traffic", 0},
{"m2m", 1},
{"scbr", 2},
{"mcbr", 3},
{"bcbr", 4},
{"auto_pilot", 5},
{"bicycle_race", 6},
{"open_arena", 7},
{"team_fortress", 8},
{"full_buffer", 9},
{"m2m_traffic", 10},
{"auto_pilot_l",11},
{"auto_pilot_m", 12},
{"auto_pilot_h", 13},
{"auto_pilot_e", 14},
{"virtual_game_l", 15},
{"virtual_game_m", 16},
{"virtual_game_h", 17},
{"virtual_game_f", 18},
{"alarm_humidity", 19},
{"alarm_smoke",20},
{"alarm_temperature", 21},
{"openarena_dl", 22},
{"openarena_ul", 23},
{"voip_g711", 24},
{"voip_g729", 25},
{"iqsim_mango", 26},
{"iqsim_newsteo", 27},
{"openarena_dl_tarma", 28},
{"video_vbr_10mbps", 29},
{"video_vbr_4mbps", 30},
{"video_vbr_2mbps", 31},
{"video_vbr_768kbps", 32},
{"video_vbr_384kbps", 33},
{"video_vbr_192kpbs", 34},
{"background_users", 35},
{NULL, -1}
};
mapping otg_transport_protocol_names[] =
{
{"no_proto", 0},
{"udp", 1},
{"tcp", 2},
{NULL, -1}
};
mapping otg_ip_version_names[] =
{
{"no_ip", 0},
{"ipv4", 1},
{"ipv6", 2},
{NULL, -1}
};
mapping otg_multicast_app_type_names[] = {
{"no_predefined_multicast_traffic", 0},
{"mscbr", 1},
{"mmcbr", 2},
{"mbcbr", 3},
{"msvbr", 4},
{"mmvbr", 5},
{"mbvbr", 6},
{"mvideo_vbr_4mbps", 7},
{NULL, -1}
} ;
mapping otg_distribution_names[] =
{
{"no_customized_traffic", 0},
{"uniform", 1},
{"gaussian", 2},
{"exponential", 3},
{"poisson", 4},
{"fixed", 5},
{"weibull", 6},
{"pareto", 7},
{"gamma", 8},
{"cauchy",9},
{"log_normal",10},
{"tarma",11},
{"video",12},
{"background_dist",13},
{NULL, -1}
};
mapping frame_type_names[] =
{
{"TDD", 1},
{"FDD", 0},
{NULL, -1}
};
mapping switch_names[] =
{
{"disable", 0},
{"enable", 1},
{NULL, -1}
};
mapping packet_gen_names[] =
{
{"repeat_string", 0},
{"substract_string", 1},
{"random_position", 2},
{"random_string", 3},
{NULL, -1}
};
//int ptime; /*!< \brief ptime is uses to compute the local simulation time */ //int ptime; /*!< \brief ptime is uses to compute the local simulation time */
#endif #endif
...@@ -120,7 +120,20 @@ eNBs = ...@@ -120,7 +120,20 @@ eNBs =
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.82/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.82/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
/*
otg_config = (
{
ue_id =1;
app_type ="scbr";
bg_traffic ="disable";
},
{
ue_id =2;
app_type ="bcbr";
bg_traffic ="enable";
}
);
*/
log_config : log_config :
{ {
global_log_level ="info"; global_log_level ="info";
......
...@@ -18,6 +18,16 @@ ifeq "$(GCCVERSION)" "4.6.1" ...@@ -18,6 +18,16 @@ ifeq "$(GCCVERSION)" "4.6.1"
CFLAGS += -Wno-packed-bitfield-compat CFLAGS += -Wno-packed-bitfield-compat
endif endif
KERNEL_VERSION=$(shell echo `uname -r | cut -d. -f-2`)
KERNEL_TYPE=$(shell echo `uname -r | cut -d. -f-3 | cut -d- -f3`)
LOWLATENCY_KERNEL=$(shell if [ $(KERNEL_TYPE) = "lowlatency" ]; then echo "1" ; else echo "0" ; fi)
ifdef LOWLATENCY # this ifdef is to be removed after the debugging
ifeq ($(LOWLATENCY_KERNEL),1)
CFLAGS+=-DLOWLATENCY
endif
endif
ifndef USRP ifndef USRP
USRP=0 USRP=0
endif endif
...@@ -115,7 +125,7 @@ OBJ += $(LOG_OBJS) ...@@ -115,7 +125,7 @@ OBJ += $(LOG_OBJS)
ifeq ($(OPENAIR2),1) ifeq ($(OPENAIR2),1)
ASN1_MSG_OBJS1=$(addprefix $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/, $(ASN1_MSG_OBJS)) ASN1_MSG_OBJS1=$(addprefix $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/, $(ASN1_MSG_OBJS))
OBJ += $(L2_OBJS) $(LIST_OBJ) $(TIMER_OBJ) $(MEM_OBJ) $(OTG_OBJS) $(MATH_OBJS) $(OSA_OBJS) OBJ += $(L2_OBJS) $(LIST_OBJ) $(TIMER_OBJ) $(MEM_OBJ) $(OTG_OBJS) $(MATH_OBJS) $(OSA_OBJS) $(OPT_OBJS)
OBJ += $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/netlink_init.o OBJ += $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/netlink_init.o
#OBJ += $(PDCP_DIR)/pdcp_thread.o #OBJ += $(PDCP_DIR)/pdcp_thread.o
CFLAGS += -DOPENAIR2 -DNO_RRM -DPUCCH -DMAC_CONTEXT=1 CFLAGS += -DOPENAIR2 -DNO_RRM -DPUCCH -DMAC_CONTEXT=1
...@@ -404,6 +414,7 @@ show: ...@@ -404,6 +414,7 @@ show:
@echo IS_REL10 is $(IS_REL10) @echo IS_REL10 is $(IS_REL10)
@echo openssl $(OPENSSL_FOUND) @echo openssl $(OPENSSL_FOUND)
@echo nettle $(NETTLE_FOUND) @echo nettle $(NETTLE_FOUND)
@echo lowlatency kernel: $(LOWLATENCY_KERNEL)
beautiful: beautiful:
astyle --style=gnu -s2 $(SRC) astyle --style=gnu -s2 $(SRC)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
[dumpfile] "/tmp/openair_dump_eNB.vcd" [dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Wed Sep 17 09:52:33 2014" [dumpfile_mtime] "Wed Sep 17 09:52:33 2014"
[dumpfile_size] 53042998 [dumpfile_size] 53042998
[savefile] "/homes/knopp/Devel/openair4G/trunk/targets/RT/USER/eNB.gtkw" [savefile] "$OPENAIR_TARGETS/RT/USER/eNB.gtkw"
[timestart] 13048857000 [timestart] 13048857000
[size] 1005 600 [size] 1005 600
[pos] -1 -1 [pos] -1 -1
......
This diff is collapsed.
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
*******************************************************************************/ *******************************************************************************/
/*! \file rt_wrapper.h /*! \file rt_wrapper.h
* \brief provides a wrapper for the timing function for real-time opeartions depending on weather RTAI is used or not * \brief provides a wrapper for the timing function for real-time opeartions depending on weather RTAI is used or not. It also implements an API for the SCHED_DEADLINE kernel scheduler.
* \author F. Kaltenberger * \author F. Kaltenberger and Navid Nikaein
* \date 2013 * \date 2013
* \version 0.1 * \version 0.1
* \company Eurecom * \company Eurecom
* \email: florian.kaltenberger@eurecom.fr * \email: florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr
* \note * \note
* \warning * \warning This code will be removed when a legacy libc API becomes available.
*/ */
#ifndef RTAI #ifndef RTAI
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <pthread.h> #include <pthread.h>
#include <linux/kernel.h>
#include <linux/types.h>
#define RTIME long long int #define RTIME long long int
...@@ -54,6 +56,51 @@ int rt_sleep_ns (RTIME x); ...@@ -54,6 +56,51 @@ int rt_sleep_ns (RTIME x);
void check_clock(void); void check_clock(void);
/**
* see https://www.kernel.org/doc/Documentation/scheduler/sched-deadline.txt or
* http://www.blaess.fr/christophe/2014/04/05/utiliser-un-appel-systeme-inconnu-de-la-libc/
*/
#ifdef LOWLATENCY
#define gettid() syscall(__NR_gettid)
#define SCHED_DEADLINE 6
/* XXX use the proper syscall numbers */
#ifdef __x86_64__
#define __NR_sched_setattr 314
#define __NR_sched_getattr 315
#endif
#ifdef __i386__
#define __NR_sched_setattr 351
#define __NR_sched_getattr 352
#endif
struct sched_attr {
__u32 size;
__u32 sched_policy;
__u64 sched_flags;
/* SCHED_NORMAL, SCHED_BATCH */
__s32 sched_nice;
/* SCHED_FIFO, SCHED_RR */
__u32 sched_priority;
/* SCHED_DEADLINE (nsec) */
__u64 sched_runtime;
__u64 sched_deadline;
__u64 sched_period;
};
int sched_setattr(pid_t pid, const struct sched_attr *attr, unsigned int flags);
int sched_getattr(pid_t pid,struct sched_attr *attr,unsigned int size, unsigned int flags);
#endif
#else #else
#include <rtai_hal.h> #include <rtai_hal.h>
#include <rtai_lxrt.h> #include <rtai_lxrt.h>
......
...@@ -565,7 +565,6 @@ void *l2l1_task(void *args_p) { ...@@ -565,7 +565,6 @@ void *l2l1_task(void *args_p) {
start_meas(&oaisim_stats); start_meas(&oaisim_stats);
for (frame = 0; (l2l1_state != L2L1_TERMINATED) && (frame < oai_emulation.info.n_frames); frame++) { for (frame = 0; (l2l1_state != L2L1_TERMINATED) && (frame < oai_emulation.info.n_frames); frame++) {
start_meas(&oaisim_stats_f);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
do { do {
...@@ -660,6 +659,8 @@ void *l2l1_task(void *args_p) { ...@@ -660,6 +659,8 @@ void *l2l1_task(void *args_p) {
update_ocm (); update_ocm ();
for (slot = 0; slot < 20; slot++) { for (slot = 0; slot < 20; slot++) {
if (slot%2==0)
start_meas(&oaisim_stats_f);
wait_for_slot_isr (); wait_for_slot_isr ();
...@@ -977,7 +978,8 @@ void *l2l1_task(void *args_p) { ...@@ -977,7 +978,8 @@ void *l2l1_task(void *args_p) {
} }
*/ */
} // if Channel_Flag==0 } // if Channel_Flag==0
if (slot%2==1)
stop_meas(&oaisim_stats_f);
}//end of slot }//end of slot
if ((frame >= 10) && (frame <= 11) && (abstraction_flag == 0) if ((frame >= 10) && (frame <= 11) && (abstraction_flag == 0)
...@@ -1028,8 +1030,9 @@ void *l2l1_task(void *args_p) { ...@@ -1028,8 +1030,9 @@ void *l2l1_task(void *args_p) {
smbv_frame_cnt++; smbv_frame_cnt++;
} }
#endif #endif
} }
stop_meas(&oaisim_stats_f);
//end of frame //end of frame
stop_meas(&oaisim_stats); stop_meas(&oaisim_stats);
...@@ -1267,7 +1270,21 @@ void *l2l1_task(void *args_p) { ...@@ -1267,7 +1270,21 @@ void *l2l1_task(void *args_p) {
reset_meas(&UE_pdcp_stats[UE_id].pdcp_ip); reset_meas(&UE_pdcp_stats[UE_id].pdcp_ip);
reset_meas(&UE_pdcp_stats[UE_id].ip_pdcp); reset_meas(&UE_pdcp_stats[UE_id].ip_pdcp);
}
for (eNB_id=0; eNB_id<NB_eNB_INST; eNB_id++) { for (eNB_id=0; eNB_id<NB_eNB_INST; eNB_id++) {
for (UE_id=0; UE_id<NB_UE_INST; UE_id++) {
reset_meas(&eNB2UE[eNB_id][UE_id][0]->random_channel);
reset_meas(&eNB2UE[eNB_id][UE_id][0]->interp_time);
reset_meas(&eNB2UE[eNB_id][UE_id][0]->interp_freq);
reset_meas(&eNB2UE[eNB_id][UE_id][0]->convolution);
reset_meas(&UE2eNB[UE_id][eNB_id][0]->random_channel);
reset_meas(&UE2eNB[UE_id][eNB_id][0]->interp_time);
reset_meas(&UE2eNB[UE_id][eNB_id][0]->interp_freq);
reset_meas(&UE2eNB[UE_id][eNB_id][0]->convolution);
}
reset_meas(&PHY_vars_eNB_g[eNB_id][0]->phy_proc); reset_meas(&PHY_vars_eNB_g[eNB_id][0]->phy_proc);
reset_meas(&PHY_vars_eNB_g[eNB_id][0]->phy_proc_rx); reset_meas(&PHY_vars_eNB_g[eNB_id][0]->phy_proc_rx);
reset_meas(&PHY_vars_eNB_g[eNB_id][0]->phy_proc_tx); reset_meas(&PHY_vars_eNB_g[eNB_id][0]->phy_proc_tx);
...@@ -1300,14 +1317,6 @@ void *l2l1_task(void *args_p) { ...@@ -1300,14 +1317,6 @@ void *l2l1_task(void *args_p) {
reset_meas(&PHY_vars_eNB_g[eNB_id][0]->ulsch_tc_intl1_stats); reset_meas(&PHY_vars_eNB_g[eNB_id][0]->ulsch_tc_intl1_stats);
reset_meas(&PHY_vars_eNB_g[eNB_id][0]->ulsch_tc_intl2_stats); reset_meas(&PHY_vars_eNB_g[eNB_id][0]->ulsch_tc_intl2_stats);
reset_meas(&eNB2UE[eNB_id][UE_id][0]->random_channel);
reset_meas(&eNB2UE[eNB_id][UE_id][0]->interp_time);
reset_meas(&eNB2UE[eNB_id][UE_id][0]->interp_freq);
reset_meas(&eNB2UE[eNB_id][UE_id][0]->convolution);
reset_meas(&UE2eNB[UE_id][eNB_id][0]->random_channel);
reset_meas(&UE2eNB[UE_id][eNB_id][0]->interp_time);
reset_meas(&UE2eNB[UE_id][eNB_id][0]->interp_freq);
reset_meas(&UE2eNB[UE_id][eNB_id][0]->convolution);
/* /*
* L2 functions * L2 functions
*/ */
...@@ -1332,9 +1341,9 @@ void *l2l1_task(void *args_p) { ...@@ -1332,9 +1341,9 @@ void *l2l1_task(void *args_p) {
} }
} }
}
void print_opp_meas(void){ void print_opp_meas(void){
uint8_t eNB_id=0,UE_id=0; uint8_t eNB_id=0,UE_id=0;
print_meas(&oaisim_stats,"[OAI][total_exec_time]", &oaisim_stats,&oaisim_stats); print_meas(&oaisim_stats,"[OAI][total_exec_time]", &oaisim_stats,&oaisim_stats);
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#include "UTIL/OMG/grid.h" #include "UTIL/OMG/grid.h"
#include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_tx.h"
#include "UTIL/OTG/otg.h" #include "UTIL/OTG/otg.h"
#include "UTIL/OTG/otg_vars.h" #include "UTIL/OTG/otg_externs.h"
#include "oml.h" #include "oml.h"
#ifdef ENABLE_RAL #ifdef ENABLE_RAL
#include "lteRALenb.h" #include "lteRALenb.h"
...@@ -84,115 +84,7 @@ mapping omg_rwp_names[] = ...@@ -84,115 +84,7 @@ mapping omg_rwp_names[] =
{"MAX_RWP_TYPES", MAX_RWP_TYPES}, {"MAX_RWP_TYPES", MAX_RWP_TYPES},
{NULL, -1} {NULL, -1}
}; };
mapping otg_multicast_app_type_names[] = {
{"no_predefined_multicast_traffic", 0},
{"mscbr", 1},
{"mmcbr", 2},
{"mbcbr", 3},
{"msvbr", 4},
{"mmvbr", 5},
{"mbvbr", 6},
{"mvideo_vbr_4mbps", 7},
{NULL, -1}
} ;
mapping otg_app_type_names[] =
{
{"no_predefined_traffic", 0},
{"m2m", 1},
{"scbr", 2},
{"mcbr", 3},
{"bcbr", 4},
{"auto_pilot", 5},
{"bicycle_race", 6},
{"open_arena", 7},
{"team_fortress", 8},
{"full_buffer", 9},
{"m2m_traffic", 10},
{"auto_pilot_l",11},
{"auto_pilot_m", 12},
{"auto_pilot_h", 13},
{"auto_pilot_e", 14},
{"virtual_game_l", 15},
{"virtual_game_m", 16},
{"virtual_game_h", 17},
{"virtual_game_f", 18},
{"alarm_humidity", 19},
{"alarm_smoke",20},
{"alarm_temperature", 21},
{"openarena_dl", 22},
{"openarena_ul", 23},
{"voip_g711", 24},
{"voip_g729", 25},
{"iqsim_mango", 26},
{"iqsim_newsteo", 27},
{"openarena_dl_tarma", 28},
{"video_vbr_10mbps", 29},
{"video_vbr_4mbps", 30},
{"video_vbr_2mbps", 31},
{"video_vbr_768kbps", 32},
{"video_vbr_384kbps", 33},
{"video_vbr_192kpbs", 34},
{"background_users", 35},
{NULL, -1}
};
mapping otg_transport_protocol_names[] =
{
{"no_proto", 0},
{"udp", 1},
{"tcp", 2},
{NULL, -1}
};
mapping otg_ip_version_names[] =
{
{"no_ip", 0},
{"ipv4", 1},
{"ipv6", 2},
{NULL, -1}
};
mapping otg_distribution_names[] =
{
{"no_customized_traffic", 0},
{"uniform", 1},
{"gaussian", 2},
{"exponential", 3},
{"poisson", 4},
{"fixed", 5},
{"weibull", 6},
{"pareto", 7},
{"gamma", 8},
{"cauchy",9},
{"log_normal",10},
{"tarma",11},
{"video",12},
{"background_dist",13},
{NULL, -1}
};
mapping frame_type_names[] =
{
{"TDD", 1},
{"FDD", 0},
{NULL, -1}
};
mapping switch_names[] =
{
{"disable", 0},
{"enable", 1},
{NULL, -1}
};
mapping packet_gen_names[] =
{
{"repeat_string", 0},
{"substract_string", 1},
{"random_position", 2},
{"random_string", 3},
{NULL, -1}
};
void init_oai_emulation(void) { void init_oai_emulation(void) {
......
...@@ -58,6 +58,8 @@ The current sturcture of oaisim is shown by the figure. ...@@ -58,6 +58,8 @@ The current sturcture of oaisim is shown by the figure.
#include "UTIL/OPT/opt.h" // to test OPT #include "UTIL/OPT/opt.h" // to test OPT
#include "UTIL/OMG/omg.h" #include "UTIL/OMG/omg.h"
#include "UTIL/CLI/cli_if.h" #include "UTIL/CLI/cli_if.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SIMULATION/ETH_TRANSPORT/defs.h" #include "SIMULATION/ETH_TRANSPORT/defs.h"
#include "PHY/defs.h" #include "PHY/defs.h"
......
...@@ -811,7 +811,18 @@ void init_openair1(void) { ...@@ -811,7 +811,18 @@ void init_openair1(void) {
#endif #endif
// 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],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,
oai_emulation.info.transmission_mode[CC_id],
abstraction_flag,
nb_antennas_rx,
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++){
...@@ -830,8 +841,9 @@ void init_openair1(void) { ...@@ -830,8 +841,9 @@ void init_openair1(void) {
} }
} }
printf ("AFTER init: Nid_cell %d\n", PHY_vars_eNB_g[0][0]->lte_frame_parms.Nid_cell); printf ("AFTER init: MAX_NUM_CCs %d, Nid_cell %d frame_type %d,tdd_config %d\n",
printf ("AFTER init: frame_type %d,tdd_config %d\n", MAX_NUM_CCs,
PHY_vars_eNB_g[0][0]->lte_frame_parms.Nid_cell,
PHY_vars_eNB_g[0][0]->lte_frame_parms.frame_type, PHY_vars_eNB_g[0][0]->lte_frame_parms.frame_type,
PHY_vars_eNB_g[0][0]->lte_frame_parms.tdd_config); PHY_vars_eNB_g[0][0]->lte_frame_parms.tdd_config);
......
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