Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alex037yang
OpenXG-RAN
Commits
64e4826c
Commit
64e4826c
authored
Feb 03, 2020
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add softmodem-common.c and common error handler
parent
101a55e3
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
315 additions
and
395 deletions
+315
-395
executables/nr-softmodem-common.h
executables/nr-softmodem-common.h
+0
-1
executables/nr-softmodem.c
executables/nr-softmodem.c
+8
-76
executables/nr-softmodem.h
executables/nr-softmodem.h
+0
-25
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+6
-35
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+0
-5
executables/softmodem-common.c
executables/softmodem-common.c
+70
-17
executables/softmodem-common.h
executables/softmodem-common.h
+183
-0
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
+7
-5
openair1/PHY/phy_extern.h
openair1/PHY/phy_extern.h
+0
-1
openair1/PHY/phy_extern_nr_ue.h
openair1/PHY/phy_extern_nr_ue.h
+0
-1
openair1/PHY/phy_extern_ue.h
openair1/PHY/phy_extern_ue.h
+0
-1
openair1/PHY/phy_vars.h
openair1/PHY/phy_vars.h
+0
-2
openair1/PHY/phy_vars_nr_ue.h
openair1/PHY/phy_vars_nr_ue.h
+0
-1
openair1/PHY/phy_vars_ue.h
openair1/PHY/phy_vars_ue.h
+0
-1
openair2/ENB_APP/MACRLC_paramdef.h
openair2/ENB_APP/MACRLC_paramdef.h
+2
-5
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+0
-2
openair2/ENB_APP/enb_paramdef.h
openair2/ENB_APP/enb_paramdef.h
+0
-2
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+0
-2
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+0
-2
openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
+0
-1
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+8
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+2
-3
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+2
-2
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+0
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+1
-26
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+25
-149
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+1
-28
No files found.
executables/nr-softmodem-common.h
View file @
64e4826c
...
...
@@ -130,7 +130,6 @@ extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
extern
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
extern
int
rx_input_level_dBm
;
extern
uint8_t
exit_missed_slots
;
extern
uint64_t
num_missed_slots
;
// counter for the number of missed slots
extern
int
oaisim_flag
;
...
...
executables/nr-softmodem.c
View file @
64e4826c
...
...
@@ -148,11 +148,9 @@ double bw = 10.0e6;
static
int
tx_max_power
[
MAX_NUM_CCs
];
/* = {0,0}*/
;
char
rf_config_file
[
1024
]
=
"/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat"
;
int
chain_offset
=
0
;
int
phy_test
=
0
;
uint8_t
usim_test
=
0
;
uint8_t
dci_Format
=
0
;
uint8_t
agregation_Level
=
0xFF
;
...
...
@@ -176,7 +174,6 @@ int otg_enabled;
uint32_t
target_dl_mcs
=
28
;
//maximum allowed mcs
uint32_t
target_ul_mcs
=
20
;
uint32_t
timing_advance
=
0
;
uint8_t
exit_missed_slots
=
1
;
uint64_t
num_missed_slots
=
0
;
// counter for the number of missed slots
...
...
@@ -189,7 +186,6 @@ int transmission_mode=1;
int
emulate_rf
=
0
;
int
numerology
=
0
;
static
softmodem_params_t
softmodem_params
;
static
char
*
parallel_config
=
NULL
;
static
char
*
worker_config
=
NULL
;
...
...
@@ -270,39 +266,13 @@ unsigned int build_rfdc(int dcoff_i_rxfe, int dcoff_q_rxfe) {
return
(
dcoff_i_rxfe
+
(
dcoff_q_rxfe
<<
8
));
}
#if !defined(ENABLE_ITTI)
void
signal_handler
(
int
sig
)
{
void
*
array
[
10
];
size_t
size
;
if
(
sig
==
SIGSEGV
)
{
// get void*'s for all entries on the stack
size
=
backtrace
(
array
,
10
);
// print out all the frames to stderr
fprintf
(
stderr
,
"Error: signal %d:
\n
"
,
sig
);
backtrace_symbols_fd
(
array
,
size
,
2
);
exit
(
-
1
);
}
else
{
printf
(
"trying to exit gracefully...
\n
"
);
oai_exit
=
1
;
}
}
#endif
#define KNRM "\x1B[0m"
#define KRED "\x1B[31m"
#define KGRN "\x1B[32m"
#define KBLU "\x1B[34m"
#define RESET "\033[0m"
#if defined(ENABLE_ITTI)
void
signal_handler_itti
(
int
sig
)
{
// Call exit function
char
msg
[
256
];
memset
(
msg
,
0
,
256
);
sprintf
(
msg
,
"caught signal %s
\n
"
,
strsignal
(
sig
));
exit_function
(
__FILE__
,
__FUNCTION__
,
__LINE__
,
msg
);
}
#endif
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
int
ru_id
;
...
...
@@ -329,9 +299,6 @@ void exit_function(const char *file, const char *function, const int line, const
}
sleep
(
1
);
//allow lte-softmodem threads to exit first
#if defined(ENABLE_ITTI)
itti_terminate_tasks
(
TASK_UNKNOWN
);
#endif
exit
(
1
);
}
...
...
@@ -469,36 +436,13 @@ int create_gNB_tasks(uint32_t gnb_nb) {
static
void
get_options
(
void
)
{
int
tddflag
,
nonbiotflag
;
uint32_t
online_log_messages
;
uint32_t
glog_level
,
glog_verbosity
;
uint32_t
start_telnetsrv
=
0
;
uint32_t
noS1
;
uint32_t
nokrnmod
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC_GNB
;
paramdef_t
cmdline_logparams
[]
=
CMDLINE_LOGPARAMS_DESC_NR
;
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_logparams
,
sizeof
(
cmdline_logparams
)
/
sizeof
(
paramdef_t
),
NULL
);
if
(
config_isparamset
(
cmdline_logparams
,
CMDLINE_ONLINELOG_IDX
))
{
set_glog_onlinelog
(
online_log_messages
);
}
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC_GNB
;
if
(
config_isparamset
(
cmdline_logparams
,
CMDLINE_GLOGLEVEL_IDX
))
{
set_glog
(
glog_level
);
}
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
if
(
start_telnetsrv
)
{
load_module_shlib
(
"telnetsrv"
,
NULL
,
0
,
NULL
);
}
#if T_TRACER
paramdef_t
cmdline_ttraceparams
[]
=
CMDLINE_TTRACEPARAMS_DESC
;
config_process_cmdline
(
cmdline_ttraceparams
,
sizeof
(
cmdline_ttraceparams
)
/
sizeof
(
paramdef_t
),
NULL
);
#endif
if
(
!
(
CONFIG_ISFLAGSET
(
CONFIG_ABORT
))
)
{
memset
((
void
*
)
&
RC
,
0
,
sizeof
(
RC
));
...
...
@@ -516,14 +460,6 @@ static void get_options(void) {
}
#if T_TRACER
int
T_nowait
=
0
;
/* by default we wait for the tracer */
int
T_port
=
2021
;
/* default port to listen to to wait for the tracer */
int
T_dont_fork
=
0
;
/* default is to fork, see 'T_init' to understand */
#endif
void
set_default_frame_parms
(
nfapi_nr_config_request_t
*
config
[
MAX_NUM_CCs
],
NR_DL_FRAME_PARMS
*
frame_parms
[
MAX_NUM_CCs
])
{
...
...
@@ -653,7 +589,7 @@ void init_openair0(void) {
openair0_cfg[card].rx_gain[i] = RC.gNB[0][0]->rx_total_gain_dB;
openair0_cfg[card].configFilename = rf_config_file;
openair0_cfg[card].configFilename =
get_softmodem_params()->
rf_config_file;
printf("Card %d, channel %d, Setting tx_gain %f, rx_gain %f, tx_freq %f, rx_freq %f\n",
card,i, openair0_cfg[card].tx_gain[i],
openair0_cfg[card].rx_gain[i],
...
...
@@ -866,7 +802,7 @@ int main( int argc, char **argv )
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
NULL
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
set_softmodem_sighandler
();
#ifdef DEBUG_CONSOLE
setvbuf
(
stdout
,
NULL
,
_IONBF
,
0
);
setvbuf
(
stderr
,
NULL
,
_IONBF
,
0
);
...
...
@@ -914,11 +850,7 @@ init_opt();
pdcp_netlink_init
();
#endif
#endif
#if !defined(ENABLE_ITTI)
// to make a graceful exit when ctrl-c is pressed
signal
(
SIGSEGV
,
signal_handler
);
signal
(
SIGINT
,
signal_handler
);
#endif
#ifndef PACKAGE_VERSION
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
#endif
...
...
@@ -1031,7 +963,7 @@ init_opt();
if
(
RC
.
nb_RU
>
0
)
{
printf
(
"Initializing RU threads
\n
"
);
init_NR_RU
(
rf_config_file
);
init_NR_RU
(
get_softmodem_params
()
->
rf_config_file
);
for
(
ru_id
=
0
;
ru_id
<
RC
.
nb_RU
;
ru_id
++
)
{
RC
.
ru
[
ru_id
]
->
rf_map
.
card
=
0
;
...
...
executables/nr-softmodem.h
View file @
64e4826c
...
...
@@ -18,10 +18,6 @@
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_PARAMS_DESC_GNB { \
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)},\
{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&usim_test, defintval:0, TYPE_UINT8, 0}, \
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&wait_for_sync, defintval:0, TYPE_INT, 0}, \
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
...
...
@@ -34,34 +30,13 @@
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
{"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)¶llel_config, defstrval:NULL, TYPE_STRING, 0}, \
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0}, \
{"noS1", CONFIG_HLP_NOS1, PARAMFLAG_BOOL, uptr:&noS1, defintval:0, TYPE_INT, 0}, \
{"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_INT, 0} \
}
#define SOFTMODEM_NOS1_BIT (1<<0)
#define SOFTMODEM_NOKRNMOD_BIT (1<<1)
#define SOFTMODEM_RFSIM_BIT (1<<10)
#define IS_SOFTMODEM_NOS1 ( get_softmodem_optmask() & SOFTMODEM_NOS1_BIT)
#define IS_SOFTMODEM_NOKRNMOD ( get_softmodem_optmask() & SOFTMODEM_NOKRNMOD_BIT)
#define IS_SOFTMODEM_RFSIM ( get_softmodem_optmask() & SOFTMODEM_RFSIM_BIT)
extern
uint64_t
get_softmodem_optmask
(
void
);
extern
void
get_common_options
(
void
);
extern
int
T_port
;
extern
int
T_nowait
;
extern
int
T_dont_fork
;
#include "threads_t.h"
extern
threads_t
threads
;
...
...
executables/nr-uesoftmodem.c
View file @
64e4826c
...
...
@@ -163,11 +163,9 @@ double bw = 10.0e6;
static
int
tx_max_power
[
MAX_NUM_CCs
]
=
{
0
};
char
rf_config_file
[
1024
];
int
chain_offset
=
0
;
int
phy_test
=
0
;
uint8_t
usim_test
=
0
;
uint8_t
dci_Format
=
0
;
uint8_t
agregation_Level
=
0xFF
;
...
...
@@ -178,7 +176,6 @@ uint8_t nb_antenna_rx = 1;
char
ref
[
128
]
=
"internal"
;
char
channels
[
128
]
=
"0"
;
static
softmodem_params_t
softmodem_params
;
static
char
*
parallel_config
=
NULL
;
static
char
*
worker_config
=
NULL
;
...
...
@@ -197,7 +194,6 @@ int16_t node_synch_ref[MAX_NUM_CCs];
uint32_t
target_dl_mcs
=
28
;
//maximum allowed mcs
uint32_t
target_ul_mcs
=
20
;
uint32_t
timing_advance
=
0
;
uint8_t
exit_missed_slots
=
1
;
uint64_t
num_missed_slots
=
0
;
// counter for the number of missed slots
...
...
@@ -273,7 +269,7 @@ void exit_function(const char *file, const char *function, const int line, const
}
sleep
(
1
);
//allow lte-softmodem threads to exit first
itti_terminate_tasks
(
TASK_UNKNOWN
);
exit
(
1
);
}
...
...
@@ -386,28 +382,12 @@ static void get_options(void) {
int
tddflag
=
0
,
nonbiotflag
,
vcdflag
=
0
;
char
*
loopfile
=
NULL
;
int
dumpframe
=
0
;
uint32_t
online_log_messages
;
uint32_t
glog_level
,
glog_verbosity
;
uint32_t
start_telnetsrv
=
0
;
//uint32_t noS1;
//uint32_t nokrnmod;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC_UE
;
paramdef_t
cmdline_logparams
[]
=
CMDLINE_LOGPARAMS_DESC_NR
;
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_logparams
,
sizeof
(
cmdline_logparams
)
/
sizeof
(
paramdef_t
),
NULL
);
if
(
config_isparamset
(
cmdline_logparams
,
CMDLINE_ONLINELOG_IDX
))
{
set_glog_onlinelog
(
online_log_messages
);
}
if
(
config_isparamset
(
cmdline_logparams
,
CMDLINE_GLOGLEVEL_IDX
))
{
set_glog
(
glog_level
);
}
if
(
start_telnetsrv
)
{
load_module_shlib
(
"telnetsrv"
,
NULL
,
0
,
NULL
);
}
paramdef_t
cmdline_uemodeparams
[]
=
CMDLINE_UEMODEPARAMS_DESC
;
paramdef_t
cmdline_ueparams
[]
=
CMDLINE_NRUEPARAMS_DESC
;
...
...
@@ -476,10 +456,6 @@ static void get_options(void) {
tx_gain
[
0
][
CC_id
]
=
tx_gain
[
0
][
0
];
}
#if T_TRACER
paramdef_t
cmdline_ttraceparams
[]
=
CMDLINE_TTRACEPARAMS_DESC
;
config_process_cmdline
(
cmdline_ttraceparams
,
sizeof
(
cmdline_ttraceparams
)
/
sizeof
(
paramdef_t
),
NULL
);
#endif
if
(
!
(
CONFIG_ISFLAGSET
(
CONFIG_ABORT
))
&&
(
!
(
CONFIG_ISFLAGSET
(
CONFIG_NOOOPT
)))
)
{
// Here the configuration file is the XER encoded UE capabilities
...
...
@@ -490,11 +466,6 @@ static void get_options(void) {
}
/* UE with config file */
}
#if T_TRACER
int
T_nowait
=
0
;
/* by default we wait for the tracer */
int
T_port
=
2021
;
/* default port to listen to to wait for the tracer */
int
T_dont_fork
=
0
;
/* default is to fork, see 'T_init' to understand */
#endif
void
set_default_frame_parms
(
NR_DL_FRAME_PARMS
*
frame_parms
[
MAX_NUM_CCs
])
{
int
CC_id
;
...
...
@@ -626,7 +597,7 @@ void init_openair0(void) {
openair0_cfg
[
card
].
autocal
[
i
]
=
1
;
openair0_cfg
[
card
].
tx_gain
[
i
]
=
tx_gain
[
0
][
i
];
openair0_cfg
[
card
].
rx_gain
[
i
]
=
PHY_vars_UE_g
[
0
][
0
]
->
rx_total_gain_dB
-
rx_gain_off
;
openair0_cfg
[
card
].
configFilename
=
rf_config_file
;
openair0_cfg
[
card
].
configFilename
=
get_softmodem_params
()
->
rf_config_file
;
printf
(
"Card %d, channel %d, Setting tx_gain %f, rx_gain %f, tx_freq %f, rx_freq %f
\n
"
,
card
,
i
,
openair0_cfg
[
card
].
tx_gain
[
i
],
openair0_cfg
[
card
].
rx_gain
[
i
],
...
...
@@ -669,7 +640,7 @@ int main( int argc, char **argv ) {
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
NULL
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
set_softmodem_sighandler
();
CONFIG_SETRTFLAG
(
CONFIG_NOEXITONHELP
);
set_default_frame_parms
(
frame_parms
);
mode
=
normal_txrx
;
...
...
@@ -741,7 +712,7 @@ int main( int argc, char **argv ) {
UE
[
CC_id
]
=
PHY_vars_UE_g
[
0
][
CC_id
];
if
(
phy_test
==
1
)
if
(
get_softmodem_params
()
->
phy_test
==
1
)
UE
[
CC_id
]
->
mac_enabled
=
0
;
else
UE
[
CC_id
]
->
mac_enabled
=
1
;
...
...
executables/nr-uesoftmodem.h
View file @
64e4826c
...
...
@@ -61,10 +61,6 @@
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_PARAMS_DESC_UE { \
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)},\
{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&usim_test, defintval:0, TYPE_UINT8, 0}, \
{"clock-source", CONFIG_HLP_EXCCLK, 0, iptr:&clock_source, defintval:0, TYPE_INT, 0}, \
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
...
...
@@ -76,7 +72,6 @@
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
...
...
targets/RT/USER/lte-
softmodem-common.c
→
executables/
softmodem-common.c
View file @
64e4826c
...
...
@@ -20,26 +20,33 @@
*/
/*! \file lte-softmodem-common.c
* \brief
Top-level threads for eNodeB
* \brief
common code for 5G and LTE softmodem main xNB and UEs source (nr-softmodem.c, lte-softmodem.c...)
* \author Nokia BellLabs France, francois Taburet
* \date 20
12
* \date 20
20
* \version 0.1
* \company
Eurecom
* \company
Nokia BellLabs France
* \email: francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
#include "lte-softmodem.h"
#include <time.h>
#include <dlfcn.h>
#include <sys/resource.h>
#include "UTIL/OPT/opt.h"
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
#include "common/utils/telnetsrv/telnetsrv.h"
#include "executables/thread-common.h"
#include <dlfcn.h>
#include "softmodem-common.h"
static
softmodem_params_t
softmodem_params
;
char
*
parallel_config
=
NULL
;
char
*
worker_config
=
NULL
;
static
struct
timespec
start
;
uint64_t
get_softmodem_optmask
(
void
)
{
return
softmodem_params
.
optmask
;
}
...
...
@@ -92,7 +99,7 @@ void get_common_options(void) {
}
if
(
nokrnmod
)
{
printf
(
"nokrnmod bit enabled
\n
"
);
printf
(
"nokrnmod bit enabled
\n
"
);
set_softmodem_optmask
(
SOFTMODEM_NOKRNMOD_BIT
);
}
...
...
@@ -112,21 +119,67 @@ void get_common_options(void) {
set_softmodem_optmask
(
SOFTMODEM_DOFORMS_BIT
);
}
#if BASIC_SIMULATOR
set_softmodem_optmask
(
SOFTMODEM_BASICSIM_BIT
);
#endif
if
(
parallel_config
!=
NULL
)
set_parallel_conf
(
parallel_config
);
if
(
worker_config
!=
NULL
)
set_worker_conf
(
worker_config
);
}
unsigned
int
is_nos1exec
(
char
*
exepath
)
{
if
(
strcmp
(
basename
(
exepath
),
"lte-softmodem-nos1"
)
==
0
)
return
1
;
void
softmodem_printresources
(
int
sig
,
telnet_printfunc_t
pf
)
{
struct
rusage
usage
;
struct
timespec
stop
;
clock_gettime
(
CLOCK_BOOTTIME
,
&
stop
);
uint64_t
elapse
=
(
stop
.
tv_sec
-
start
.
tv_sec
)
;
// in seconds
int
st
=
getrusage
(
RUSAGE_SELF
,
&
usage
);
if
(
!
st
)
{
pf
(
"
\n
Run time: %lluh %llus
\n
"
,(
unsigned
long
long
)
elapse
/
3600
,(
unsigned
long
long
)(
elapse
-
(
elapse
/
3600
)));
pf
(
"
\t
Time executing user inst.: %lds %ldus
\n
"
,(
long
)
usage
.
ru_utime
.
tv_sec
,(
long
)
usage
.
ru_utime
.
tv_usec
);
pf
(
"
\t
Time executing system inst.: %lds %ldus
\n
"
,(
long
)
usage
.
ru_stime
.
tv_sec
,(
long
)
usage
.
ru_stime
.
tv_usec
);
pf
(
"
\t
Max. Phy. memory usage: %ldkB
\n
"
,(
long
)
usage
.
ru_maxrss
);
pf
(
"
\t
Page fault number (no io): %ld
\n
"
,(
long
)
usage
.
ru_minflt
);
pf
(
"
\t
Page fault number (requiring io): %ld
\n
"
,(
long
)
usage
.
ru_majflt
);
pf
(
"
\t
Number of file system read: %ld
\n
"
,(
long
)
usage
.
ru_inblock
);
pf
(
"
\t
Number of filesystem write: %ld
\n
"
,(
long
)
usage
.
ru_oublock
);
pf
(
"
\t
Number of context switch (process origin, io...): %ld
\n
"
,(
long
)
usage
.
ru_nvcsw
);
pf
(
"
\t
Number of context switch (os origin, priority...): %ld
\n
"
,(
long
)
usage
.
ru_nivcsw
);
}
}
void
signal_handler
(
int
sig
)
{
void
*
array
[
10
];
size_t
size
;
if
(
sig
==
SIGSEGV
)
{
// get void*'s for all entries on the stack
size
=
backtrace
(
array
,
10
);
// print out all the frames to stderr
fprintf
(
stderr
,
"Error: signal %d:
\n
"
,
sig
);
backtrace_symbols_fd
(
array
,
size
,
2
);
exit
(
-
1
);
}
else
{
if
(
sig
==
SIGINT
||
sig
==
SOFTMODEM_RTSIGNAL
)
softmodem_printresources
(
sig
,(
telnet_printfunc_t
)
printf
);
if
(
sig
!=
SOFTMODEM_RTSIGNAL
)
{
printf
(
"Linux signal %s...
\n
"
,
strsignal
(
sig
));
exit_function
(
__FILE__
,
__FUNCTION__
,
__LINE__
,
"softmodem starting exit procedure
\n
"
);
}
}
}
if
(
strcmp
(
basename
(
exepath
),
"lte-uesoftmodem-nos1"
)
==
0
)
return
1
;
return
0
;
void
set_softmodem_sighandler
(
void
)
{
struct
sigaction
act
,
oldact
;
clock_gettime
(
CLOCK_BOOTTIME
,
&
start
);
memset
(
&
act
,
0
,
sizeof
(
act
));
act
.
sa_handler
=
signal_handler
;
sigaction
(
SOFTMODEM_RTSIGNAL
,
&
act
,
&
oldact
);
printf
(
"Send signal %d to display resource usage...
\n
"
,
SIGRTMIN
+
1
);
signal
(
SIGSEGV
,
signal_handler
);
signal
(
SIGINT
,
signal_handler
);
signal
(
SIGTERM
,
signal_handler
);
signal
(
SIGABRT
,
signal_handler
);
}
executables/softmodem-common.h
View file @
64e4826c
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
View file @
64e4826c
...
...
@@ -35,6 +35,7 @@
#include <string.h>
#include <types.h>
#include "assertions.h"
#include "common/utils/LOG/log.h"
#include "PHY/TOOLS/time_meas.h"
#include "defs.h"
...
...
@@ -482,11 +483,12 @@ int ldpc_encoder_optim_8seg_multi(unsigned char **test_input,unsigned char **cha
//Table of possible lifting sizes
char
temp
;
int
simd_size
;
int
macro_segment
,
macro_segment_end
;
unsigned
int
macro_segment
,
macro_segment_end
;
macro_segment
=
8
*
macro_num
;
macro_segment_end
=
(
n_segments
>
8
*
(
macro_num
+
1
))
?
8
*
(
macro_num
+
1
)
:
n_segments
;
// macro_segment_end = (n_segments > 8*(macro_num+1)) ? 8*(macro_num+1) : n_segments;
macro_segment_end
=
macro_segment
+
(
n_segments
>
8
?
8
:
n_segments
);
///printf("macro_segment: %d\n", macro_segment);
///printf("macro_segment_end: %d\n", macro_segment_end );
...
...
@@ -506,7 +508,7 @@ int ldpc_encoder_optim_8seg_multi(unsigned char **test_input,unsigned char **cha
masks
[
7
]
=
_mm256_set1_epi8
(
0x80
);
#endif
///AssertFatal(n_segments>0&&n_segments<=8,"0 < n_segments %d <= 8\n",n_segments);
//determine number of bits in codeword
if
(
BG
==
1
)
...
...
@@ -562,7 +564,7 @@ int ldpc_encoder_optim_8seg_multi(unsigned char **test_input,unsigned char **cha
for
(
i
=
0
;
i
<
block_length
>>
5
;
i
++
)
{
c256
=
_mm256_and_si256
(
_mm256_cmpeq_epi8
(
_mm256_andnot_si256
(
_mm256_shuffle_epi8
(
_mm256_set1_epi32
(((
uint32_t
*
)
test_input
[
macro_segment
])[
i
]),
shufmask
),
andmask
),
zero256
),
masks
[
0
]);
//for (j=1; j<n_segments; j++) {
for
(
j
=
macro_segment
+
1
;
j
<
macro_segment_end
;
j
++
)
{
for
(
j
=
macro_segment
+
1
;
j
<
macro_segment_end
;
j
++
)
{
c256
=
_mm256_or_si256
(
_mm256_and_si256
(
_mm256_cmpeq_epi8
(
_mm256_andnot_si256
(
_mm256_shuffle_epi8
(
_mm256_set1_epi32
(((
uint32_t
*
)
test_input
[
j
])[
i
]),
shufmask
),
andmask
),
zero256
),
masks
[
j
-
macro_segment
]),
c256
);
}
((
__m256i
*
)
c
)[
i
]
=
c256
;
...
...
openair1/PHY/phy_extern.h
View file @
64e4826c
...
...
@@ -69,7 +69,6 @@ extern uint16_t NB_UE_INST;
extern
unsigned
char
NB_RN_INST
;
#endif
extern
unsigned
int
ULSCH_max_consecutive_errors
;
extern
int
flag_LA
;
extern
double
sinr_bler_map
[
MCS_COUNT
][
2
][
MCS_TABLE_LENGTH_MAX
];
extern
double
sinr_bler_map_up
[
MCS_COUNT
][
2
][
16
];
...
...
openair1/PHY/phy_extern_nr_ue.h
View file @
64e4826c
...
...
@@ -66,7 +66,6 @@ extern uint16_t NB_UE_INST;
extern
unsigned
char
NB_RN_INST
;
#endif
extern
unsigned
int
ULSCH_max_consecutive_errors
;
extern
int
flag_LA
;
extern
double
sinr_bler_map
[
MCS_COUNT
][
2
][
MCS_TABLE_LENGTH_MAX
];
extern
double
sinr_bler_map_up
[
MCS_COUNT
][
2
][
16
];
...
...
openair1/PHY/phy_extern_ue.h
View file @
64e4826c
...
...
@@ -66,7 +66,6 @@ extern uint16_t NB_UE_INST;
extern
unsigned
char
NB_RN_INST
;
#endif
extern
unsigned
int
ULSCH_max_consecutive_errors
;
extern
int
flag_LA
;
extern
double
sinr_bler_map
[
MCS_COUNT
][
2
][
MCS_TABLE_LENGTH_MAX
];
extern
double
sinr_bler_map_up
[
MCS_COUNT
][
2
][
16
];
...
...
openair1/PHY/phy_vars.h
View file @
64e4826c
...
...
@@ -65,8 +65,6 @@ unsigned char NB_RN_INST=0;
unsigned
char
NB_INST
=
0
;
#endif
unsigned
int
ULSCH_max_consecutive_errors
=
20
;
int
number_of_cards
;
...
...
openair1/PHY/phy_vars_nr_ue.h
View file @
64e4826c
...
...
@@ -64,7 +64,6 @@ unsigned char NB_RN_INST=0;
unsigned
char
NB_INST
=
0
;
#endif
unsigned
int
ULSCH_max_consecutive_errors
=
20
;
int
number_of_cards
;
...
...
openair1/PHY/phy_vars_ue.h
View file @
64e4826c
...
...
@@ -57,7 +57,6 @@ short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
unsigned
char
NB_INST
=
0
;
#endif
unsigned
int
ULSCH_max_consecutive_errors
=
20
;
int
number_of_cards
;
...
...
openair2/ENB_APP/MACRLC_paramdef.h
View file @
64e4826c
...
...
@@ -54,7 +54,6 @@
#define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd"
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd"
#define CONFIG_STRING_MACRLC_SCHED_MODE "scheduler_mode"
#define CONFIG_STRING_MACRLC_PHY_TEST_MODE "phy_test_mode"
#define CONFIG_MACRLC_PUSCH10xSNR "puSch10xSnr"
#define CONFIG_MACRLC_PUCCH10xSNR "puCch10xSnr"
...
...
@@ -81,7 +80,6 @@
{CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_SCHED_MODE, NULL, 0, strptr:NULL, defstrval:"default", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_PHY_TEST_MODE, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \
{CONFIG_MACRLC_PUSCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
{CONFIG_MACRLC_PUCCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
}
...
...
@@ -103,7 +101,6 @@
#define MACRLC_LOCAL_S_PORTD_IDX 15
#define MACRLC_REMOTE_S_PORTD_IDX 16
#define MACRLC_SCHED_MODE_IDX 17
#define MACRLC_PHY_TEST_IDX 18
#define MACRLC_PUSCH10xSNR_IDX 19
#define MACRLC_PUCCH10xSNR_IDX 20
#define MACRLC_PUSCH10xSNR_IDX 18
#define MACRLC_PUCCH10xSNR_IDX 19
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
openair2/ENB_APP/enb_config.c
View file @
64e4826c
...
...
@@ -214,8 +214,6 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) {
RC
.
mac
[
j
]
->
puSch10xSnr
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_PUSCH10xSNR_IDX
].
iptr
);
RC
.
mac
[
j
]
->
puCch10xSnr
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_PUCCH10xSNR_IDX
].
iptr
);
RC
.
nb_mac_CC
[
j
]
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_CC_IDX
].
iptr
);
//RC.mac[j]->phy_test = *(MacRLC_ParamList.paramarray[j][MACRLC_PHY_TEST_IDX].iptr);
//printf("PHY_TEST = %d,%d\n", RC.mac[j]->phy_test, j);
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"local_RRC"
)
==
0
)
{
// check number of instances is same as RRC/PDCP
...
...
openair2/ENB_APP/enb_paramdef.h
View file @
64e4826c
...
...
@@ -1172,7 +1172,6 @@ typedef struct srb1_params_s {
#define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd"
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd"
#define CONFIG_STRING_MACRLC_SCHED_MODE "scheduler_mode"
#define CONFIG_STRING_MACRLC_PHY_TEST_MODE "phy_test_mode"
#define MACRLC_CC_IDX 0
#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1
...
...
@@ -1192,7 +1191,6 @@ typedef struct srb1_params_s {
#define MACRLC_LOCAL_S_PORTD_IDX 15
#define MACRLC_REMOTE_S_PORTD_IDX 16
#define MACRLC_SCHED_MODE_IDX 17
#define MACRLC_PHY_TEST_IDX 18
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* thread configuration parameters section name */
...
...
openair2/GNB_APP/gnb_config.c
View file @
64e4826c
...
...
@@ -374,8 +374,6 @@ void RCconfig_nr_macrlc() {
for
(
j
=
0
;
j
<
RC
.
nb_nr_macrlc_inst
;
j
++
)
{
RC
.
nb_nr_mac_CC
[
j
]
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_CC_IDX
].
iptr
);
//RC.nrmac[j]->phy_test = *(MacRLC_ParamList.paramarray[j][MACRLC_PHY_TEST_IDX].iptr);
//printf("PHY_TEST = %d,%d\n", RC.nrmac[j]->phy_test, j);
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"local_RRC"
)
==
0
)
{
// check number of instances is same as RRC/PDCP
...
...
openair2/GNB_APP/gnb_paramdef.h
View file @
64e4826c
...
...
@@ -1008,7 +1008,6 @@ typedef enum {
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTC "remote_s_portc"
#define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd"
#define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd"
#define CONFIG_STRING_MACRLC_PHY_TEST_MODE "phy_test_mode"
#define MACRLC_CC_IDX 0
...
...
@@ -1029,7 +1028,6 @@ typedef enum {
#define MACRLC_LOCAL_S_PORTD_IDX 15
#define MACRLC_REMOTE_S_PORTD_IDX 16
#define MACRLC_SCHED_MODE_IDX 17
#define MACRLC_PHY_TEST_IDX 18
/* thread configuration parameters section name */
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
View file @
64e4826c
...
...
@@ -59,7 +59,6 @@ extern unsigned short NODE_ID[1];
/* Scheduler */
extern
RAN_CONTEXT_t
RC
;
extern
int
phy_test
;
extern
uint8_t
nfapi_mode
;
/*#if defined(PRE_SCD_THREAD)
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
64e4826c
...
...
@@ -32,7 +32,14 @@
//#include "defs.h"
#include "mac_proto.h"
#include "executables/nr-softmodem.h"
#include "../../ARCH/COMMON/common_lib.h"
//#undef MALLOC
#include "assertions.h"
#include "PHY/types.h"
#include "PHY/defs_UE.h"
#include "openair2/LAYER2/RLC/rlc.h"
#include "openair2/LAYER2/PDCP_v10.1.0/pdcp.h"
#include "executables/softmodem-common.h"
static
NR_UE_MAC_INST_t
*
nr_ue_mac_inst
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
64e4826c
...
...
@@ -30,7 +30,6 @@
* \warning
*/
#include "executables/nr-softmodem.h"
/* MAC related headers */
#include "mac_proto.h"
...
...
@@ -49,7 +48,7 @@
/*Openair Packet Tracer */
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "executables/softmodem-common.h"
/* log utils */
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
...
...
@@ -2067,7 +2066,7 @@ void nr_ue_send_sdu(module_id_t module_idP,
if
(
opt_enabled
)
{
trace_pdu
(
DIRECTION_DOWNLINK
,
pduP
,
pdu_len
,
module_idP
,
WS_C_RNTI
,
(
int
)
UE_mac_inst
[
module_idP
].
cs_RNTI
,
frameP
,
ttiP
,
0
,
0
);
//subframeP
(
int
)
(
UE_mac_inst
[
module_idP
].
cs_RNTI
)
,
frameP
,
ttiP
,
0
,
0
);
//subframeP
LOG_D
(
OPT
,
"[UE %d][DLSCH] Frame %d trace pdu for rnti %p with size %d
\n
"
,
module_idP
,
frameP
,
UE_mac_inst
[
module_idP
].
cs_RNTI
,
pdu_len
);
}
...
...
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
64e4826c
...
...
@@ -471,7 +471,7 @@ rb_found:
#endif
}
static
void
add_srb
(
int
rnti
,
struct
LTE_SRB_ToAddMod
*
s
)
__attribute__
((
unused
))
static
void
add_srb
(
int
rnti
,
struct
LTE_SRB_ToAddMod
*
s
)
{
nr_rlc_entity_t
*
nr_rlc_am
;
nr_rlc_ue_t
*
ue
;
...
...
@@ -739,7 +739,7 @@ static void add_drb_um(int rnti, struct LTE_DRB_ToAddMod *s)
nr_rlc_manager_unlock
(
nr_rlc_ue_manager
);
}
static
void
add_drb
(
int
rnti
,
struct
LTE_DRB_ToAddMod
*
s
)
__attribute__
((
unused
))
static
void
add_drb
(
int
rnti
,
struct
LTE_DRB_ToAddMod
*
s
)
{
switch
(
s
->
rlc_Config
->
present
)
{
case
LTE_RLC_Config_PR_am
:
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
64e4826c
...
...
@@ -128,7 +128,6 @@ typedef struct xer_sprint_string_s {
//replace LTE
//extern unsigned char NB_eNB_INST;
extern
unsigned
char
NB_gNB_INST
;
extern
uint8_t
usim_test
;
extern
RAN_CONTEXT_t
RC
;
...
...
targets/RT/USER/lte-softmodem.c
View file @
64e4826c
...
...
@@ -150,7 +150,6 @@ char channels[128] = "0";
int
rx_input_level_dBm
;
int
otg_enabled
;
uint8_t
exit_missed_slots
=
1
;
uint64_t
num_missed_slots
=
0
;
// counter for the number of missed slots
...
...
@@ -235,24 +234,6 @@ unsigned int build_rfdc(int dcoff_i_rxfe, int dcoff_q_rxfe) {
}
void
signal_handler
(
int
sig
)
{
void
*
array
[
10
];
size_t
size
;
if
(
sig
==
SIGSEGV
)
{
// get void*'s for all entries on the stack
size
=
backtrace
(
array
,
10
);
// print out all the frames to stderr
fprintf
(
stderr
,
"Error: signal %d:
\n
"
,
sig
);
backtrace_symbols_fd
(
array
,
size
,
2
);
exit
(
-
1
);
}
else
{
printf
(
"Linux signal %s...
\n
"
,
strsignal
(
sig
));
exit_function
(
__FILE__
,
__FUNCTION__
,
__LINE__
,
"softmodem starting exit procedure
\n
"
);
}
}
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
int
ru_id
;
...
...
@@ -537,9 +518,6 @@ int main ( int argc, char **argv )
printf
(
"Reading in command-line options
\n
"
);
get_options
();
if
(
is_nos1exec
(
argv
[
0
])
)
set_softmodem_optmask
(
SOFTMODEM_NOS1_BIT
);
EPC_MODE_ENABLED
=
!
IS_SOFTMODEM_NOS1
;
if
(
CONFIG_ISFLAGSET
(
CONFIG_ABORT
)
)
{
...
...
@@ -570,10 +548,7 @@ int main ( int argc, char **argv )
MSC_INIT
(
MSC_E_UTRAN
,
THREAD_MAX
+
TASK_MAX
);
init_opt
();
// to make a graceful exit when ctrl-c is pressed
signal
(
SIGSEGV
,
signal_handler
);
signal
(
SIGINT
,
signal_handler
);
signal
(
SIGTERM
,
signal_handler
);
signal
(
SIGABRT
,
signal_handler
);
set_softmodem_sighandler
();
check_clock
();
#ifndef PACKAGE_VERSION
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
...
...
targets/RT/USER/lte-softmodem.h
View file @
64e4826c
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-uesoftmodem.c
View file @
64e4826c
...
...
@@ -169,7 +169,6 @@ int rx_input_level_dBm;
static
LTE_DL_FRAME_PARMS
*
frame_parms
[
MAX_NUM_CCs
];
uint8_t
exit_missed_slots
=
1
;
uint64_t
num_missed_slots
=
0
;
// counter for the number of missed slots
// prototypes from function implemented in lte-ue.c, probably should be elsewhere in a include file.
...
...
@@ -264,26 +263,6 @@ unsigned int build_rfdc(int dcoff_i_rxfe, int dcoff_q_rxfe) {
}
void
signal_handler
(
int
sig
)
{
void
*
array
[
10
];
size_t
size
;
if
(
sig
==
SIGSEGV
)
{
// get void*'s for all entries on the stack
size
=
backtrace
(
array
,
10
);
// print out all the frames to stderr
fprintf
(
stderr
,
"Error: signal %d:
\n
"
,
sig
);
backtrace_symbols_fd
(
array
,
size
,
2
);
exit
(
-
1
);
}
else
{
char
msg
[
64
];
sprintf
(
msg
,
"Received linux signal %s...
\n
"
,
strsignal
(
sig
));
exit_function
(
__FILE__
,
__FUNCTION__
,
__LINE__
,
msg
);
}
}
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
int
CC_id
;
logClean
();
...
...
@@ -596,9 +575,6 @@ int main( int argc, char **argv ) {
get_options
();
if
(
is_nos1exec
(
argv
[
0
])
)
set_softmodem_optmask
(
SOFTMODEM_NOS1_BIT
);
EPC_MODE_ENABLED
=
!
IS_SOFTMODEM_NOS1
;
printf
(
"Running with %d UE instances
\n
"
,
NB_UE_INST
);
...
...
@@ -645,10 +621,7 @@ int main( int argc, char **argv ) {
printf
(
"PDCP PC5S socket
\n
"
);
pdcp_pc5_socket_init
();
// to make a graceful exit when ctrl-c is pressed
signal
(
SIGSEGV
,
signal_handler
);
signal
(
SIGINT
,
signal_handler
);
signal
(
SIGTERM
,
signal_handler
);
signal
(
SIGABRT
,
signal_handler
);
set_softmodem_sighandler
();
check_clock
();
#ifndef PACKAGE_VERSION
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment