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
littleBu
OpenXG-RAN
Commits
e0ca70c3
Commit
e0ca70c3
authored
Nov 29, 2024
by
Laurent THOMAS
Committed by
Robert Schmidt
Jan 09, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace a set of #define by a C bit array, remove duplicated extern global variable declaration
parent
f9bff3d6
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
135 additions
and
284 deletions
+135
-284
common/ran_context.h
common/ran_context.h
+6
-2
common/utils/telnetsrv/telnetsrv.c
common/utils/telnetsrv/telnetsrv.c
+3
-3
common/utils/websrv/websrv.c
common/utils/websrv/websrv.c
+1
-1
common/utils/websrv/websrv_scope.c
common/utils/websrv/websrv_scope.c
+10
-10
executables/lte-enb.c
executables/lte-enb.c
+1
-14
executables/lte-ru.c
executables/lte-ru.c
+0
-3
executables/lte-softmodem.c
executables/lte-softmodem.c
+2
-9
executables/lte-softmodem.h
executables/lte-softmodem.h
+0
-4
executables/lte-ue.c
executables/lte-ue.c
+0
-3
executables/lte-uesoftmodem.c
executables/lte-uesoftmodem.c
+2
-9
executables/main_ru.c
executables/main_ru.c
+2
-1
executables/nr-gnb.c
executables/nr-gnb.c
+3
-11
executables/nr-ru.c
executables/nr-ru.c
+0
-2
executables/nr-softmodem-common.h
executables/nr-softmodem-common.h
+0
-1
executables/nr-softmodem.c
executables/nr-softmodem.c
+2
-2
executables/nr-ue.c
executables/nr-ue.c
+1
-1
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+2
-2
executables/ru_control.c
executables/ru_control.c
+0
-6
executables/softmodem-bits.h
executables/softmodem-bits.h
+0
-61
executables/softmodem-common.c
executables/softmodem-common.c
+20
-43
executables/softmodem-common.h
executables/softmodem-common.h
+42
-28
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+2
-2
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+0
-2
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+0
-2
openair1/PHY/TOOLS/calibration_test.c
openair1/PHY/TOOLS/calibration_test.c
+1
-1
openair1/PHY/TOOLS/imscope/imscope.cpp
openair1/PHY/TOOLS/imscope/imscope.cpp
+4
-6
openair1/PHY/TOOLS/nr_phy_scope.c
openair1/PHY/TOOLS/nr_phy_scope.c
+2
-2
openair1/PHY/defs_common.h
openair1/PHY/defs_common.h
+2
-2
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+0
-2
openair1/SCHED_NR/nr_ru_procedures.c
openair1/SCHED_NR/nr_ru_procedures.c
+0
-5
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+5
-3
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+4
-4
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+0
-2
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-2
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+0
-2
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+0
-1
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+1
-3
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+0
-1
openair2/LAYER2/MAC/main.c
openair2/LAYER2/MAC/main.c
+0
-1
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+0
-1
openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_power_procedures.cpp
...r2/LAYER2/NR_MAC_UE/tests/test_nr_ue_power_procedures.cpp
+0
-4
openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp
openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp
+1
-4
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+7
-2
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+0
-4
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+4
-4
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+2
-2
radio/COMMON/common_lib.c
radio/COMMON/common_lib.c
+2
-2
radio/ETHERNET/eth_udp.c
radio/ETHERNET/eth_udp.c
+0
-2
No files found.
common/ran_context.h
View file @
e0ca70c3
...
...
@@ -32,7 +32,9 @@
#ifndef __RAN_CONTEXT_H__
#define __RAN_CONTEXT_H__
#ifdef __cplusplus
extern
"C"
{
#endif
#include <pthread.h>
#include <stdint.h>
...
...
@@ -111,6 +113,8 @@ typedef struct {
}
RAN_CONTEXT_t
;
extern
RAN_CONTEXT_t
RC
;
#define NB_eNB_INST RC.nb_inst
#ifdef __cplusplus
}
#endif
#endif
common/utils/telnetsrv/telnetsrv.c
View file @
e0ca70c3
...
...
@@ -657,7 +657,7 @@ void run_telnetsrv(void) {
fprintf
(
stderr
,
"[TELNETSRV] Error %s on listen call
\n
"
,
strerror
(
errno
));
using_history
();
int
plen
=
sprintf
(
prompt
,
"%s_%s> "
,
TELNET_PROMPT_PREFIX
,
get_softmodem_function
(
NULL
));
int
plen
=
sprintf
(
prompt
,
"%s_%s> "
,
TELNET_PROMPT_PREFIX
,
get_softmodem_function
(
));
TELNET_LOG
(
"
\n
Initializing telnet server...
\n
"
);
while
(
(
telnetparams
.
new_socket
=
accept
(
sock
,
&
cli_addr
,
&
cli_len
))
)
{
...
...
@@ -746,7 +746,7 @@ void run_telnetclt(void) {
pthread_setname_np
(
pthread_self
(),
"telnetclt"
);
set_sched
(
pthread_self
(),
0
,
telnetparams
.
priority
);
char
prompt
[
sizeof
(
TELNET_PROMPT_PREFIX
)
+
10
];
sprintf
(
prompt
,
"%s_%s> "
,
TELNET_PROMPT_PREFIX
,
get_softmodem_function
(
NULL
));
sprintf
(
prompt
,
"%s_%s> "
,
TELNET_PROMPT_PREFIX
,
get_softmodem_function
(
));
name
.
sin_family
=
AF_INET
;
struct
in_addr
addr
;
inet_aton
(
"127.0.0.1"
,
&
addr
)
;
...
...
@@ -883,7 +883,7 @@ int telnetsrv_autoinit(void) {
memset
(
&
telnetparams
,
0
,
sizeof
(
telnetparams
));
config_get
(
config_get_if
(),
telnetoptions
,
sizeofArray
(
telnetoptions
),
"telnetsrv"
);
/* possibly load a exec specific shared lib */
char
*
execfunc
=
get_softmodem_function
(
NULL
);
char
*
execfunc
=
get_softmodem_function
(
);
char
libname
[
64
];
sprintf
(
libname
,
"telnetsrv_%s"
,
execfunc
);
load_module_shlib
(
libname
,
NULL
,
0
,
NULL
);
...
...
common/utils/websrv/websrv.c
View file @
e0ca70c3
...
...
@@ -736,7 +736,7 @@ int websrv_callback_get_softmodemstatus(const struct _u_request *request, struct
inet_ntop
(
AF_INET
,
&
(
websrvparams
.
instance
.
bind_address
->
sin_addr
),
ipstr
,
INET_ADDRSTRLEN
);
else
sprintf
(
ipstr
,
"%s"
,
"0.0.0.0"
);
snprintf
(
srvinfo
,
sizeof
(
srvinfo
)
-
1
,
"%s:%hu %s"
,
ipstr
,
websrvparams
.
instance
.
port
,
get_softmodem_function
(
NULL
));
snprintf
(
srvinfo
,
sizeof
(
srvinfo
)
-
1
,
"%s:%hu %s"
,
ipstr
,
websrvparams
.
instance
.
port
,
get_softmodem_function
());
json_t
*
modemvars
=
json_array
();
websrv_add_modeminfo
(
modemvars
,
"connected to"
,
srvinfo
,
"string"
);
websrv_add_modeminfo
(
modemvars
,
"config_file"
,
CONFIG_GETCONFFILE
,
"configfile"
);
...
...
common/utils/websrv/websrv_scope.c
View file @
e0ca70c3
...
...
@@ -107,10 +107,10 @@ int websrv_scope_manager(uint64_t lcount, websrv_params_t *websrvparams)
websrv_websocket_send_scopemessage
(
SCOPEMSG_TYPE_TIME
,
strtime
,
websrvparams_ptr
->
wm
);
}
if
((
lcount
%
scope_params
.
refrate
)
==
0
)
{
if
(
IS_SOFTMODEM_GNB
_BIT
&&
(
scope_params
.
statusmask
&
SCOPE_STATUSMASK_STARTED
))
{
if
(
IS_SOFTMODEM_GNB
&&
(
scope_params
.
statusmask
&
SCOPE_STATUSMASK_STARTED
))
{
phy_scope_gNB
(
scope_params
.
scopeform
,
scope_params
.
scopedata
,
scope_params
.
selectedTarget
+
1
/* ue id, +1 as used in loop < limit */
);
}
if
(
IS_SOFTMODEM_5GUE
_BIT
&&
(
scope_params
.
statusmask
&
SCOPE_STATUSMASK_STARTED
))
{
if
(
IS_SOFTMODEM_5GUE
&&
(
scope_params
.
statusmask
&
SCOPE_STATUSMASK_STARTED
))
{
phy_scope_nrUE
(((
scopeData_t
*
)((
PHY_VARS_NR_UE
*
)(
scope_params
.
scopedata
))
->
scopeData
)
->
liveData
,
scope_params
.
scopeform
,
(
PHY_VARS_NR_UE
*
)
scope_params
.
scopedata
,
...
...
@@ -124,7 +124,7 @@ int websrv_scope_manager(uint64_t lcount, websrv_params_t *websrvparams)
/* free scope resources, as websrv scope interface can be stopped and started */
void
websrv_scope_stop
(
void
)
{
clear_softmodem_optmask
(
SOFTMODEM_DOSCOPE_BIT
)
;
IS_SOFTMODEM_DOSCOPE
=
false
;
scope_params
.
statusmask
&=
~
SCOPE_STATUSMASK_STARTED
;
OAI_phy_scope_t
*
sp
=
(
OAI_phy_scope_t
*
)
scope_params
.
scopeform
;
if
(
sp
!=
NULL
)
...
...
@@ -138,7 +138,7 @@ void websrv_scope_stop(void)
char
*
websrv_scope_initdata
(
void
)
{
scope_params
.
num_datamsg_max
=
200
;
if
(
IS_SOFTMODEM_GNB
_BIT
)
{
if
(
IS_SOFTMODEM_GNB
)
{
scopeParms_t
p
;
p
.
ru
=
RC
.
ru
[
0
];
p
.
gNB
=
RC
.
gNB
[
0
];
...
...
@@ -147,7 +147,7 @@ char *websrv_scope_initdata(void)
scope_params
.
scopeform
=
create_phy_scope_gnb
();
scope_params
.
statusmask
|=
SCOPE_STATUSMASK_AVAILABLE
;
return
"gNB"
;
}
else
if
(
IS_SOFTMODEM_5GUE
_BIT
)
{
}
else
if
(
IS_SOFTMODEM_5GUE
)
{
scope_params
.
scopedata
=
PHY_vars_UE_g
[
0
][
0
];
nrUEinitScope
(
PHY_vars_UE_g
[
0
][
0
]);
scope_params
.
scopeform
=
create_phy_scope_nrue
(
scope_params
.
selectedTarget
);
...
...
@@ -188,12 +188,12 @@ int websrv_scope_callback_set_params(const struct _u_request *request, struct _u
websrv_scope_initdata
();
scope_params
.
statusmask
|=
SCOPE_STATUSMASK_STARTED
;
scope_params
.
selectedTarget
=
1
;
// 1 UE to be received from GUI (for xNB scope's
set_softmodem_optmask
(
SOFTMODEM_DOSCOPE_BIT
)
;
// to trigger data copy in scope buffers
IS_SOFTMODEM_DOSCOPE
=
true
;
// to trigger data copy in scope buffers
}
httpstatus
=
200
;
}
else
if
(
strcmp
(
vval
,
"stop"
)
==
0
)
{
scope_params
.
statusmask
&=
~
SCOPE_STATUSMASK_STARTED
;
clear_softmodem_optmask
(
SOFTMODEM_DOSCOPE_BIT
)
;
IS_SOFTMODEM_DOSCOPE
=
false
;
httpstatus
=
200
;
}
else
{
LOG_W
(
UTIL
,
"invalid startstop command value: %s
\n
"
,
vval
);
...
...
@@ -232,11 +232,11 @@ int websrv_scope_callback_set_params(const struct _u_request *request, struct _u
httpstatus
=
200
;
}
else
if
(
strcmp
(
vname
,
"TargetSelect"
)
==
0
)
{
scope_params
.
selectedTarget
=
strtol
(
vval
,
NULL
,
10
);
if
(
IS_SOFTMODEM_GNB
_BIT
&&
scope_params
.
selectedTarget
>
NUMBER_OF_UE_MAX
)
{
if
(
IS_SOFTMODEM_GNB
&&
scope_params
.
selectedTarget
>
NUMBER_OF_UE_MAX
)
{
snprintf
(
errmsg
,
sizeof
(
errmsg
)
-
1
,
"max UE index is %d for this gNB"
,
NUMBER_OF_UE_MAX
);
httpstatus
=
500
;
scope_params
.
selectedTarget
=
1
;
}
else
if
(
IS_SOFTMODEM_5GUE
_BIT
&&
scope_params
.
selectedTarget
>
0
)
{
}
else
if
(
IS_SOFTMODEM_5GUE
&&
scope_params
.
selectedTarget
>
0
)
{
snprintf
(
errmsg
,
sizeof
(
errmsg
)
-
1
,
"UE currently supports only one gNB"
);
httpstatus
=
500
;
scope_params
.
selectedTarget
=
0
;
...
...
@@ -276,7 +276,7 @@ int websrv_scope_callback_get_desc(const struct _u_request *request, struct _u_r
char
stitle
[
64
];
websrv_scope_stop
();
// in case it's not the first connection
if
(
IS_SOFTMODEM_DOSCOPE
|
IS_SOFTMODEM_ENB
_BIT
|
IS_SOFTMODEM_4GUE_BIT
)
{
if
(
IS_SOFTMODEM_DOSCOPE
|
IS_SOFTMODEM_ENB
|
IS_SOFTMODEM_4GUE
)
{
strcpy
(
stitle
,
"none"
);
}
else
{
strcpy
(
stitle
,
websrv_scope_initdata
());
...
...
executables/lte-enb.c
View file @
e0ca70c3
...
...
@@ -44,28 +44,17 @@
#define _GNU_SOURCE
#include <pthread.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "PHY/types.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/defs_eNB.h"
#include "SCHED/sched_eNB.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "nfapi/oai_integration/vendor_ext.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
...
...
@@ -102,8 +91,6 @@ struct timing_info_t {
// Fix per CC openair rf/if device update
extern
int
oai_exit
;
extern
int
transmission_mode
;
#include "executables/thread-common.h"
...
...
@@ -927,7 +914,7 @@ void init_eNB_proc(int inst) {
if
(
cpu_meas_enabled
)
threadCreate
(
&
proc
->
process_stats_thread
,
process_stats_thread
,
(
void
*
)
eNB
,
"opp stats"
,
-
1
,
sched_get_priority_min
(
SCHED_OAI
));
if
(
!
IS_SOFTMODEM_NOSTATS
_BIT
)
if
(
!
IS_SOFTMODEM_NOSTATS
)
threadCreate
(
&
proc
->
L1_stats_thread
,
L1_stats_thread
,
(
void
*
)
eNB
,
"L1 stats"
,
-
1
,
sched_get_priority_min
(
SCHED_OAI
));
}
...
...
executables/lte-ru.c
View file @
e0ca70c3
...
...
@@ -45,8 +45,6 @@
#include <getopt.h>
#include <sys/sysinfo.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "PHY/defs_common.h"
#include "PHY/types.h"
...
...
@@ -78,7 +76,6 @@ static int DEFRUTPCORES[] = {2,4,6,8};
#define MBMS_EXPERIMENTAL
extern
int
oai_exit
;
extern
clock_source_t
clock_source
;
#include "executables/thread-common.h"
//extern PARALLEL_CONF_t get_thread_parallel_conf(void);
...
...
executables/lte-softmodem.c
View file @
e0ca70c3
...
...
@@ -33,9 +33,6 @@
#define _GNU_SOURCE
/* See feature_test_macros(7) */
#include <sched.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "common/oai_version.h"
...
...
@@ -45,14 +42,9 @@
#include "common/ran_context.h"
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/if_defs.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include <openair1/PHY/phy_extern_ue.h>
#include "PHY/phy_vars.h"
...
...
@@ -297,7 +289,8 @@ void exit_function(const char *file, const char *function, const int line, const
static
void
get_options
(
configmodule_interface_t
*
cfg
)
{
CONFIG_SETRTFLAG
(
CONFIG_NOEXITONHELP
);
get_common_options
(
cfg
,
SOFTMODEM_ENB_BIT
);
IS_SOFTMODEM_ENB
=
true
;
get_common_options
(
cfg
);
CONFIG_CLEARRTFLAG
(
CONFIG_NOEXITONHELP
);
if
(
!
(
CONFIG_ISFLAGSET
(
CONFIG_ABORT
))
)
{
...
...
executables/lte-softmodem.h
View file @
e0ca70c3
...
...
@@ -20,7 +20,6 @@
#include <sys/types.h>
#include <unistd.h>
#include "radio/COMMON/common_lib.h"
//#undef MALLOC
#include "assertions.h"
#include "PHY/types.h"
#include "PHY/defs_eNB.h"
...
...
@@ -121,9 +120,6 @@ extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
extern
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
extern
int
rx_input_level_dBm
;
extern
int
oai_exit
;
extern
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
extern
pthread_cond_t
sync_cond
;
extern
pthread_mutex_t
sync_mutex
;
...
...
executables/lte-ue.c
View file @
e0ca70c3
...
...
@@ -41,9 +41,6 @@
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/phy_extern_ue.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
...
...
executables/lte-uesoftmodem.c
View file @
e0ca70c3
...
...
@@ -33,9 +33,6 @@
#define _GNU_SOURCE
/* See feature_test_macros(7) */
#include <sched.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "PHY/types.h"
...
...
@@ -46,14 +43,9 @@
#include "common/ran_context.h"
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/if_defs.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/phy_vars_ue.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
...
...
@@ -274,7 +266,8 @@ static void get_options(configmodule_interface_t *cfg)
CONFIG_SETRTFLAG
(
CONFIG_NOEXITONHELP
);
/* unknown parameters on command line will be checked in main
after all init have been performed */
get_common_options
(
cfg
,
SOFTMODEM_4GUE_BIT
);
IS_SOFTMODEM_4GUE
=
true
;
get_common_options
(
cfg
);
paramdef_t
cmdline_uemodeparams
[]
=
CMDLINE_UEMODEPARAMS_DESC
;
paramdef_t
cmdline_ueparams
[]
=
CMDLINE_UEPARAMS_DESC
;
config_process_cmdline
(
cfg
,
cmdline_uemodeparams
,
sizeofArray
(
cmdline_uemodeparams
),
NULL
);
...
...
executables/main_ru.c
View file @
e0ca70c3
...
...
@@ -119,7 +119,8 @@ void exit_function(const char *file, const char *function, const int line, const
static
void
get_options
(
configmodule_interface_t
*
cfg
)
{
CONFIG_SETRTFLAG
(
CONFIG_NOEXITONHELP
);
get_common_options
(
cfg
,
SOFTMODEM_ENB_BIT
);
IS_SOFTMODEM_ENB
=
true
;
get_common_options
(
cfg
);
CONFIG_CLEARRTFLAG
(
CONFIG_NOEXITONHELP
);
// RCConfig();
...
...
executables/nr-gnb.c
View file @
e0ca70c3
...
...
@@ -33,8 +33,6 @@
#define _GNU_SOURCE
#include <pthread.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include <common/utils/LOG/log.h>
#include <common/utils/system.h>
...
...
@@ -54,13 +52,7 @@
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/phy_extern.h"
...
...
@@ -376,9 +368,9 @@ void init_gNB_Tpool(int inst) {
// this will be removed when the msgDataTx is not necessary anymore
gNB
->
msgDataTx
=
msgDataTx
;
if
((
!
get_softmodem_params
()
->
emulate_l1
)
&&
(
!
IS_SOFTMODEM_NOSTATS
_BIT
)
&&
(
NFAPI_MODE
!=
NFAPI_MODE_VNF
)
&&
(
NFAPI_MODE
!=
NFAPI_MODE_AERIAL
)
)
threadCreate
(
&
proc
->
L1_stats_thread
,
nrL1_stats_thread
,(
void
*
)
gNB
,
"L1_stats"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
if
((
!
get_softmodem_params
()
->
emulate_l1
)
&&
(
!
IS_SOFTMODEM_NOSTATS
)
&&
(
NFAPI_MODE
!=
NFAPI_MODE_VNF
)
&&
(
NFAPI_MODE
!=
NFAPI_MODE_AERIAL
))
threadCreate
(
&
proc
->
L1_stats_thread
,
nrL1_stats_thread
,
(
void
*
)
gNB
,
"L1_stats"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
}
void
term_gNB_Tpool
(
int
inst
)
{
...
...
executables/nr-ru.c
View file @
e0ca70c3
...
...
@@ -29,8 +29,6 @@
#include <sys/sysinfo.h>
#include <math.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "common/utils/nr/nr_common.h"
#include "common/utils/assertions.h"
#include "common/utils/system.h"
...
...
executables/nr-softmodem-common.h
View file @
e0ca70c3
...
...
@@ -25,7 +25,6 @@
#include <sys/sysinfo.h>
#include "radio/COMMON/common_lib.h"
#undef MALLOC
#include "assertions.h"
#include "PHY/types.h"
...
...
executables/nr-softmodem.c
View file @
e0ca70c3
...
...
@@ -82,7 +82,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "radio/COMMON/common_lib.h"
#include "s1ap_eNB.h"
#include "sctp_eNB_task.h"
#include "softmodem-bits.h"
#include "system.h"
#include "time_meas.h"
#include "utils.h"
...
...
@@ -350,7 +349,8 @@ static void get_options(configmodule_interface_t *cfg)
{
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC_GNB
;
CONFIG_SETRTFLAG
(
CONFIG_NOEXITONHELP
);
get_common_options
(
cfg
,
SOFTMODEM_GNB_BIT
);
IS_SOFTMODEM_GNB
=
true
;
get_common_options
(
cfg
);
config_process_cmdline
(
cfg
,
cmdline_params
,
sizeofArray
(
cmdline_params
),
NULL
);
CONFIG_CLEARRTFLAG
(
CONFIG_NOEXITONHELP
);
}
...
...
executables/nr-ue.c
View file @
e0ca70c3
...
...
@@ -1133,7 +1133,7 @@ void init_NR_UE_threads(PHY_VARS_NR_UE *UE) {
char
thread_name
[
16
];
sprintf
(
thread_name
,
"UEthread_%d"
,
UE
->
Mod_id
);
threadCreate
(
&
thread
,
UE_thread
,
(
void
*
)
UE
,
thread_name
,
-
1
,
OAI_PRIORITY_RT_MAX
);
if
(
!
IS_SOFTMODEM_NOSTATS
_BIT
)
{
if
(
!
IS_SOFTMODEM_NOSTATS
)
{
pthread_t
stat_pthread
;
sprintf
(
thread_name
,
"L1_UE_stats_%d"
,
UE
->
Mod_id
);
threadCreate
(
&
stat_pthread
,
nrL1_UE_stats_thread
,
UE
,
thread_name
,
-
1
,
OAI_PRIORITY_RT_LOW
);
...
...
executables/nr-uesoftmodem.c
View file @
e0ca70c3
...
...
@@ -403,8 +403,8 @@ int main(int argc, char **argv)
// get options and fill parameters from configuration file
get_options
(
uniqCfg
);
// Command-line options specific for NRUE
get_common_options
(
uniqCfg
,
SOFTMODEM_5GUE_BIT
);
IS_SOFTMODEM_5GUE
=
true
;
get_common_options
(
uniqCfg
);
CONFIG_CLEARRTFLAG
(
CONFIG_NOEXITONHELP
);
softmodem_verify_mode
(
get_softmodem_params
());
...
...
executables/ru_control.c
View file @
e0ca70c3
...
...
@@ -43,16 +43,11 @@
#include <getopt.h>
#include <sys/sysinfo.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "PHY/types.h"
#include "PHY/defs_common.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/ethernet_lib.h"
...
...
@@ -79,7 +74,6 @@ const char rru_format_options[4][20] = {"OAI_IF5_only","OAI_IF4p5_only","OAI_IF5
const
char
rru_formats
[
3
][
20
]
=
{
"OAI_IF5"
,
"MBP_IF5"
,
"OAI_IF4p5"
};
const
char
ru_if_formats
[
4
][
20
]
=
{
"LOCAL_RF"
,
"REMOTE_OAI_IF5"
,
"REMOTE_MBP_IF5"
,
"REMOTE_OAI_IF4p5"
};
extern
int
oai_exit
;
extern
void
wait_eNBs
(
void
);
int
send_tick
(
RU_t
*
ru
)
...
...
executables/softmodem-bits.h
deleted
100644 → 0
View file @
f9bff3d6
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef SOFTMODEM_BITS_H
#define SOFTMODEM_BITS_H
// clang-format off
#define BIT_0 (1 << 0)
#define BIT_1 (1 << 1)
#define BIT_2 (1 << 2)
#define BIT_10 (1 << 10)
#define BIT_12 (1 << 12)
#define BIT_13 (1 << 13)
#define BIT_15 (1 << 15)
#define BIT_16 (1 << 16)
#define BIT_17 (1 << 17)
#define BIT_18 (1 << 18)
#define BIT_20 (1 << 20)
#define BIT_21 (1 << 21)
#define BIT_22 (1 << 22)
#define BIT_23 (1 << 23)
#define BIT_24 (1 << 24)
#define BIT_25 (1 << 25)
#define SOFTMODEM_NOS1_BIT BIT_0
#define SOFTMODEM_NOKRNMOD_BIT BIT_1
#define SOFTMODEM_NONBIOT_BIT BIT_2
#define SOFTMODEM_RFSIM_BIT BIT_10
#define SOFTMODEM_SIML1_BIT BIT_12
#define SOFTMODEM_DLSIM_BIT BIT_13
#define SOFTMODEM_DOSCOPE_BIT BIT_15
#define SOFTMODEM_RECPLAY_BIT BIT_16
#define SOFTMODEM_TELNETCLT_BIT BIT_17
#define SOFTMODEM_RECRECORD_BIT BIT_18
#define SOFTMODEM_ENB_BIT BIT_20
#define SOFTMODEM_GNB_BIT BIT_21
#define SOFTMODEM_4GUE_BIT BIT_22
#define SOFTMODEM_5GUE_BIT BIT_23
#define SOFTMODEM_NOSTATS_BIT BIT_24
#define SOFTMODEM_IMSCOPE_BIT BIT_25
// clang-format on
#endif // SOFTMODEM_BITS_H
executables/softmodem-common.c
View file @
e0ca70c3
...
...
@@ -41,55 +41,33 @@
#include "softmodem-common.h"
#include "nfapi/oai_integration/vendor_ext.h"
static
softmodem_params_t
softmodem_params
;
char
*
parallel_config
=
NULL
;
char
*
worker_config
=
NULL
;
int
usrp_tx_thread
=
0
;
uint8_t
nfapi_mode
=
0
;
static
mapping
softmodem_funcs
[]
=
MAPPING_SOFTMODEM_FUNCTIONS
;
static
struct
timespec
start
;
uint64_t
get_softmodem_optmask
(
void
)
{
return
softmodem_params
.
optmask
;
}
uint64_t
set_softmodem_optmask
(
uint64_t
bitmask
)
{
softmodem_params
.
optmask
=
softmodem_params
.
optmask
|
bitmask
;
return
softmodem_params
.
optmask
;
}
uint64_t
clear_softmodem_optmask
(
uint64_t
bitmask
)
{
softmodem_params
.
optmask
=
softmodem_params
.
optmask
&
(
~
bitmask
);
return
softmodem_params
.
optmask
;
}
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
return
&
softmodem_params
;
}
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
;
}
char
*
get_softmodem_function
(
void
)
{
optmask_t
fmask
=
*
get_softmodem_optmask
();
if
(
fmask
.
bit
.
SOFTMODEM_ENB_BIT
)
return
"enb"
;
if
(
fmask
.
bit
.
SOFTMODEM_GNB_BIT
)
return
"gnb"
;
if
(
fmask
.
bit
.
SOFTMODEM_4GUE_BIT
)
return
"4Gue"
;
if
(
fmask
.
bit
.
SOFTMODEM_5GUE_BIT
)
return
"5Gue"
;
return
"???"
;
}
void
get_common_options
(
configmodule_interface_t
*
cfg
,
uint32_t
execmask
)
void
get_common_options
(
configmodule_interface_t
*
cfg
)
{
int32_t
stats_disabled
=
0
;
uint32_t
online_log_messages
=
0
;
...
...
@@ -101,7 +79,6 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
uint32_t
enable_imscope
=
0
;
int
nfapi_index
=
0
;
char
*
logmem_filename
=
NULL
;
check_execmask
(
execmask
);
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC
;
checkedparam_t
cmdline_CheckParams
[]
=
CMDLINE_PARAMS_CHECK_DESC
;
...
...
@@ -136,7 +113,7 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
}
if
(
start_telnetclt
)
{
set_softmodem_optmask
(
SOFTMODEM_TELNETCLT_BIT
)
;
IS_SOFTMODEM_TELNETCLT
=
true
;
}
if
(
logmem_filename
!=
NULL
&&
strlen
(
logmem_filename
)
>
0
)
{
...
...
@@ -145,23 +122,23 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
}
if
(
noS1
)
{
set_softmodem_optmask
(
SOFTMODEM_NOS1_BIT
)
;
IS_SOFTMODEM_NOS1
=
true
;
}
if
(
nonbiot
)
{
set_softmodem_optmask
(
SOFTMODEM_NONBIOT_BIT
)
;
IS_SOFTMODEM_NONBIOT
=
true
;
}
if
(
rfsim
)
{
set_softmodem_optmask
(
SOFTMODEM_RFSIM_BIT
)
;
IS_SOFTMODEM_RFSIM
=
true
;
}
if
(
do_forms
)
{
set_softmodem_optmask
(
SOFTMODEM_DOSCOPE_BIT
)
;
IS_SOFTMODEM_DOSCOPE
=
true
;
}
if
(
enable_imscope
)
{
set_softmodem_optmask
(
SOFTMODEM_IMSCOPE_BIT
)
;
IS_SOFTMODEM_IMSCOPE_ENABLED
=
true
;
}
if
(
start_websrv
)
{
...
...
@@ -173,7 +150,7 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
if
(
worker_config
!=
NULL
)
set_worker_conf
(
worker_config
);
nfapi_setmode
(
nfapi_mode
);
if
(
stats_disabled
)
set_softmodem_optmask
(
SOFTMODEM_NOSTATS_BIT
)
;
IS_SOFTMODEM_NOSTATS
=
true
;
}
void
softmodem_verify_mode
(
const
softmodem_params_t
*
p
)
...
...
executables/softmodem-common.h
View file @
e0ca70c3
...
...
@@ -32,7 +32,6 @@
#ifndef SOFTMODEM_COMMON_H
#define SOFTMODEM_COMMON_H
#include "openair1/PHY/defs_common.h"
#include "softmodem-bits.h"
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -268,28 +267,46 @@ extern int usrp_tx_thread;
/***************************************************************************************************************************************/
#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_NONBIOT ( get_softmodem_optmask() & SOFTMODEM_NONBIOT_BIT)
#define IS_SOFTMODEM_RFSIM ( get_softmodem_optmask() & SOFTMODEM_RFSIM_BIT)
#define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT)
#define IS_SOFTMODEM_DLSIM ( get_softmodem_optmask() & SOFTMODEM_DLSIM_BIT)
#define IS_SOFTMODEM_DOSCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_BIT)
#define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT)
#define IS_SOFTMODEM_IQRECORDER ( get_softmodem_optmask() & SOFTMODEM_RECRECORD_BIT)
#define IS_SOFTMODEM_TELNETCLT_BIT ( get_softmodem_optmask() & SOFTMODEM_TELNETCLT_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)
#define IS_SOFTMODEM_NOSTATS_BIT ( get_softmodem_optmask() & SOFTMODEM_NOSTATS_BIT)
#define IS_SOFTMODEM_IMSCOPE_ENABLED ( get_softmodem_optmask() & SOFTMODEM_IMSCOPE_BIT)
#define IS_SOFTMODEM_NOS1 (get_softmodem_optmask()->bit.SOFTMODEM_NOS1_BIT)
#define IS_SOFTMODEM_NONBIOT (get_softmodem_optmask()->bit.SOFTMODEM_NONBIOT_BIT)
#define IS_SOFTMODEM_RFSIM (get_softmodem_optmask()->bit.SOFTMODEM_RFSIM_BIT)
#define IS_SOFTMODEM_SIML1 (get_softmodem_optmask()->bit.SOFTMODEM_SIML1_BIT)
#define IS_SOFTMODEM_DLSIM (get_softmodem_optmask()->bit.SOFTMODEM_DLSIM_BIT)
#define IS_SOFTMODEM_DOSCOPE (get_softmodem_optmask()->bit.SOFTMODEM_DOSCOPE_BIT)
#define IS_SOFTMODEM_IQPLAYER (get_softmodem_optmask()->bit.SOFTMODEM_RECPLAY_BIT)
#define IS_SOFTMODEM_IQRECORDER (get_softmodem_optmask()->bit.SOFTMODEM_RECRECORD_BIT)
#define IS_SOFTMODEM_TELNETCLT (get_softmodem_optmask()->bit.SOFTMODEM_TELNETCLT_BIT)
#define IS_SOFTMODEM_ENB (get_softmodem_optmask()->bit.SOFTMODEM_ENB_BIT)
#define IS_SOFTMODEM_GNB (get_softmodem_optmask()->bit.SOFTMODEM_GNB_BIT)
#define IS_SOFTMODEM_4GUE (get_softmodem_optmask()->bit.SOFTMODEM_4GUE_BIT)
#define IS_SOFTMODEM_5GUE (get_softmodem_optmask()->bit.SOFTMODEM_5GUE_BIT)
#define IS_SOFTMODEM_NOSTATS (get_softmodem_optmask()->bit.SOFTMODEM_NOSTATS_BIT)
#define IS_SOFTMODEM_IMSCOPE_ENABLED (get_softmodem_optmask()->bit.SOFTMODEM_IMSCOPE_BIT)
typedef
struct
optmask_s
{
union
{
struct
{
uint64_t
SOFTMODEM_NOS1_BIT
:
1
;
uint64_t
SOFTMODEM_NOKRNMOD_BIT
:
1
;
uint64_t
SOFTMODEM_NONBIOT_BIT
:
1
;
uint64_t
SOFTMODEM_RFSIM_BIT
:
1
;
uint64_t
SOFTMODEM_SIML1_BIT
:
1
;
uint64_t
SOFTMODEM_DLSIM_BIT
:
1
;
uint64_t
SOFTMODEM_DOSCOPE_BIT
:
1
;
uint64_t
SOFTMODEM_RECPLAY_BIT
:
1
;
uint64_t
SOFTMODEM_TELNETCLT_BIT
:
1
;
uint64_t
SOFTMODEM_RECRECORD_BIT
:
1
;
uint64_t
SOFTMODEM_ENB_BIT
:
1
;
uint64_t
SOFTMODEM_GNB_BIT
:
1
;
uint64_t
SOFTMODEM_4GUE_BIT
:
1
;
uint64_t
SOFTMODEM_5GUE_BIT
:
1
;
uint64_t
SOFTMODEM_NOSTATS_BIT
:
1
;
uint64_t
SOFTMODEM_IMSCOPE_BIT
:
1
;
}
bit
;
uint64_t
v
;
// allow to export entire bit set, force to 64 bit processor atomic size
};
}
optmask_t
;
typedef
struct
{
uint64_t
optmask
;
optmask_t
optmask
;
//THREAD_STRUCT thread_struct;
char
*
rf_config_file
;
char
*
threadPoolConfig
;
...
...
@@ -323,12 +340,10 @@ typedef struct {
#define IS_SA_MODE(sM_params) (!(sM_params)->phy_test && !(sM_params)->do_ra && !(sM_params)->nsa)
void
softmodem_verify_mode
(
const
softmodem_params_t
*
p
);
uint64_t
get_softmodem_optmask
(
void
);
uint64_t
set_softmodem_optmask
(
uint64_t
bitmask
);
uint64_t
clear_softmodem_optmask
(
uint64_t
bitmask
);
#define get_softmodem_optmask() (&(get_softmodem_params()->optmask))
softmodem_params_t
*
get_softmodem_params
(
void
);
void
get_common_options
(
configmodule_interface_t
*
cfg
,
uint32_t
execmask
);
char
*
get_softmodem_function
(
uint64_t
*
sofmodemfunc_mask_ptr
);
void
get_common_options
(
configmodule_interface_t
*
cfg
);
char
*
get_softmodem_function
(
void
);
#define SOFTMODEM_RTSIGNAL (SIGRTMIN+1)
void
set_softmodem_sighandler
(
void
);
extern
uint64_t
downlink_frequency
[
MAX_NUM_CCs
][
4
];
...
...
@@ -336,7 +351,6 @@ extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
extern
int
usrp_tx_thread
;
extern
uint16_t
sl_ahead
;
extern
uint16_t
sf_ahead
;
extern
int
oai_exit
;
void
ru_tx_func
(
void
*
param
);
void
configure_ru
(
void
*
,
void
*
arg
);
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
e0ca70c3
...
...
@@ -295,12 +295,12 @@ static inline void nr_polar_deinterleaver(uint8_t *input, uint8_t *output, uint1
static
inline
void
nr_polar_rm_deinterleaving_lut
(
uint16_t
*
out
,
const
uint
E
)
{
int16_t
in
[
E
];
for
(
int
i
=
0
;
i
<
E
;
i
++
)
for
(
u
int
i
=
0
;
i
<
E
;
i
++
)
in
[
i
]
=
i
;
int
T
=
ceil
((
sqrt
(
8
*
E
+
1
)
-
1
)
/
2
);
int
v_tab
[
T
][
T
];
memset
(
v_tab
,
0
,
sizeof
(
v_tab
));
int
k
=
0
;
u
int
k
=
0
;
for
(
int
i
=
0
;
i
<
T
;
i
++
)
{
for
(
int
j
=
0
;
j
<
T
-
i
;
j
++
)
{
if
(
k
<
E
)
{
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
e0ca70c3
...
...
@@ -58,8 +58,6 @@
uint64_t deadline,
uint64_t period);*/
extern
int
oai_exit
;
void
free_eNB_dlsch
(
LTE_eNB_DLSCH_t
*
dlsch
)
{
int
i
,
r
,
aa
,
layer
;
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
e0ca70c3
...
...
@@ -42,8 +42,6 @@
#include "PHY_INTERFACE/phy_interface.h"
#include "transport_proto.h"
extern
int
oai_exit
;
static
const
int8_t
wACK_RX
[
5
][
4
]
=
{{
-
1
,
-
1
,
-
1
,
-
1
},
{
-
1
,
1
,
-
1
,
1
},
{
-
1
,
-
1
,
1
,
1
},
{
-
1
,
1
,
1
,
-
1
},
{
1
,
1
,
1
,
1
}};
void
free_eNB_ulsch
(
LTE_eNB_ULSCH_t
*
ulsch
)
{
...
...
openair1/PHY/TOOLS/calibration_test.c
View file @
e0ca70c3
...
...
@@ -41,7 +41,7 @@ int main(int argc, char **argv) {
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC_GNB
;
CONFIG_SETRTFLAG
(
CONFIG_NOEXITONHELP
);
get_common_options
(
uniqCfg
,
SOFTMODEM_GNB_BIT
);
get_common_options
(
uniqCfg
);
config_process_cmdline
(
uniqCfg
,
cmdline_params
,
sizeofArray
(
cmdline_params
),
NULL
);
CONFIG_CLEARRTFLAG
(
CONFIG_NOEXITONHELP
);
lock_memory_to_ram
();
...
...
openair1/PHY/TOOLS/imscope/imscope.cpp
View file @
e0ca70c3
...
...
@@ -33,7 +33,7 @@
#include "openair1/PHY/defs_nr_UE.h"
extern
"C"
{
#include "openair1/PHY/TOOLS/phy_scope_interface.h"
uint64_t
get_softmodem_optmask
(
void
);
#include "executables/softmodem-common.h"
}
#include <iostream>
#include <vector>
...
...
@@ -42,7 +42,6 @@ uint64_t get_softmodem_optmask(void);
#include <sstream>
#include <mutex>
#include <thread>
#include "executables/softmodem-bits.h"
#define MAX_OFFSETS 14
#define NR_MAX_RB 273
...
...
@@ -678,7 +677,7 @@ void *imscope_thread(void *data_void_ptr)
static
double
last_frame_time
=
glfwGetTime
();
static
int
target_fps
=
24
;
bool
is_ue
=
(
get_softmodem_optmask
()
&
SOFTMODEM_5GUE_BIT
)
>
0
;
bool
is_ue
=
IS_SOFTMODEM_5GUE
;
bool
close_window
=
false
;
while
(
!
glfwWindowShouldClose
(
window
)
&&
close_window
==
false
)
{
// Poll and handle events (inputs, window resize, etc.)
...
...
@@ -795,8 +794,7 @@ void *imscope_thread(void *data_void_ptr)
extern
"C"
void
imscope_autoinit
(
void
*
dataptr
)
{
AssertFatal
((
get_softmodem_optmask
()
&
SOFTMODEM_5GUE_BIT
)
||
(
get_softmodem_optmask
()
&
SOFTMODEM_GNB_BIT
),
"Scope cannot find NRUE or GNB context"
);
AssertFatal
(
IS_SOFTMODEM_5GUE
||
IS_SOFTMODEM_GNB
,
"Scope cannot find NRUE or GNB context"
);
for
(
auto
i
=
0U
;
i
<
EXTRA_SCOPE_TYPES
;
i
++
)
{
scope_array
[
i
].
is_data_ready
=
false
;
...
...
@@ -804,7 +802,7 @@ extern "C" void imscope_autoinit(void *dataptr)
scope_array
[
i
].
meta
=
{
-
1
,
-
1
};
}
if
(
SOFTMODEM_GNB_BIT
&
get_softmodem_optmask
()
)
{
if
(
IS_SOFTMODEM_GNB
)
{
scopeParms_t
*
scope_params
=
(
scopeParms_t
*
)
dataptr
;
scopeData_t
*
scope
=
(
scopeData_t
*
)
calloc
(
1
,
sizeof
(
scopeData_t
));
scope
->
copyData
=
copyDataThreadSafe
;
...
...
openair1/PHY/TOOLS/nr_phy_scope.c
View file @
e0ca70c3
...
...
@@ -1165,9 +1165,9 @@ STATICFORXSCOPE void nrUEinitScope(PHY_VARS_NR_UE *ue)
}
void
nrscope_autoinit
(
void
*
dataptr
)
{
AssertFatal
(
(
IS_SOFTMODEM_GNB_BIT
||
IS_SOFTMODEM_5GUE_BIT
),
"Scope cannot find NRUE or GNB context"
);
AssertFatal
(
(
IS_SOFTMODEM_GNB
||
IS_SOFTMODEM_5GUE
),
"Scope cannot find NRUE or GNB context"
);
if
(
IS_SOFTMODEM_GNB
_BIT
)
if
(
IS_SOFTMODEM_GNB
)
gNBinitScope
(
dataptr
);
else
nrUEinitScope
(
dataptr
);
...
...
openair1/PHY/defs_common.h
View file @
e0ca70c3
...
...
@@ -60,6 +60,8 @@
//#include <complex.h>
#include "time_meas.h"
#include "common/platform_types.h"
#include "common/ran_context.h"
#include "nr-softmodem-common.h"
#define MAX_NUM_RU_PER_eNB 64
#include <pthread.h>
...
...
@@ -1048,8 +1050,6 @@ typedef uint8_t(encoder_if_t)(uint8_t *input,
uint8_t
*
output
,
uint8_t
F
);
extern
int
oai_exit
;
static
inline
void
wait_sync
(
char
*
thread_name
)
{
int
rc
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
e0ca70c3
...
...
@@ -1429,8 +1429,6 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
stop_meas
(
&
eNB
->
ulsch_decoding_stats
);
}
extern
int
oai_exit
;
void
fill_rx_indication
(
PHY_VARS_eNB
*
eNB
,
int
ULSCH_id
,
int
frame
,
...
...
openair1/SCHED_NR/nr_ru_procedures.c
View file @
e0ca70c3
...
...
@@ -45,12 +45,7 @@
#include <time.h>
// RU OFDM Modulator gNodeB
extern
int
oai_exit
;
// OFDM modulation core routine, generates a first_symbol to first_symbol+num_symbols on a particular slot and TX antenna port
void
nr_feptx0
(
RU_t
*
ru
,
int
tti_tx
,
int
first_symbol
,
int
num_symbols
,
int
aa
)
{
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
e0ca70c3
...
...
@@ -56,6 +56,7 @@
#include "dummy_functions.c"
#include "executables/thread-common.h"
#include "common/ran_context.h"
#include "executables/softmodem-common.h"
void
feptx_ofdm
(
RU_t
*
ru
,
int
frame
,
int
subframe
);
void
feptx_prec
(
RU_t
*
ru
,
int
frame
,
int
subframe
);
...
...
@@ -2121,7 +2122,8 @@ int main(int argc, char **argv) {
else
return
(
0
);
}
/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */
uint64_t
get_softmodem_optmask
(
void
)
{
return
0
;
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
return
&
softmodem_params
;
}
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
e0ca70c3
...
...
@@ -1518,8 +1518,8 @@ int main(int argc, char **argv) {
return
(
0
);
}
/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */
uint64_t
get_softmodem_optmask
(
void
)
{
return
0
;
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
return
&
softmodem_params
;
}
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
e0ca70c3
...
...
@@ -72,8 +72,6 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
PHY_VARS_NR_UE
*
PHY_vars_UE_g
[
1
][
1
]
=
{
{
NULL
}
};
uint16_t
n_rnti
=
0x1234
;
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
uint64_t
get_softmodem_optmask
(
void
)
{
return
0
;}
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
return
&
softmodem_params
;
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
e0ca70c3
...
...
@@ -88,7 +88,6 @@
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair2/RRC/LTE/rrc_vars.h"
#include "softmodem-bits.h"
#include "thread-pool.h"
#include "time_meas.h"
#include "utils.h"
...
...
@@ -623,7 +622,7 @@ int main(int argc, char **argv)
get_softmodem_params
()
->
phy_test
=
1
;
get_softmodem_params
()
->
usim_test
=
1
;
get_softmodem_params
()
->
do_ra
=
0
;
set_softmodem_optmask
(
SOFTMODEM_DLSIM_BIT
)
;
IS_SOFTMODEM_DLSIM
=
true
;
if
(
snr1set
==
0
)
snr1
=
snr0
+
10
;
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
e0ca70c3
...
...
@@ -77,8 +77,6 @@ void deref_sched_response(int _)
LOG_E
(
PHY
,
"fatal
\n
"
);
exit
(
1
);
}
uint64_t
get_softmodem_optmask
(
void
)
{
return
0
;}
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
return
&
softmodem_params
;
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
e0ca70c3
...
...
@@ -91,7 +91,6 @@ nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; }
void
init_downlink_harq_status
(
NR_DL_UE_HARQ_t
*
dl_harq
)
{
}
/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */
uint64_t
get_softmodem_optmask
(
void
)
{
return
0
;}
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
return
&
softmodem_params
;
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
e0ca70c3
...
...
@@ -65,9 +65,7 @@ uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1};
const
short
conjugate
[
8
]
__attribute__
((
aligned
(
16
)))
=
{
-
1
,
1
,
-
1
,
1
,
-
1
,
1
,
-
1
,
1
};
const
short
conjugate2
[
8
]
__attribute__
((
aligned
(
16
)))
=
{
1
,
-
1
,
1
,
-
1
,
1
,
-
1
,
1
,
-
1
};
// needed for some functions
PHY_VARS_NR_UE
*
PHY_vars_UE_g
[
1
][
1
]
=
{{
NULL
}};
uint64_t
get_softmodem_optmask
(
void
)
{
return
0
;}
PHY_VARS_NR_UE
*
PHY_vars_UE_g
[
1
][
1
]
=
{{
NULL
}};
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
return
&
softmodem_params
;
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
e0ca70c3
...
...
@@ -59,7 +59,6 @@ RAN_CONTEXT_t RC;
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
uint64_t
downlink_frequency
[
MAX_NUM_CCs
][
4
];
uint64_t
get_softmodem_optmask
(
void
)
{
return
0
;}
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
return
&
softmodem_params
;
...
...
openair2/LAYER2/MAC/main.c
View file @
e0ca70c3
...
...
@@ -44,7 +44,6 @@
#include "common/utils/system.h"
extern
RAN_CONTEXT_t
RC
;
extern
int
oai_exit
;
void
lte_dump_mac_stats
(
eNB_MAC_INST
*
mac
,
FILE
*
fd
)
{
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
e0ca70c3
...
...
@@ -33,7 +33,6 @@
//#include "defs.h"
#include "mac_proto.h"
#include "radio/COMMON/common_lib.h"
//#undef MALLOC
#include "assertions.h"
#include "executables/nr-uesoftmodem.h"
#include "nr_rlc/nr_rlc_oai_api.h"
...
...
openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_power_procedures.cpp
View file @
e0ca70c3
...
...
@@ -23,10 +23,6 @@
extern
"C"
{
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "executables/softmodem-common.h"
uint64_t
get_softmodem_optmask
(
void
)
{
return
0
;
}
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
...
...
openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp
View file @
e0ca70c3
...
...
@@ -23,10 +23,7 @@
extern
"C"
{
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "executables/softmodem-common.h"
uint64_t
get_softmodem_optmask
(
void
)
{
return
0
;
}
static
softmodem_params_t
softmodem_params
;
softmodem_params_t
*
get_softmodem_params
(
void
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
e0ca70c3
...
...
@@ -297,8 +297,13 @@ void mac_top_init_gNB(ngran_node_t node_type,
RC
.
nrmac
[
i
]
->
pre_processor_dl
=
nr_init_fr1_dlsch_preprocessor
(
0
);
RC
.
nrmac
[
i
]
->
pre_processor_ul
=
nr_init_fr1_ulsch_preprocessor
(
0
);
}
if
(
!
IS_SOFTMODEM_NOSTATS_BIT
)
threadCreate
(
&
RC
.
nrmac
[
i
]
->
stats_thread
,
nrmac_stats_thread
,
(
void
*
)
RC
.
nrmac
[
i
],
"MAC_STATS"
,
-
1
,
sched_get_priority_min
(
SCHED_OAI
)
+
1
);
if
(
!
IS_SOFTMODEM_NOSTATS
)
threadCreate
(
&
RC
.
nrmac
[
i
]
->
stats_thread
,
nrmac_stats_thread
,
(
void
*
)
RC
.
nrmac
[
i
],
"MAC_STATS"
,
-
1
,
sched_get_priority_min
(
SCHED_OAI
)
+
1
);
mac_rrc_init
(
RC
.
nrmac
[
i
],
node_type
);
}
//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
e0ca70c3
...
...
@@ -129,10 +129,6 @@ static sdu_size_t pdcp_output_sdu_bytes_to_write;
notifiedFIFO_t
pdcp_sdu_list
;
pdcp_enb_t
pdcp_enb
[
MAX_NUM_CCs
];
extern
int
oai_exit
;
pthread_t
pdcp_stats_thread_desc
;
/*! \fn bool pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id,
* uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode) \brief Function for RRC to
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
e0ca70c3
...
...
@@ -844,7 +844,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
{
case
NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST
:
{
nfapi_nr_dl_tti_request_t
*
dl_tti_request
=
MALLOC
(
sizeof
(
*
dl_tti_request
));
nfapi_nr_dl_tti_request_t
*
dl_tti_request
=
malloc16
(
sizeof
(
*
dl_tti_request
));
if
(
nfapi_nr_p7_message_unpack
(
buffer
,
len
,
dl_tti_request
,
sizeof
(
*
dl_tti_request
),
NULL
)
<
0
)
{
...
...
@@ -868,7 +868,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case
NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST
:
{
nfapi_nr_tx_data_request_t
*
tx_data_request
=
MALLOC
(
sizeof
(
*
tx_data_request
));
nfapi_nr_tx_data_request_t
*
tx_data_request
=
malloc16
(
sizeof
(
*
tx_data_request
));
if
(
nfapi_nr_p7_message_unpack
(
buffer
,
len
,
tx_data_request
,
sizeof
(
*
tx_data_request
),
NULL
)
<
0
)
{
...
...
@@ -888,7 +888,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case
NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST
:
{
nfapi_nr_ul_dci_request_t
*
ul_dci_request
=
MALLOC
(
sizeof
(
*
ul_dci_request
));
nfapi_nr_ul_dci_request_t
*
ul_dci_request
=
malloc16
(
sizeof
(
*
ul_dci_request
));
if
(
nfapi_nr_p7_message_unpack
(
buffer
,
len
,
ul_dci_request
,
sizeof
(
*
ul_dci_request
),
NULL
)
<
0
)
{
...
...
@@ -908,7 +908,7 @@ static void enqueue_nr_nfapi_msg(void *buffer, ssize_t len, nfapi_p7_message_hea
case
NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST
:
{
nfapi_nr_ul_tti_request_t
*
ul_tti_request
=
MALLOC
(
sizeof
(
*
ul_tti_request
));
nfapi_nr_ul_tti_request_t
*
ul_tti_request
=
malloc16
(
sizeof
(
*
ul_tti_request
));
if
(
nfapi_nr_p7_message_unpack
(
buffer
,
len
,
ul_tti_request
,
sizeof
(
*
ul_tti_request
),
NULL
)
<
0
)
{
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
e0ca70c3
...
...
@@ -2477,11 +2477,11 @@ void *rrc_gnb_task(void *args_p) {
int
result
;
long
stats_timer_id
=
1
;
if
(
!
IS_SOFTMODEM_NOSTATS
_BIT
)
{
if
(
!
IS_SOFTMODEM_NOSTATS
)
{
/* timer to write stats to file */
timer_setup
(
1
,
0
,
TASK_RRC_GNB
,
0
,
TIMER_PERIODIC
,
NULL
,
&
stats_timer_id
);
}
itti_mark_task_ready
(
TASK_RRC_GNB
);
LOG_I
(
NR_RRC
,
"Entering main loop of NR_RRC message task
\n
"
);
...
...
radio/COMMON/common_lib.c
View file @
e0ca70c3
...
...
@@ -101,12 +101,12 @@ int load_lib(openair0_device *device,
openair0_cfg
->
recplay_mode
=
read_recplayconfig
(
&
(
openair0_cfg
->
recplay_conf
),
&
(
device
->
recplay_state
));
if
(
openair0_cfg
->
recplay_mode
==
RECPLAY_RECORDMODE
)
{
set_softmodem_optmask
(
SOFTMODEM_RECRECORD_BIT
);
// softmodem has to know we use the iqrecorder to workaround randomized algorithms
IS_SOFTMODEM_IQRECORDER
=
true
;
// softmodem has to know we use the iqrecorder to workaround randomized algorithms
}
if
(
openair0_cfg
->
recplay_mode
==
RECPLAY_REPLAYMODE
)
{
deflibname
=
OAI_IQPLAYER_LIBNAME
;
shlib_fdesc
[
0
].
fname
=
"device_init"
;
set_softmodem_optmask
(
SOFTMODEM_RECPLAY_BIT
);
// softmodem has to know we use the iqplayer to workaround randomized algorithms
IS_SOFTMODEM_IQPLAYER
=
true
;
// softmodem has to know we use the iqplayer to workaround randomized algorithms
}
else
if
(
IS_SOFTMODEM_RFSIM
&&
flag
==
RAU_LOCAL_RADIO_HEAD
)
{
deflibname
=
OAI_RFSIM_LIBNAME
;
shlib_fdesc
[
0
].
fname
=
"device_init"
;
...
...
radio/ETHERNET/eth_udp.c
View file @
e0ca70c3
...
...
@@ -404,8 +404,6 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
(
unsigned
long
long
)
timestamp
,
nsamps
,
nant
,
udptxelem
->
buff
[
0
],
udptxelem
->
buff
[
1
]);
return
(
0
);
}
extern
int
oai_exit
;
void
*
udp_write_thread
(
void
*
arg
)
{
udp_ctx_t
*
utx
=
(
udp_ctx_t
*
)
arg
;
...
...
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