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
spbro
OpenXG-RAN
Commits
0317d672
Commit
0317d672
authored
Apr 02, 2021
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sanitize, calibration tool kickoff
parent
de5e64c7
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
762 additions
and
41 deletions
+762
-41
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+12
-0
cmake_targets/tools/run_enb_s1_usrp
cmake_targets/tools/run_enb_s1_usrp
+0
-13
common/utils/system.c
common/utils/system.c
+18
-8
common/utils/system.h
common/utils/system.h
+5
-3
executables/nr-softmodem.c
executables/nr-softmodem.c
+0
-1
executables/nr-softmodem.h
executables/nr-softmodem.h
+0
-4
executables/ocp-gnb.c
executables/ocp-gnb.c
+0
-3
openair1/PHY/TOOLS/calibration_scope.c
openair1/PHY/TOOLS/calibration_scope.c
+387
-0
openair1/PHY/TOOLS/calibration_scope.h
openair1/PHY/TOOLS/calibration_scope.h
+5
-0
openair1/PHY/TOOLS/calibration_test.c
openair1/PHY/TOOLS/calibration_test.c
+329
-0
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+5
-5
openair2/SIMULATION/NR_RRC/itti_sim.c
openair2/SIMULATION/NR_RRC/itti_sim.c
+0
-3
openair2/UTIL/OCG/OCG.h
openair2/UTIL/OCG/OCG.h
+0
-1
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+1
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
0317d672
...
...
@@ -2797,6 +2797,7 @@ add_library(rfsimulator MODULE
${
OPENAIR_TARGETS
}
/ARCH/rfsimulator/simulator.c
${
OPENAIR_TARGETS
}
/ARCH/rfsimulator/apply_channelmod.c
${
OPENAIR_TARGETS
}
/ARCH/rfsimulator/new_channel_sim.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/signal_energy.c
)
target_link_libraries
(
rfsimulator SIMU_COMMON
${
ATLAS_LIBRARIES
}
)
...
...
@@ -3181,6 +3182,17 @@ target_link_libraries (dlsim_tm4
pthread m rt
${
CONFIG_LIB
}
${
ATLAS_LIBRARIES
}
${
T_LIB
}
)
add_executable
(
rftest
${
OPENAIR_DIR
}
/openair1/PHY/TOOLS/calibration_test.c
${
OPENAIR_DIR
}
/openair1/PHY/TOOLS/calibration_scope.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
OPENAIR_TARGETS
}
/ARCH/COMMON/common_lib.c
${
OPENAIR_DIR
}
/executables/softmodem-common.c
${
CONFIG_SOURCES
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
rftest minimal_lib PHY_NR_COMMON pthread dl m forms
${
T_LIB
}
)
add_executable
(
polartest
${
OPENAIR1_DIR
}
/PHY/CODING/TESTBENCH/polartest.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
...
...
cmake_targets/tools/run_enb_s1_usrp
View file @
0317d672
...
...
@@ -101,7 +101,6 @@ function main()
local
-i
run_gdb
=
0
local
-i
show_stdout
=
0
local
exe_arguments
=
""
local
itti_dump_file
=
""
until
[
-z
"
$1
"
]
do
...
...
@@ -154,18 +153,6 @@ function main()
exe_arguments
=
"
$exe_arguments
--rf-config-file=
$rf_config_file
"
fi
;;
-K
|
--itti-dump-file
)
itti_dump_file
=
$2
# can omit file name if last arg on the line
if
[
"x
$itti_dump_file
"
=
"x"
]
;
then
itti_dump_file
=
"/tmp/enb_s1_usrp_itti.log"
shift
1
;
else
shift
2
;
fi
echo
"setting ITTI dump file to:
$itti_dump_file
"
exe_arguments
=
"
$exe_arguments
-K
$itti_dump_file
"
;;
-m
|
--mscgen
)
g_msc_dir
=
$2
# can omit file name if last arg on the line
...
...
common/utils/system.c
View file @
0317d672
...
...
@@ -199,15 +199,26 @@ void start_background_system(void) {
void
threadCreate
(
pthread_t
*
t
,
void
*
(
*
func
)(
void
*
),
void
*
param
,
char
*
name
,
int
affinity
,
int
priority
){
pthread_attr_t
attr
;
pthread_attr_init
(
&
attr
);
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
);
pthread_attr_setinheritsched
(
&
attr
,
PTHREAD_EXPLICIT_SCHED
);
pthread_attr_setschedpolicy
(
&
attr
,
SCHED_FIFO
);
int
ret
;
AssertFatal
(
0
==
(
ret
=
pthread_attr_init
(
&
attr
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
0
==
(
ret
=
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
0
==
(
ret
=
pthread_attr_setinheritsched
(
&
attr
,
PTHREAD_EXPLICIT_SCHED
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
0
==
(
ret
=
pthread_attr_setschedpolicy
(
&
attr
,
SCHED_OAI
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
if
(
priority
<
sched_get_priority_min
(
SCHED_OAI
)
||
priority
>
sched_get_priority_max
(
SCHED_FIFO
))
{
LOG_E
(
TMR
,
"Prio not possible: %d, min is %d, max: %d, forced in the range
\n
"
,
priority
,
sched_get_priority_min
(
SCHED_OAI
),
sched_get_priority_max
(
SCHED_OAI
));
if
(
priority
<
sched_get_priority_min
(
SCHED_OAI
))
priority
=
sched_get_priority_min
(
SCHED_OAI
);
if
(
priority
>
sched_get_priority_max
(
SCHED_OAI
))
priority
=
sched_get_priority_max
(
SCHED_OAI
);
}
AssertFatal
(
priority
<=
sched_get_priority_max
(
SCHED_OAI
),
""
);
struct
sched_param
sparam
=
{
0
};
sparam
.
sched_priority
=
priority
;
pthread_attr_setschedparam
(
&
attr
,
&
sparam
);
pthread_create
(
t
,
&
attr
,
func
,
param
);
AssertFatal
(
0
==
(
ret
=
pthread_attr_setschedparam
(
&
attr
,
&
sparam
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
AssertFatal
(
0
==
(
ret
=
pthread_create
(
t
,
&
attr
,
func
,
param
)),
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
pthread_setname_np
(
*
t
,
name
);
if
(
affinity
!=
-
1
)
{
...
...
@@ -216,7 +227,6 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
CPU_SET
(
affinity
,
&
cpuset
);
AssertFatal
(
pthread_setaffinity_np
(
*
t
,
sizeof
(
cpu_set_t
),
&
cpuset
)
==
0
,
"Error setting processor affinity"
);
}
pthread_attr_destroy
(
&
attr
);
}
...
...
common/utils/system.h
View file @
0317d672
...
...
@@ -46,9 +46,11 @@ void set_latency_target(void);
void
configure_linux
(
void
);
void
threadCreate
(
pthread_t
*
t
,
void
*
(
*
func
)(
void
*
),
void
*
param
,
char
*
name
,
int
affinity
,
int
priority
);
#define OAI_PRIORITY_RT_LOW sched_get_priority_min(SCHED_FIFO)
#define OAI_PRIORITY_RT sched_get_priority_min(SCHED_FIFO+10)
#define OAI_PRIORITY_RT_MAX sched_get_priority_min(SCHED_FIFO+20)
#define SCHED_OAI SCHED_RR
#define OAI_PRIORITY_RT_LOW sched_get_priority_min(SCHED_OAI)
#define OAI_PRIORITY_RT sched_get_priority_min(SCHED_OAI)+1
#define OAI_PRIORITY_RT_MAX sched_get_priority_min(SCHED_OAI)+2
void
thread_top_init
(
char
*
thread_name
,
int
affinity
,
...
...
executables/nr-softmodem.c
View file @
0317d672
...
...
@@ -114,7 +114,6 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
//Temp fix for inexistent NR upper layer
unsigned
char
NB_gNB_INST
=
1
;
static
char
*
itti_dump_file
=
NULL
;
int
UE_scan
=
1
;
int
UE_scan_carrier
=
0
;
...
...
executables/nr-softmodem.h
View file @
0317d672
...
...
@@ -18,13 +18,9 @@
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_PARAMS_DESC_GNB { \
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \
{"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}, \
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
}
...
...
executables/ocp-gnb.c
View file @
0317d672
...
...
@@ -61,8 +61,6 @@ uint32_t do_forms=0;
unsigned
int
mmapped_dma
=
0
;
int8_t
threequarter_fs
=
0
;
uint32_t
target_dl_mcs
=
28
;
//maximum allowed mcs
uint32_t
target_ul_mcs
=
20
;
int
chain_offset
=
0
;
uint16_t
sl_ahead
=
6
;
uint16_t
sf_ahead
=
6
;
...
...
@@ -122,7 +120,6 @@ int restart_L1L2(module_id_t gnb_id) {
}
static
int
wait_for_sync
=
0
;
static
char
*
itti_dump_file
=
NULL
;
static
double
snr_dB
=
20
;
static
int
DEFBANDS
[]
=
{
7
};
static
int
DEFENBS
[]
=
{
0
};
...
...
openair1/PHY/TOOLS/calibration_scope.c
0 → 100644
View file @
0317d672
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/calibration_scope.h
0 → 100644
View file @
0317d672
#ifndef CALIB_SCOPE_H
#define CALIB_SCOPE_H
void
CalibrationInitScope
(
void
**
samplesRx
,
openair0_device
*
rfdevice
);
#endif
openair1/PHY/TOOLS/calibration_test.c
0 → 100644
View file @
0317d672
This diff is collapsed.
Click to expand it.
openair2/GNB_APP/gnb_paramdef.h
View file @
0317d672
...
...
@@ -324,12 +324,12 @@ typedef enum {
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*--------------------------------------------------------------------------------------------------------------------------------------------------*/
#define GNBNETPARAMS_DESC { \
{GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NG_AMF, NULL, 0, strptr:NULL, defstrval:
NULL
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_NG_AMF, NULL, 0, strptr:NULL, defstrval:
NULL
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NGU, NULL, 0, strptr:NULL, defstrval:
NULL
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU, NULL, 0, strptr:NULL, defstrval:
NULL
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NG_AMF, NULL, 0, strptr:NULL, defstrval:
"lo"
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_NG_AMF, NULL, 0, strptr:NULL, defstrval:
"127.0.0.1"
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NGU, NULL, 0, strptr:NULL, defstrval:
"lo"
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU, NULL, 0, strptr:NULL, defstrval:
"127.0.0.1"
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_GNB_PORT_FOR_NGU, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \
{GNB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:
NULL
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:
"127.0.0.1"
, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0} \
}
...
...
openair2/SIMULATION/NR_RRC/itti_sim.c
View file @
0317d672
...
...
@@ -87,8 +87,6 @@ pthread_mutex_t nfapi_sync_mutex;
int
nfapi_sync_var
=-
1
;
//!< protected by mutex \ref nfapi_sync_mutex
uint8_t
nfapi_mode
=
0
;
// Default to monolithic mode
uint32_t
target_dl_mcs
=
28
;
uint32_t
target_ul_mcs
=
20
;
uint32_t
timing_advance
=
0
;
uint64_t
num_missed_slots
=
0
;
...
...
@@ -120,7 +118,6 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
//Temp fix for inexistent NR upper layer
unsigned
char
NB_gNB_INST
=
1
;
static
char
*
itti_dump_file
=
NULL
;
int
UE_scan
=
1
;
int
UE_scan_carrier
=
0
;
...
...
openair2/UTIL/OCG/OCG.h
View file @
0317d672
...
...
@@ -667,7 +667,6 @@ typedef struct {
unsigned
char
omv_enabled
;
// openair mobility visulizer
unsigned
char
opp_enabled
;
// openair performance profiler
unsigned
char
oeh_enabled
;
// openair event handler, with CLI this could provide a remote event management
char
*
itti_dump_file
;
unsigned
char
vcd_enabled
;
char
*
vcd_file
;
unsigned
char
eMBMS_active_state
;
...
...
targets/ARCH/COMMON/common_lib.h
View file @
0317d672
...
...
@@ -33,6 +33,7 @@
#ifndef COMMON_LIB_H
#define COMMON_LIB_H
#include <stdint.h>
#include <stdio.h>
#include <sys/types.h>
#include <openair1/PHY/TOOLS/tools_defs.h>
#include "record_player.h"
...
...
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