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
常顺宇
OpenXG-RAN
Commits
9aa34832
Commit
9aa34832
authored
Oct 03, 2019
by
yilmazt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
executables compiling again
parent
84af6103
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
194 additions
and
118 deletions
+194
-118
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+66
-27
common/utils/LOG/vcd_signal_dumper.c
common/utils/LOG/vcd_signal_dumper.c
+1
-1
common/utils/ocp_itti/intertask_interface.h
common/utils/ocp_itti/intertask_interface.h
+3
-2
executables/nr-softmodem-common.h
executables/nr-softmodem-common.h
+1
-1
executables/nr-softmodem.h
executables/nr-softmodem.h
+1
-0
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+5
-5
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+1
-0
executables/softmodem-common.h
executables/softmodem-common.h
+64
-0
openair1/PHY/CODING/TESTBENCH/ldpctest.c
openair1/PHY/CODING/TESTBENCH/ldpctest.c
+11
-40
openair1/PHY/CODING/TESTBENCH/polartest.c
openair1/PHY/CODING/TESTBENCH/polartest.c
+7
-1
openair1/PHY/CODING/TESTBENCH/smallblocktest.c
openair1/PHY/CODING/TESTBENCH/smallblocktest.c
+8
-19
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+9
-9
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+1
-0
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-0
openair1/SIMULATION/NR_PHY/nr_unitary_defs.h
openair1/SIMULATION/NR_PHY/nr_unitary_defs.h
+1
-1
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+1
-0
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+1
-0
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+1
-0
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+1
-0
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+0
-2
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+10
-10
No files found.
cmake_targets/CMakeLists.txt
View file @
9aa34832
...
...
@@ -2631,69 +2631,108 @@ target_link_libraries (dlsim_tm4
add_executable
(
polartest
${
OPENAIR1_DIR
}
/PHY/CODING/TESTBENCH/polartest.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
)
target_link_libraries
(
polartest SIMU PHY PHY_NR PHY_COMMON m
${
ATLAS_LIBRARIES
}
)
${
OPENAIR_DIR
}
/common/utils/system.c
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
polartest
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE CONFIG_LIB -Wl,--end-group
m pthread
${
ATLAS_LIBRARIES
}
dl
)
add_executable
(
smallblocktest
add_executable
(
smallblocktest
${
OPENAIR1_DIR
}
/PHY/CODING/TESTBENCH/smallblocktest.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
)
target_link_libraries
(
smallblocktest SIMU PHY PHY_NR PHY_COMMON m
${
ATLAS_LIBRARIES
}
)
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
smallblocktest
-Wl,--start-group UTIL SIMU PHY_NR CONFIG_LIB -Wl,--end-group
m pthread
${
ATLAS_LIBRARIES
}
dl
)
add_executable
(
ldpctest
${
OPENAIR1_DIR
}
/PHY/CODING/TESTBENCH/ldpctest.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
)
target_link_libraries
(
ldpctest SIMU PHY PHY_NR m
${
ATLAS_LIBRARIES
}
)
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
ldpctest
-Wl,--start-group UTIL SIMU PHY_NR CONFIG_LIB -Wl,--end-group
m pthread
${
ATLAS_LIBRARIES
}
dl
)
add_executable
(
nr_dlschsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/dlschsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
UTIL_SRC
}
${
T_SOURCE
}
)
target_link_libraries
(
nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
nr_dlschsim
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
add_executable
(
nr_pbchsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/pbchsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
UTIL_SRC
}
${
T_SOURCE
}
)
target_link_libraries
(
nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
nr_pbchsim
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
#PUCCH ---> Prashanth
add_executable
(
nr_pucchsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/pucchsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
UTIL_SRC
}
${
T_SOURCE
}
)
target_link_libraries
(
nr_pucchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
nr_pucchsim
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
#PUCCH ---> Prashanth
add_executable
(
nr_dlsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/dlsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/dlsim.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
UTIL_SRC
}
${
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
}
${
ITTI_LIB
}
dl
)
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
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
}
${
ITTI_LIB
}
dl
)
add_executable
(
nr_ulschsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/ulschsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
UTIL_SRC
}
${
T_SOURCE
}
)
target_link_libraries
(
nr_ulschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
nr_ulschsim
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
add_executable
(
nr_ulsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/ulsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
UTIL_SRC
}
${
T_SOURCE
}
)
target_link_libraries
(
nr_ulsim -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
}
${
ITTI_LIB
}
dl
)
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
nr_ulsim
-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
}
${
ITTI_LIB
}
dl
)
foreach
(
myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim
)
...
...
common/utils/LOG/vcd_signal_dumper.c
View file @
9aa34832
...
...
@@ -630,7 +630,7 @@ void *vcd_dumper_thread_rt(void *args)
uint32_t
data_ready_wait
;
# if defined(ENABLE_ITTI)
signal_mask
();
return
0
;
//signal_mask(); //function defined at common/utils/ocp_itti/intertask_interface.cpp
# endif
sched_param
.
sched_priority
=
sched_get_priority_min
(
SCHED_FIFO
)
+
1
;
...
...
common/utils/ocp_itti/intertask_interface.h
View file @
9aa34832
...
...
@@ -25,7 +25,7 @@ typedef struct {
typedef
struct
{
uint32_t
interval_sec
;
uint32_t
interval_us
;
long
task_id
;
long
task_id
;
int32_t
instance
;
timer_type_t
type
;
void
*
timer_arg
;
...
...
@@ -33,7 +33,7 @@ typedef struct {
}
timer_create_t
;
typedef
struct
{
long
task_id
;
long
task_id
;
long
timer_id
;
}
timer_delete_t
;
...
...
@@ -536,6 +536,7 @@ int timer_setup(
int
timer_remove
(
long
timer_id
);
#define timer_stop timer_remove
int
signal_handle
(
int
*
end
);
int
signal_mask
(
void
);
#ifdef __cplusplus
}
...
...
executables/nr-softmodem-common.h
View file @
9aa34832
#ifndef NR_SOFTMODEM_COMMON_H
#define NR_SOFTMODEM_COMMON_H
#ifndef
_GNU_SOURCE
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
...
...
executables/nr-softmodem.h
View file @
9aa34832
...
...
@@ -2,6 +2,7 @@
#define NR_SOFTMODEM_H
#include <executables/nr-softmodem-common.h>
#include <executables/softmodem-common.h>
#include "flexran_agent.h"
#include "PHY/defs_gNB.h"
...
...
executables/nr-uesoftmodem.c
View file @
9aa34832
...
...
@@ -162,7 +162,7 @@ uint8_t nb_antenna_rx = 1;
char
ref
[
128
]
=
"internal"
;
char
channels
[
128
]
=
"0"
;
typedef
struct
{
/*
typedef struct {
uint64_t optmask;
THREAD_STRUCT thread_struct;
char rf_config_file[1024];
...
...
@@ -176,14 +176,14 @@ typedef struct {
unsigned int start_msc;
uint32_t clock_source;
int hw_timing_advance;
}
softmodem_params_t
;
} softmodem_params_t;
*/
static
softmodem_params_t
softmodem_params
;
static
char
*
parallel_config
=
NULL
;
static
char
*
worker_config
=
NULL
;
static
THREAD_STRUCT
thread_struct
;
//
static THREAD_STRUCT thread_struct;
void
set_parallel_conf
(
char
*
parallel_conf
)
{
/*
void set_parallel_conf(char *parallel_conf) {
if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT;
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT;
...
...
@@ -201,7 +201,7 @@ PARALLEL_CONF_t get_thread_parallel_conf(void) {
}
WORKER_CONF_t get_thread_worker_conf(void) {
return thread_struct.worker_conf;
}
}
*/
int
rx_input_level_dBm
;
//static int online_log_messages=0;
...
...
executables/nr-uesoftmodem.h
View file @
9aa34832
#ifndef NR_UESOFTMODEM_H
#define NR_UESOFTMODEM_H
#include <executables/nr-softmodem-common.h>
#include <executables/softmodem-common.h>
#include "PHY/defs_nr_UE.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h"
#include <openair2/LAYER2/NR_MAC_gNB/mac_proto.h>
...
...
executables/softmodem-common.h
0 → 100644
View file @
9aa34832
#ifndef SOFTMODEM_COMMON_H
#define SOFTMODEM_COMMON_H
//#include "threads_t.h"
THREAD_STRUCT
thread_struct
;
static
inline
void
set_parallel_conf
(
char
*
parallel_conf
)
{
mapping
config
[]
=
{
FOREACH_PARALLEL
(
GENERATE_ENUMTXT
)
{
NULL
,
-
1
}
};
thread_struct
.
parallel_conf
=
(
PARALLEL_CONF_t
)
map_str_to_int
(
config
,
parallel_conf
);
if
(
thread_struct
.
parallel_conf
==
-
1
)
{
LOG_E
(
ENB_APP
,
"Impossible value: %s
\n
"
,
parallel_conf
);
thread_struct
.
parallel_conf
=
PARALLEL_SINGLE_THREAD
;
}
printf
(
"[CONFIG] parallel_conf is set to %d
\n
"
,
thread_struct
.
parallel_conf
);
}
static
inline
void
set_worker_conf
(
char
*
worker_conf
)
{
mapping
config
[]
=
{
FOREACH_WORKER
(
GENERATE_ENUMTXT
)
{
NULL
,
-
1
}
};
thread_struct
.
worker_conf
=
(
WORKER_CONF_t
)
map_str_to_int
(
config
,
worker_conf
);
if
(
thread_struct
.
worker_conf
==
-
1
)
{
LOG_E
(
ENB_APP
,
"Impossible value: %s
\n
"
,
worker_conf
);
thread_struct
.
worker_conf
=
WORKER_DISABLE
;
}
printf
(
"[CONFIG] worker_conf is set to %d
\n
"
,
thread_struct
.
worker_conf
);
}
static
inline
PARALLEL_CONF_t
get_thread_parallel_conf
(
void
)
{
return
thread_struct
.
parallel_conf
;
}
static
inline
WORKER_CONF_t
get_thread_worker_conf
(
void
)
{
return
thread_struct
.
worker_conf
;
}
typedef
struct
{
uint64_t
optmask
;
THREAD_STRUCT
thread_struct
;
char
rf_config_file
[
1024
];
int
phy_test
;
uint8_t
usim_test
;
int
emulate_rf
;
int
wait_for_sync
;
//eNodeB only
int
single_thread_flag
;
//eNodeB only
int
chain_offset
;
int
numerology
;
unsigned
int
start_msc
;
uint32_t
clock_source
;
uint32_t
timing_source
;
int
hw_timing_advance
;
uint32_t
send_dmrs_sync
;
}
softmodem_params_t
;
#endif
openair1/PHY/CODING/TESTBENCH/ldpctest.c
View file @
9aa34832
...
...
@@ -23,13 +23,14 @@
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "assertions.h"
#include "SIMULATION/TOOLS/sim.h"
#include "PHY/CODING/nrLDPC_encoder/defs.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#define MAX_NUM_DLSCH_SEGMENTS 16
#define MAX_BLOCK_LENGTH 8448
#ifndef malloc16
# ifdef __AVX2__
...
...
@@ -42,7 +43,6 @@
#define NR_LDPC_PROFILER_DETAIL
#define NR_LDPC_ENABLE_PARITY_CHECK
// 4-bit quantizer
char
quantize4bit
(
double
D
,
double
x
)
{
...
...
@@ -76,31 +76,15 @@ char quantize8bit(double D,double x)
return
((
char
)
qxd
);
}
char
quantize
(
double
D
,
double
x
,
unsigned
char
B
)
{
double
qxd
;
short
maxlev
;
qxd
=
floor
(
x
/
D
);
maxlev
=
1
<<
(
B
-
1
);
//(char)(pow(2,B-1));
//printf("x=%f,qxd=%f,maxlev=%d\n",x,qxd, maxlev);
if
(
qxd
<=
-
maxlev
)
qxd
=
-
maxlev
;
else
if
(
qxd
>=
maxlev
)
qxd
=
maxlev
-
1
;
return
((
char
)
qxd
);
}
typedef
struct
{
double
n_iter_mean
;
double
n_iter_std
;
int
n_iter_max
;
double
n_iter_mean
;
double
n_iter_std
;
int
n_iter_max
;
}
n_iter_stats_t
;
#define MAX_BLOCK_LENGTH 8448
RAN_CONTEXT_t
RC
;
PHY_VARS_UE
***
PHY_vars_UE_g
;
uint16_t
NB_UE_INST
=
1
;
short
lift_size
[
51
]
=
{
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
18
,
20
,
22
,
24
,
26
,
28
,
30
,
32
,
36
,
40
,
44
,
48
,
52
,
56
,
60
,
64
,
72
,
80
,
88
,
96
,
104
,
112
,
120
,
128
,
144
,
160
,
176
,
192
,
208
,
224
,
240
,
256
,
288
,
320
,
352
,
384
};
...
...
@@ -662,8 +646,7 @@ int main(int argc, char *argv[])
fprintf
(
fd
,
"SNR BLER BER UNCODED_BER ENCODER_MEAN ENCODER_STD ENCODER_MAX DECODER_TIME_MEAN DECODER_TIME_STD DECODER_TIME_MAX DECODER_ITER_MEAN DECODER_ITER_STD DECODER_ITER_MAX
\n
"
);
for
(
SNR
=
SNR0
;
SNR
<
SNR0
+
20
.
0
;
SNR
+=
SNR_step
)
{
for
(
SNR
=
SNR0
;
SNR
<
SNR0
+
20
.
0
;
SNR
+=
SNR_step
)
{
//reset_meas(&time_optim);
//reset_meas(&time_decoder);
//n_iter_stats_t dec_iter = {0, 0, 0};
...
...
@@ -719,23 +702,11 @@ int main(int argc, char *argv[])
dec_iter
->
n_iter_max
);
if
(
decoded_errors
[
i
]
==
0
)
break
;
i
=
i
+
1
;
if
(
decoded_errors
[
i
]
==
0
)
break
;
i
=
i
+
1
;
}
fclose
(
fd
);
return
(
0
);
}
openair1/PHY/CODING/TESTBENCH/polartest.c
View file @
9aa34832
...
...
@@ -11,6 +11,7 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_uci_defs.h"
#include "PHY/CODING/coding_defs.h"
#include "SIMULATION/TOOLS/sim.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
//#include "PHY/NR_TRANSPORT/nr_transport.h"
//#include "common/utils/LOG/log.h"
...
...
@@ -18,7 +19,12 @@
//#define DEBUG_POLAR_TIMING
//#define DEBUG_POLARTEST
int
main
(
int
argc
,
char
*
argv
[])
{
RAN_CONTEXT_t
RC
;
PHY_VARS_UE
***
PHY_vars_UE_g
;
uint16_t
NB_UE_INST
=
1
;
int
main
(
int
argc
,
char
*
argv
[])
{
//Default simulation values (Aim for iterations = 1000000.)
int
decoder_int16
=
0
;
int
itr
,
iterations
=
1000
,
arguments
,
polarMessageType
=
0
;
//0=PBCH, 1=DCI, -1=UCI
...
...
openair1/PHY/CODING/TESTBENCH/smallblocktest.c
View file @
9aa34832
#include "PHY/CODING/nrSmallBlock/nr_small_block_defs.h"
#include "SIMULATION/TOOLS/sim.h"
#include <getopt.h>
#include "SIMULATION/TOOLS/sim.h"
#include "PHY/CODING/nrSmallBlock/nr_small_block_defs.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
//#define DEBUG_SMALLBLOCKTEST
signed
char
quantize
(
double
D
,
double
x
,
unsigned
char
B
)
{
double
qxd
;
short
maxlev
;
qxd
=
floor
(
x
/
D
);
maxlev
=
1
<<
(
B
-
1
);
//(char)(pow(2,B-1));
if
(
qxd
<=
-
maxlev
)
qxd
=
-
maxlev
;
else
if
(
qxd
>=
maxlev
)
qxd
=
maxlev
-
1
;
return
((
char
)
qxd
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
RAN_CONTEXT_t
RC
;
PHY_VARS_UE
***
PHY_vars_UE_g
;
uint16_t
NB_UE_INST
=
1
;
int
main
(
int
argc
,
char
*
argv
[])
{
time_stats_t
timeEncoder
,
timeDecoder
;
opp_enabled
=
1
;
cpu_freq_GHz
=
get_cpu_freq_GHz
();
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
9aa34832
...
...
@@ -85,28 +85,28 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for rx */
int
n_tx_dropped
=
0
;
/*!< \brief initial max process time for tx */
int
n_rx_dropped
=
0
;
/*!< \brief initial max process time for rx */
//
THREAD_STRUCT thread_struct;
static
THREAD_STRUCT
thread_struct
;
THREAD_STRUCT
thread_struct
;
//
static THREAD_STRUCT thread_struct;
void
set_parallel_conf
(
char
*
parallel_conf
)
{
void
set_parallel_conf
_dlsim
(
char
*
parallel_conf
)
{
if
(
strcmp
(
parallel_conf
,
"PARALLEL_SINGLE_THREAD"
)
==
0
)
thread_struct
.
parallel_conf
=
PARALLEL_SINGLE_THREAD
;
else
if
(
strcmp
(
parallel_conf
,
"PARALLEL_RU_L1_SPLIT"
)
==
0
)
thread_struct
.
parallel_conf
=
PARALLEL_RU_L1_SPLIT
;
else
if
(
strcmp
(
parallel_conf
,
"PARALLEL_RU_L1_TRX_SPLIT"
)
==
0
)
thread_struct
.
parallel_conf
=
PARALLEL_RU_L1_TRX_SPLIT
;
printf
(
"[CONFIG] parallel conf is set to %d
\n
"
,
thread_struct
.
parallel_conf
);
}
void
set_worker_conf
(
char
*
worker_conf
)
{
void
set_worker_conf
_dlsim
(
char
*
worker_conf
)
{
if
(
strcmp
(
worker_conf
,
"WORKER_DISABLE"
)
==
0
)
thread_struct
.
worker_conf
=
WORKER_DISABLE
;
else
if
(
strcmp
(
worker_conf
,
"WORKER_ENABLE"
)
==
0
)
thread_struct
.
worker_conf
=
WORKER_ENABLE
;
printf
(
"[CONFIG] worker conf is set to %d
\n
"
,
thread_struct
.
worker_conf
);
}
PARALLEL_CONF_t
get_thread_parallel_conf
(
void
)
{
/*
PARALLEL_CONF_t get_thread_parallel_conf(void) {
return thread_struct.parallel_conf;
}
WORKER_CONF_t get_thread_worker_conf(void) {
return thread_struct.worker_conf;
}
}
*/
int
emulate_rf
=
0
;
...
...
@@ -641,7 +641,7 @@ int main(int argc, char **argv) {
memset
((
void
*
)
&
TX_req
,
0
,
sizeof
(
TX_req
));
DL_req
.
dl_config_request_body
.
dl_config_pdu_list
=
dl_config_pdu_list
;
TX_req
.
tx_request_body
.
tx_pdu_list
=
tx_pdu_list
;
set_parallel_conf
(
"PARALLEL_SINGLE_THREAD"
);
set_parallel_conf
_dlsim
(
"PARALLEL_SINGLE_THREAD"
);
cpuf
=
cpu_freq_GHz
;
//signal(SIGSEGV, handler);
//signal(SIGABRT, handler);
...
...
@@ -891,7 +891,7 @@ int main(int argc, char **argv) {
break
;
case
'Q'
:
set_parallel_conf
(
optarg
);
set_parallel_conf
_dlsim
(
optarg
);
break
;
default:
...
...
@@ -912,7 +912,7 @@ int main(int argc, char **argv) {
if
(
help
)
exit
(
0
);
if
(
thread_struct
.
parallel_conf
!=
PARALLEL_SINGLE_THREAD
)
set_worker_conf
(
"WORKER_ENABLE"
);
set_worker_conf
_dlsim
(
"WORKER_ENABLE"
);
if
(
transmission_mode
>
1
)
pa
=
dBm3
;
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
9aa34832
...
...
@@ -55,6 +55,7 @@ PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t
RC
;
double
cpuf
;
int
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
// needed for some functions
PHY_VARS_NR_UE
*
PHY_vars_UE_g
[
1
][
1
]
=
{
{
NULL
}
};
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
9aa34832
...
...
@@ -62,6 +62,7 @@ PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t
RC
;
double
cpuf
;
int
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
//Dummy Functions
lte_subframe_t
subframe_select
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
unsigned
char
subframe
)
{
return
(
SF_DL
);}
...
...
openair1/SIMULATION/NR_PHY/nr_unitary_defs.h
View file @
9aa34832
...
...
@@ -41,7 +41,7 @@ void exit_function(const char* file, const char* function, const int line, const
exit
(
-
1
);
}
char
quantize
(
double
D
,
double
x
,
unsigned
char
B
)
{
signed
char
quantize
(
double
D
,
double
x
,
unsigned
char
B
)
{
double
qxd
;
short
maxlev
;
qxd
=
floor
(
x
/
D
);
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
9aa34832
...
...
@@ -54,6 +54,7 @@ PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t
RC
;
double
cpuf
;
int
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
// needed for some functions
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
9aa34832
...
...
@@ -52,6 +52,7 @@ RAN_CONTEXT_t RC;
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
double
cpuf
;
int
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
// needed for some functions
PHY_VARS_NR_UE
*
PHY_vars_UE_g
[
1
][
1
]
=
{{
NULL
}};
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
9aa34832
...
...
@@ -54,6 +54,7 @@ PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t
RC
;
double
cpuf
;
int
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
// needed for some functions
PHY_VARS_NR_UE
*
PHY_vars_UE_g
[
1
][
1
]
=
{
{
NULL
}
};
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
9aa34832
...
...
@@ -62,6 +62,7 @@ PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t
RC
;
double
cpuf
;
int
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
// dummy functions
int8_t
nr_mac_rrc_data_ind_ue
(
const
module_id_t
module_id
,
const
int
CC_id
,
const
uint8_t
gNB_index
,
...
...
targets/ARCH/COMMON/common_lib.h
View file @
9aa34832
...
...
@@ -445,8 +445,6 @@ typedef struct {
#define OPTION_LZ4 0x00000001 // LZ4 compression (option_value is set to compressed size)
#define sample_t struct complex16 // 2*16 bits complex number
#ifdef __cplusplus
extern
"C"
{
...
...
targets/RT/USER/lte-softmodem.h
View file @
9aa34832
...
...
@@ -20,8 +20,7 @@
#include <sys/sysinfo.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/sysinfo.h>
#include "threads_t.h"
#include "rt_wrapper.h"
#include "../../ARCH/COMMON/common_lib.h"
//#undef MALLOC
...
...
@@ -30,12 +29,11 @@
#include "PHY/types.h"
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h"
#include "flexran_agent.h"
#include "s1ap_eNB.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h"
#include "proto_agent.h"
#include "executables/softmodem-common.h"
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
...
...
@@ -241,13 +239,13 @@
/***************************************************************************************************************************************/
/* */
#include "threads_t.h"
//
#include "threads_t.h"
//extern threads_t threads;
//extern THREAD_STRUCT thread_struct;
THREAD_STRUCT
thread_struct
;
//
THREAD_STRUCT thread_struct;
static
inline
void
set_parallel_conf
(
char
*
parallel_conf
)
{
/*
static inline void set_parallel_conf(char *parallel_conf) {
mapping config[]= {
FOREACH_PARALLEL(GENERATE_ENUMTXT)
{NULL,-1}
...
...
@@ -257,6 +255,7 @@ static inline void set_parallel_conf(char *parallel_conf) {
LOG_E(ENB_APP,"Impossible value: %s\n", parallel_conf);
thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
}
printf("[CONFIG] parallel_conf is set to %d\n", thread_struct.parallel_conf);
}
static inline void set_worker_conf(char *worker_conf) {
...
...
@@ -269,6 +268,7 @@ static inline void set_worker_conf(char *worker_conf) {
LOG_E(ENB_APP,"Impossible value: %s\n", worker_conf);
thread_struct.worker_conf = WORKER_DISABLE ;
}
printf("[CONFIG] worker_conf is set to %d\n", thread_struct.worker_conf);
}
static inline PARALLEL_CONF_t get_thread_parallel_conf(void) {
...
...
@@ -277,7 +277,7 @@ static inline PARALLEL_CONF_t get_thread_parallel_conf(void) {
static inline WORKER_CONF_t get_thread_worker_conf(void) {
return thread_struct.worker_conf;
}
}
*/
/*PARALLEL_CONF_t get_thread_parallel_conf(void);
WORKER_CONF_t get_thread_worker_conf(void);
...
...
@@ -293,7 +293,7 @@ void set_worker_conf(char *worker_conf);
#define SOFTMODEM_BASICSIM_BIT (1<<11)
#define SOFTMODEM_SIML1_BIT (1<<12)
#define SOFTMODEM_DOFORMS_BIT (1<<15)
typedef
struct
{
/*
typedef struct {
uint64_t optmask;
THREAD_STRUCT thread_struct;
char rf_config_file[1024];
...
...
@@ -309,7 +309,7 @@ typedef struct {
uint32_t timing_source;
int hw_timing_advance;
uint32_t send_dmrs_sync;
}
softmodem_params_t
;
} softmodem_params_t;
*/
#define IS_SOFTMODEM_NOS1 ( get_softmodem_optmask() & SOFTMODEM_NOS1_BIT)
#define IS_SOFTMODEM_NOKRNMOD ( get_softmodem_optmask() & SOFTMODEM_NOKRNMOD_BIT)
...
...
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