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
wangjie
OpenXG-RAN
Commits
7a5214c6
Commit
7a5214c6
authored
May 14, 2019
by
Laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 4G merge issues
parent
b472d97b
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
49 deletions
+46
-49
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+8
-0
common/utils/system.c
common/utils/system.c
+0
-42
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+1
-0
openair1/PHY/defs_RU.h
openair1/PHY/defs_RU.h
+19
-0
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+8
-0
targets/ARCH/rfsimulator/simulator.c
targets/ARCH/rfsimulator/simulator.c
+5
-2
targets/COMMON/openairinterface5g_limits.h
targets/COMMON/openairinterface5g_limits.h
+4
-4
No files found.
cmake_targets/CMakeLists.txt
View file @
7a5214c6
...
@@ -793,7 +793,10 @@ include_directories("${OPENAIR3_DIR}/S1AP")
...
@@ -793,7 +793,10 @@ include_directories("${OPENAIR3_DIR}/S1AP")
include_directories
(
"
${
OPENAIR2_DIR
}
/X2AP"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/X2AP"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/UDP"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/UDP"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/GTPV1-U"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/GTPV1-U"
)
include_directories
(
"
${
OPENAIR_DIR
}
/targets/COMMON"
)
include_directories
(
"
${
OPENAIR_DIR
}
/targets/ARCH/COMMON"
)
include_directories
(
"
${
OPENAIR_DIR
}
/targets/ARCH/COMMON"
)
include_directories
(
"
${
OPENAIR_DIR
}
/targets/ARCH/EXMIMO/USERSPACE/LIB/"
)
include_directories
(
"
${
OPENAIR_DIR
}
/targets/ARCH/EXMIMO/DEFS"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/ENB_APP"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/ENB_APP"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/GNB_APP"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/GNB_APP"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/ENB_APP/CONTROL_MODULES/MAC"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/ENB_APP/CONTROL_MODULES/MAC"
)
...
@@ -2507,6 +2510,7 @@ target_link_libraries (nr-uesoftmodem-nos1 ${T_LIB})
...
@@ -2507,6 +2510,7 @@ target_link_libraries (nr-uesoftmodem-nos1 ${T_LIB})
add_executable
(
dlsim_tm4
add_executable
(
dlsim_tm4
${
OPENAIR1_DIR
}
/SIMULATION/LTE_PHY/dlsim_tm4.c
${
OPENAIR1_DIR
}
/SIMULATION/LTE_PHY/dlsim_tm4.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/lte_phy_scope_tm4.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/lte_phy_scope_tm4.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
T_SOURCE
}
${
T_SOURCE
}
)
)
target_link_libraries
(
dlsim_tm4
target_link_libraries
(
dlsim_tm4
...
@@ -2533,18 +2537,21 @@ target_link_libraries(ldpctest SIMU PHY PHY_NR m ${ATLAS_LIBRARIES})
...
@@ -2533,18 +2537,21 @@ target_link_libraries(ldpctest SIMU PHY PHY_NR m ${ATLAS_LIBRARIES})
add_executable
(
nr_dlschsim
add_executable
(
nr_dlschsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/dlschsim.c
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/dlschsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
T_SOURCE
}
)
${
T_SOURCE
}
)
target_link_libraries
(
nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
target_link_libraries
(
nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
add_executable
(
nr_pbchsim
add_executable
(
nr_pbchsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/pbchsim.c
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/pbchsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
T_SOURCE
}
)
${
T_SOURCE
}
)
target_link_libraries
(
nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
target_link_libraries
(
nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
add_executable
(
nr_dlsim
add_executable
(
nr_dlsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/dlsim.c
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/dlsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
T_SOURCE
}
)
${
T_SOURCE
}
)
target_link_libraries
(
nr_dlsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
target_link_libraries
(
nr_dlsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
...
@@ -2560,6 +2567,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
...
@@ -2560,6 +2567,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
add_executable
(
${
myExe
}
add_executable
(
${
myExe
}
${
OPENAIR1_DIR
}
/SIMULATION/LTE_PHY/
${
myExe
}
.c
${
OPENAIR1_DIR
}
/SIMULATION/LTE_PHY/
${
myExe
}
.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
XFORMS_SOURCE
}
${
XFORMS_SOURCE
}
${
T_SOURCE
}
${
T_SOURCE
}
${
CONFIG_SOURCES
}
${
CONFIG_SOURCES
}
...
...
common/utils/system.c
View file @
7a5214c6
...
@@ -196,48 +196,6 @@ void start_background_system(void) {
...
@@ -196,48 +196,6 @@ void start_background_system(void) {
background_system_process
();
background_system_process
();
}
}
void
thread_top_init
(
char
*
thread_name
,
int
affinity
,
uint64_t
runtime
,
uint64_t
deadline
,
uint64_t
period
)
{
#ifdef DEADLINE_SCHEDULER
struct
sched_attr
attr
;
unsigned
int
flags
=
0
;
attr
.
size
=
sizeof
(
attr
);
attr
.
sched_flags
=
0
;
attr
.
sched_nice
=
0
;
attr
.
sched_priority
=
0
;
attr
.
sched_policy
=
SCHED_DEADLINE
;
attr
.
sched_runtime
=
runtime
;
attr
.
sched_deadline
=
deadline
;
attr
.
sched_period
=
period
;
AssertFatal
(
sched_setattr
(
0
,
&
attr
,
flags
)
==
0
,
"[SCHED] eNB tx thread: sched_setattr failed
\n
"
);
#else
#ifdef CPU_AFFINITY
/* Set affinity mask to include CPUs 2 to MAX_CPUS */
/* CPU 0 is reserved for UHD threads */
/* CPU 1 is reserved for all RX_TX threads */
/* Enable CPU Affinity only if number of CPUs > 2 */
cpu_set_t
cpuset
;
CPU_ZERO
(
&
cpuset
);
if
(
affinity
==
0
)
{
LOG_W
(
HW
,
"thread_top_init() called with affinity==0, but overruled by #ifdef CPU_AFFINITY
\n
"
);
}
else
if
(
get_nprocs
()
>
2
)
{
for
(
j
=
2
;
j
<
get_nprocs
();
j
++
)
CPU_SET
(
j
,
&
cpuset
);
AssertFatal
(
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
)
==
0
,
"Error setting processor affinity"
);
}
#endif //CPU_AFFINITY
struct
sched_param
sparam
=
{
0
};
sparam
.
sched_priority
=
OAI_PRIORITY_RT
;
AssertFatal
(
pthread_setschedparam
(
pthread_self
(),
SCHED_FIFO
,
&
sparam
)
==
0
,
"Error setting thread priority"
);
pthread_setname_np
(
pthread_self
(),
thread_name
);
#endif
mlockall
(
MCL_CURRENT
|
MCL_FUTURE
);
}
void
threadCreate
(
pthread_t
*
t
,
void
*
(
*
func
)(
void
*
),
void
*
param
,
char
*
name
,
int
affinity
,
int
priority
){
void
threadCreate
(
pthread_t
*
t
,
void
*
(
*
func
)(
void
*
),
void
*
param
,
char
*
name
,
int
affinity
,
int
priority
){
pthread_attr_t
attr
;
pthread_attr_t
attr
;
...
...
executables/nr-uesoftmodem.c
View file @
7a5214c6
...
@@ -673,7 +673,7 @@ int main( int argc, char **argv ) {
...
@@ -673,7 +673,7 @@ int main( int argc, char **argv ) {
set_taus_seed
(
0
);
set_taus_seed
(
0
);
tpool_t
pool
;
tpool_t
pool
;
Tpool
=
&
pool
;
Tpool
=
&
pool
;
char
params
[]
=
"
2,3"
;
char
params
[]
=
"
-1,-1"
;
initTpool
(
params
,
Tpool
,
false
);
initTpool
(
params
,
Tpool
,
false
);
cpuf
=
get_cpu_freq_GHz
();
cpuf
=
get_cpu_freq_GHz
();
itti_init
(
TASK_MAX
,
THREAD_MAX
,
MESSAGES_ID_MAX
,
tasks_info
,
messages_info
);
itti_init
(
TASK_MAX
,
THREAD_MAX
,
MESSAGES_ID_MAX
,
tasks_info
,
messages_info
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
7a5214c6
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
//#include "extern.h"
//#include "extern.h"
#include "PHY/sse_intrin.h"
#include "PHY/sse_intrin.h"
#include "T.h"
#include "T.h"
#include "openair1/PHY/NR_TRANSPORT/nr_dlsch.h"
#ifndef USER_MODE
#ifndef USER_MODE
#define NOCYGWIN_STATIC static
#define NOCYGWIN_STATIC static
...
...
openair1/PHY/defs_RU.h
View file @
7a5214c6
...
@@ -191,6 +191,25 @@ typedef struct RU_proc_t_s {
...
@@ -191,6 +191,25 @@ typedef struct RU_proc_t_s {
int
first_rx
;
int
first_rx
;
/// flag to indicate first TX transmission
/// flag to indicate first TX transmission
int
first_tx
;
int
first_tx
;
/// pthread attributes for RU FH processing thread
pthread_attr_t
attr_FH
;
pthread_attr_t
attr_FH1
;
/// pthread attributes for RU prach
pthread_attr_t
attr_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread attributes for RU prach BL/CE UEs
pthread_attr_t
attr_prach_br
;
#endif
/// pthread attributes for RU synch thread
pthread_attr_t
attr_synch
;
/// pthread attributes for asynchronous RX thread
pthread_attr_t
attr_asynch_rxtx
;
/// pthread attributes for worker fep thread
pthread_attr_t
attr_fep
;
/// pthread attributes for worker feptx thread
pthread_attr_t
attr_feptx
;
/// pthread attributes for emulated RF
pthread_attr_t
attr_emulateRF
;
/// scheduling parameters for RU FH thread
/// scheduling parameters for RU FH thread
struct
sched_param
sched_param_FH
;
struct
sched_param
sched_param_FH
;
struct
sched_param
sched_param_FH1
;
struct
sched_param
sched_param_FH1
;
...
...
openair1/PHY/defs_gNB.h
View file @
7a5214c6
...
@@ -373,6 +373,8 @@ typedef struct {
...
@@ -373,6 +373,8 @@ typedef struct {
int
instance_cnt
;
int
instance_cnt
;
/// pthread structure for RXn-TXnp4 processing thread
/// pthread structure for RXn-TXnp4 processing thread
pthread_t
pthread
;
pthread_t
pthread
;
/// pthread attributes for RXn-TXnp4 processing thread
pthread_attr_t
attr
;
/// condition variable for tx processing thread
/// condition variable for tx processing thread
pthread_cond_t
cond
;
pthread_cond_t
cond
;
/// mutex for RXn-TXnp4 processing thread
/// mutex for RXn-TXnp4 processing thread
...
@@ -428,6 +430,12 @@ typedef struct gNB_L1_proc_t_s {
...
@@ -428,6 +430,12 @@ typedef struct gNB_L1_proc_t_s {
int
first_rx
;
int
first_rx
;
/// flag to indicate first TX transmission
/// flag to indicate first TX transmission
int
first_tx
;
int
first_tx
;
/// pthread attributes for single gNB processing thread
pthread_attr_t
attr_single
;
/// pthread attributes for prach processing thread
pthread_attr_t
attr_prach
;
/// pthread attributes for asynchronous RX thread
pthread_attr_t
attr_asynch_rxtx
;
/// scheduling parameters for parallel turbo-decoder thread
/// scheduling parameters for parallel turbo-decoder thread
struct
sched_param
sched_param_td
;
struct
sched_param
sched_param_td
;
/// scheduling parameters for parallel turbo-encoder thread
/// scheduling parameters for parallel turbo-encoder thread
...
...
targets/ARCH/rfsimulator/simulator.c
View file @
7a5214c6
...
@@ -201,6 +201,7 @@ sin_addr:
...
@@ -201,6 +201,7 @@ sin_addr:
int
rfsimulator_write
(
openair0_device
*
device
,
openair0_timestamp
timestamp
,
void
**
samplesVoid
,
int
nsamps
,
int
nbAnt
,
int
flags
)
{
int
rfsimulator_write
(
openair0_device
*
device
,
openair0_timestamp
timestamp
,
void
**
samplesVoid
,
int
nsamps
,
int
nbAnt
,
int
flags
)
{
rfsimulator_state_t
*
t
=
device
->
priv
;
rfsimulator_state_t
*
t
=
device
->
priv
;
LOG_D
(
HW
,
"sending %d samples at time: %ld
\n
"
,
nsamps
,
timestamp
);
for
(
int
i
=
0
;
i
<
FD_SETSIZE
;
i
++
)
{
for
(
int
i
=
0
;
i
<
FD_SETSIZE
;
i
++
)
{
buffer_t
*
ptr
=&
t
->
buf
[
i
];
buffer_t
*
ptr
=&
t
->
buf
[
i
];
...
@@ -231,7 +232,7 @@ static bool flushInput(rfsimulator_state_t *t) {
...
@@ -231,7 +232,7 @@ static bool flushInput(rfsimulator_state_t *t) {
// Process all incoming events on sockets
// Process all incoming events on sockets
// store the data in lists
// store the data in lists
struct
epoll_event
events
[
FD_SETSIZE
]
=
{
0
};
struct
epoll_event
events
[
FD_SETSIZE
]
=
{
0
};
int
nfds
=
epoll_wait
(
t
->
epollfd
,
events
,
FD_SETSIZE
,
20
0
);
int
nfds
=
epoll_wait
(
t
->
epollfd
,
events
,
FD_SETSIZE
,
20
);
if
(
nfds
==-
1
)
{
if
(
nfds
==-
1
)
{
if
(
errno
==
EINTR
||
errno
==
EAGAIN
)
if
(
errno
==
EINTR
||
errno
==
EAGAIN
)
...
@@ -310,6 +311,7 @@ static bool flushInput(rfsimulator_state_t *t) {
...
@@ -310,6 +311,7 @@ static bool flushInput(rfsimulator_state_t *t) {
}
}
if
(
b
->
headerMode
==
false
)
{
if
(
b
->
headerMode
==
false
)
{
LOG_D
(
HW
,
"Set b->lastReceivedTS %ld
\n
"
,
b
->
lastReceivedTS
);
b
->
lastReceivedTS
=
b
->
th
.
timestamp
+
b
->
th
.
size
-
byteToSample
(
b
->
remainToTransfer
,
b
->
th
.
nbAnt
);
b
->
lastReceivedTS
=
b
->
th
.
timestamp
+
b
->
th
.
size
-
byteToSample
(
b
->
remainToTransfer
,
b
->
th
.
nbAnt
);
if
(
b
->
remainToTransfer
==
0
)
{
if
(
b
->
remainToTransfer
==
0
)
{
...
@@ -364,13 +366,14 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
...
@@ -364,13 +366,14 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
do
{
do
{
have_to_wait
=
false
;
have_to_wait
=
false
;
for
(
int
sock
=
0
;
sock
<
FD_SETSIZE
;
sock
++
)
for
(
int
sock
=
0
;
sock
<
FD_SETSIZE
;
sock
++
)
{
if
(
t
->
buf
[
sock
].
circularBuf
&&
if
(
t
->
buf
[
sock
].
circularBuf
&&
t
->
buf
[
sock
].
alreadyRead
&&
//>= t->initialAhead &&
t
->
buf
[
sock
].
alreadyRead
&&
//>= t->initialAhead &&
(
t
->
nextTimestamp
+
nsamps
)
>
t
->
buf
[
sock
].
lastReceivedTS
)
{
(
t
->
nextTimestamp
+
nsamps
)
>
t
->
buf
[
sock
].
lastReceivedTS
)
{
have_to_wait
=
true
;
have_to_wait
=
true
;
break
;
break
;
}
}
}
if
(
have_to_wait
)
if
(
have_to_wait
)
/*printf("Waiting on socket, current last ts: %ld, expected at least : %ld\n",
/*printf("Waiting on socket, current last ts: %ld, expected at least : %ld\n",
...
...
targets/COMMON/openairinterface5g_limits.h
View file @
7a5214c6
...
@@ -8,10 +8,10 @@
...
@@ -8,10 +8,10 @@
# define NUMBER_OF_NR_RU_MAX 2
# define NUMBER_OF_NR_RU_MAX 2
# ifndef PHYSIM
# ifndef PHYSIM
# ifndef UE_EXPANSION
# ifndef UE_EXPANSION
# define NUMBER_OF_UE_MAX
16
# define NUMBER_OF_UE_MAX
4
# define NUMBER_OF_NR_UE_MAX
16
# define NUMBER_OF_NR_UE_MAX
4
# define NUMBER_OF_CONNECTED_eNB_MAX
3
# define NUMBER_OF_CONNECTED_eNB_MAX
1
# define NUMBER_OF_CONNECTED_gNB_MAX
3
# define NUMBER_OF_CONNECTED_gNB_MAX
1
# else
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_NR_UE_MAX 256
# define NUMBER_OF_NR_UE_MAX 256
...
...
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