merge develop,fix basic sim and warnings
This commit is contained in:
@@ -960,7 +960,7 @@ void RCconfig_RU(void) {
|
||||
|
||||
static void get_options(void) {
|
||||
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
|
||||
get_common_options();
|
||||
get_common_options(SOFTMODEM_ENB_BIT);
|
||||
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
|
||||
|
||||
if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) {
|
||||
|
||||
@@ -93,10 +93,8 @@
|
||||
// extern openair0_device openair0;
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
extern volatile int start_gNB;
|
||||
extern volatile int start_UE;
|
||||
#endif
|
||||
extern volatile int start_gNB;
|
||||
extern volatile int start_UE;
|
||||
extern volatile int oai_exit;
|
||||
|
||||
extern openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
@@ -360,7 +358,7 @@ static void *gNB_L1_thread( void *param ) {
|
||||
}
|
||||
|
||||
|
||||
#if 0 //defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
#if 0
|
||||
// Wait for gNB application initialization to be complete (gNB registration to MME)
|
||||
static void wait_system_ready (char *message, volatile int *start_flag) {
|
||||
static char *indicator[] = {". ", ".. ", "... ", ".... ", ".....",
|
||||
|
||||
@@ -142,9 +142,7 @@ extern int sync_var;
|
||||
extern int transmission_mode;
|
||||
extern double cpuf;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
extern volatile int start_eNB;
|
||||
extern volatile int start_UE;
|
||||
#endif
|
||||
extern volatile int start_eNB;
|
||||
extern volatile int start_UE;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -71,9 +71,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "UTIL/OTG/otg_vars.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#include "intertask_interface.h"
|
||||
#endif
|
||||
#include "intertask_interface.h"
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
@@ -101,9 +99,7 @@ pthread_mutex_t sync_mutex;
|
||||
int sync_var=-1; //!< protected by mutex \ref sync_mutex.
|
||||
int config_sync_var=-1;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
volatile int start_gNB = 0;
|
||||
#endif
|
||||
volatile int start_gNB = 0;
|
||||
volatile int oai_exit = 0;
|
||||
|
||||
static int wait_for_sync = 0;
|
||||
@@ -119,9 +115,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
//Temp fix for inexistent NR upper layer
|
||||
unsigned char NB_gNB_INST = 1;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
static char *itti_dump_file = NULL;
|
||||
#endif
|
||||
static char *itti_dump_file = NULL;
|
||||
|
||||
int UE_scan = 1;
|
||||
int UE_scan_carrier = 0;
|
||||
@@ -306,7 +300,7 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
void *l2l1_task(void *arg) {
|
||||
MessageDef *message_p = NULL;
|
||||
int result;
|
||||
@@ -379,7 +373,6 @@ void *l2l1_task(void *arg) {
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
LOG_D(GNB_APP, "%s(gnb_nb:%d)\n", __FUNCTION__, gnb_nb);
|
||||
@@ -642,7 +635,6 @@ void wait_gNBs(void) {
|
||||
printf("gNB L1 are configured\n");
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
/*
|
||||
* helper function to terminate a certain ITTI task
|
||||
*/
|
||||
@@ -756,7 +748,6 @@ int restart_L1L2(module_id_t gnb_id) {
|
||||
pthread_mutex_unlock(&sync_mutex);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void wait_nfapi_init(char *thread_name) {
|
||||
printf( "waiting for NFAPI PNF connection and population of global structure (%s)\n",thread_name);
|
||||
@@ -814,7 +805,7 @@ int main( int argc, char **argv )
|
||||
configure_linux();
|
||||
printf("Reading in command-line options\n");
|
||||
get_options ();
|
||||
get_common_options();
|
||||
get_common_options(SOFTMODEM_GNB_BIT );
|
||||
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) {
|
||||
fprintf(stderr,"Getting configuration failed\n");
|
||||
@@ -835,16 +826,16 @@ int main( int argc, char **argv )
|
||||
}
|
||||
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
#if defined(ENABLE_ITTI)
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
||||
// initialize mscgen log after ITTI
|
||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||
#endif
|
||||
|
||||
|
||||
init_opt();
|
||||
|
||||
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
if(!IS_SOFTMODEM_NOS1)
|
||||
netlink_init();
|
||||
#if defined(PDCP_USE_NETLINK_QUEUES)
|
||||
pdcp_netlink_init();
|
||||
@@ -859,8 +850,6 @@ int main( int argc, char **argv )
|
||||
if(IS_SOFTMODEM_NOS1)
|
||||
init_pdcp();
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
if (RC.nb_nr_inst > 0) {
|
||||
// don't create if node doesn't connect to RRC/S1/GTP
|
||||
AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n");
|
||||
@@ -869,7 +858,6 @@ int main( int argc, char **argv )
|
||||
RCconfig_L1();
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Start the agent. If it is turned off in the configuration, it won't start */
|
||||
RCconfig_nr_flexran();
|
||||
|
||||
@@ -1004,19 +992,12 @@ int main( int argc, char **argv )
|
||||
// wait for end of program
|
||||
printf("TYPE <CTRL-C> TO TERMINATE\n");
|
||||
//getchar();
|
||||
#if defined(ENABLE_ITTI)
|
||||
printf("Entering ITTI signals handler\n");
|
||||
itti_wait_tasks_end();
|
||||
printf("Returned from ITTI signal handler\n");
|
||||
oai_exit=1;
|
||||
printf("oai_exit=%d\n",oai_exit);
|
||||
#else
|
||||
|
||||
while (oai_exit==0)
|
||||
sleep(1);
|
||||
|
||||
printf("Terminating application - oai_exit=%d\n",oai_exit);
|
||||
#endif
|
||||
// stop threads
|
||||
/*#ifdef XFORMS
|
||||
|
||||
|
||||
+8
-9
@@ -416,15 +416,14 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
LOG_D(PHY,"phy_procedures_nrUE_RX: slot:%d, time %lu\n", proc->nr_tti_rx, (rdtsc()-a)/3500);
|
||||
//printf(">>> nr_ue_pdcch_procedures ended\n");
|
||||
#endif
|
||||
if(IS_SOFTMODEM_NOS1) { //&& proc->nr_tti_rx==1
|
||||
//Hardcoded rnti value
|
||||
protocol_ctxt_t ctxt;
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO,
|
||||
0x1234, proc->frame_rx,
|
||||
proc->nr_tti_rx, 0);
|
||||
pdcp_run(&ctxt);
|
||||
pdcp_fifo_flush_sdus(&ctxt);
|
||||
}
|
||||
if(IS_SOFTMODEM_NOS1){ //&& proc->nr_tti_rx==1
|
||||
//Hardcoded rnti value
|
||||
protocol_ctxt_t ctxt;
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO,
|
||||
0x1234, proc->frame_rx,
|
||||
proc->nr_tti_rx, 0);
|
||||
pdcp_run(&ctxt);
|
||||
}
|
||||
}
|
||||
|
||||
// no UL for now
|
||||
|
||||
@@ -135,6 +135,7 @@ int threequarter_fs=0;
|
||||
|
||||
uint32_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
//int32_t uplink_counter = 0;
|
||||
|
||||
|
||||
extern int16_t nr_dlsch_demod_shift;
|
||||
@@ -332,8 +333,6 @@ void init_scope(void) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
void *l2l1_task(void *arg) {
|
||||
MessageDef *message_p = NULL;
|
||||
int result;
|
||||
@@ -373,7 +372,7 @@ void *l2l1_task(void *arg) {
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int16_t dlsch_demod_shift;
|
||||
|
||||
@@ -655,7 +654,7 @@ int main( int argc, char **argv ) {
|
||||
logInit();
|
||||
// get options and fill parameters from configuration file
|
||||
get_options (); //Command-line options, enb_properties
|
||||
get_common_options();
|
||||
get_common_options(SOFTMODEM_5GUE_BIT );
|
||||
#if T_TRACER
|
||||
T_Config_Init();
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
#include "common/utils/telnetsrv/telnetsrv.h"
|
||||
#include "executables/thread-common.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "softmodem-common.h"
|
||||
|
||||
static softmodem_params_t softmodem_params;
|
||||
@@ -44,7 +45,7 @@ char *parallel_config=NULL;
|
||||
char *worker_config=NULL;
|
||||
|
||||
|
||||
|
||||
static mapping softmodem_funcs[] = MAPPING_SOFTMODEM_FUNCTIONS;
|
||||
static struct timespec start;
|
||||
|
||||
uint64_t get_softmodem_optmask(void) {
|
||||
@@ -60,16 +61,36 @@ softmodem_params_t *get_softmodem_params(void) {
|
||||
return &softmodem_params;
|
||||
}
|
||||
|
||||
void get_common_options(void) {
|
||||
int32_t check_execmask(uint64_t execmask) {
|
||||
char *softmodemfunc=map_int_to_str(softmodem_funcs, execmask);
|
||||
if (softmodemfunc != NULL) {
|
||||
set_softmodem_optmask(execmask);
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) {
|
||||
uint64_t fmask=(get_softmodem_optmask()&SOFTMODEM_FUNC_BITS);
|
||||
char *softmodemfunc=map_int_to_str(softmodem_funcs, fmask);
|
||||
if (sofmodemfunc_mask_ptr != NULL)
|
||||
*sofmodemfunc_mask_ptr=fmask;
|
||||
if (softmodemfunc != NULL) {
|
||||
return softmodemfunc;
|
||||
}
|
||||
return "???";
|
||||
}
|
||||
|
||||
void get_common_options(uint32_t execmask) {
|
||||
uint32_t online_log_messages=0;
|
||||
uint32_t glog_level =0;
|
||||
uint32_t start_telnetsrv=0;
|
||||
uint32_t glog_level=0 ;
|
||||
uint32_t start_telnetsrv = 0;
|
||||
uint32_t noS1 = 0, nokrnmod = 0, nonbiot = 0;
|
||||
uint32_t rfsim = 0, basicsim = 0, do_forms = 0;
|
||||
char *logmem_filename = NULL;
|
||||
paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC ;
|
||||
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ;
|
||||
checkedparam_t cmdline_log_CheckParams[] = CMDLINE_LOGPARAMS_CHECK_DESC;
|
||||
check_execmask(execmask);
|
||||
config_get( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||
config_set_checkfunctions(cmdline_logparams, cmdline_log_CheckParams,
|
||||
sizeof(cmdline_logparams)/sizeof(paramdef_t));
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
*/
|
||||
#ifndef SOFTMODEM_COMMON_H
|
||||
#define SOFTMODEM_COMMON_H
|
||||
#include "openair1/PHY/defs_common.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
@@ -173,6 +174,14 @@ extern "C"
|
||||
#define SOFTMODEM_BASICSIM_BIT (1<<11)
|
||||
#define SOFTMODEM_SIML1_BIT (1<<12)
|
||||
#define SOFTMODEM_DOFORMS_BIT (1<<15)
|
||||
#define SOFTMODEM_RECPLAY_BIT (1<<16)
|
||||
#define SOFTMODEM_ENB_BIT (1<<20)
|
||||
#define SOFTMODEM_GNB_BIT (1<<21)
|
||||
#define SOFTMODEM_4GUE_BIT (1<<22)
|
||||
#define SOFTMODEM_5GUE_BIT (1<<23)
|
||||
#define SOFTMODEM_FUNC_BITS (SOFTMODEM_ENB_BIT | SOFTMODEM_GNB_BIT | SOFTMODEM_5GUE_BIT | SOFTMODEM_4GUE_BIT)
|
||||
#define MAPPING_SOFTMODEM_FUNCTIONS {{"enb",SOFTMODEM_ENB_BIT},{"gnb",SOFTMODEM_GNB_BIT},{"4Gue",SOFTMODEM_4GUE_BIT},{"5Gue",SOFTMODEM_5GUE_BIT}}
|
||||
|
||||
|
||||
#define IS_SOFTMODEM_NOS1 ( get_softmodem_optmask() & SOFTMODEM_NOS1_BIT)
|
||||
#define IS_SOFTMODEM_NOKRNMOD ( get_softmodem_optmask() & SOFTMODEM_NOKRNMOD_BIT)
|
||||
@@ -181,7 +190,11 @@ extern "C"
|
||||
#define IS_SOFTMODEM_BASICSIM ( get_softmodem_optmask() & SOFTMODEM_BASICSIM_BIT)
|
||||
#define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT)
|
||||
#define IS_SOFTMODEM_DOFORMS ( get_softmodem_optmask() & SOFTMODEM_DOFORMS_BIT)
|
||||
|
||||
#define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT)
|
||||
#define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT)
|
||||
#define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT)
|
||||
#define IS_SOFTMODEM_4GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_4GUE_BIT)
|
||||
#define IS_SOFTMODEM_5GUE_BIT ( get_softmodem_optmask() & SOFTMODEM_5GUE_BIT)
|
||||
|
||||
typedef struct {
|
||||
uint64_t optmask;
|
||||
@@ -206,7 +219,8 @@ typedef struct {
|
||||
extern uint64_t get_softmodem_optmask(void);
|
||||
extern uint64_t set_softmodem_optmask(uint64_t bitmask);
|
||||
extern softmodem_params_t *get_softmodem_params(void);
|
||||
extern void get_common_options(void);
|
||||
extern void get_common_options(uint32_t execmask);
|
||||
extern char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr);
|
||||
#define SOFTMODEM_RTSIGNAL (SIGRTMIN+1)
|
||||
extern void set_softmodem_sighandler(void);
|
||||
extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
|
||||
Reference in New Issue
Block a user