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
lizhongxiao
OpenXG-RAN
Commits
3f2dd171
Commit
3f2dd171
authored
Jan 13, 2022
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review comments + re-test
parent
d7515686
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
116 additions
and
2269 deletions
+116
-2269
cmake_targets/build_oai
cmake_targets/build_oai
+1
-1
cmake_targets/install_external_packages.ubuntu20
cmake_targets/install_external_packages.ubuntu20
+0
-11
cmake_targets/nas_sim_tools/CMakeLists.txt
cmake_targets/nas_sim_tools/CMakeLists.txt
+1
-0
cmake_targets/tools/build_helper
cmake_targets/tools/build_helper
+1
-1
common/utils/system.c
common/utils/system.c
+1
-1
common/utils/system.h
common/utils/system.h
+3
-4
common/utils/utils.c
common/utils/utils.c
+0
-16
common/utils/utils.h
common/utils/utils.h
+99
-5
executables/main-ocp.c
executables/main-ocp.c
+1
-1
executables/nr-softmodem.c
executables/nr-softmodem.c
+1
-1
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+1
-1
executables/ocp-gnb.c
executables/ocp-gnb.c
+1
-1
openair1/PHY/TOOLS/calibration_test.c
openair1/PHY/TOOLS/calibration_test.c
+1
-1
openair1/PHY/impl_defs_top.h
openair1/PHY/impl_defs_top.h
+1
-46
openair2/COMMON/openair_defs.h
openair2/COMMON/openair_defs.h
+1
-21
openair2/SIMULATION/NR_RRC/itti_sim.c
openair2/SIMULATION/NR_RRC/itti_sim.c
+1
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+1
-1
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+1
-1
targets/build_helper.bash
targets/build_helper.bash
+0
-1315
targets/build_oai.bash
targets/build_oai.bash
+0
-840
No files found.
cmake_targets/build_oai
View file @
3f2dd171
...
...
@@ -707,7 +707,7 @@ function main() {
# generate USIM data
if
[
-f
$dbin
/conf2uedata
]
;
then
install_nas_tools
$conf_nvram_path
$gen_nvram_path
install_nas_tools
$conf_nvram_path
$gen_nvram_path
"
$dlog
/conf2uedata.txt"
echo_info
"Copying UE specific part to
$DIR
/
$build_dir
/build"
cp
-Rvf
$dbin
/.ue_emm.nvram0
$DIR
/
$build_dir
/build
cp
-Rvf
$dbin
/.ue.nvram0
$DIR
/
$build_dir
/build
...
...
cmake_targets/install_external_packages.ubuntu20
View file @
3f2dd171
...
...
@@ -452,17 +452,6 @@ install_asn1c_from_source(){
)
>
"
$asn1_install_log
"
2>&1
}
#################################################
# 2. compile
################################################
install_nas_tools
()
{
echo_success
"generate .ue_emm.nvram .ue.nvram"
./nvram
--gen
-c
"
$1
"
-o
"
$2
"
./usim
--gen
-c
"
$1
"
-o
"
$2
"
}
################################
# set_openair_env
###############################
...
...
cmake_targets/nas_sim_tools/CMakeLists.txt
View file @
3f2dd171
...
...
@@ -15,6 +15,7 @@ set(CMAKE_C_FLAGS
set
(
OPENAIR_DIR $ENV{OPENAIR_DIR}
)
set
(
OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3
)
include_directories
(
${
OPENAIR_DIR
}
/openair2/COMMON
)
include_directories
(
${
OPENAIR_DIR
}
)
set
(
CONF2UEDATA_LIB_SRC
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_emm.c
...
...
cmake_targets/tools/build_helper
View file @
3f2dd171
...
...
@@ -901,7 +901,7 @@ install_nas_tools() {
if [ ! -f .usim.nvram0 ]; then
echo_success "generate .usim.nvram"
./usim --gen -c $1 -o $2
./usim --gen -c $1 -o $2
> "$3"
else
[ ./usim -nt .usim.nvram0 ] && ./usim --gen -c $1 -o $2
fi
...
...
common/utils/system.c
View file @
3f2dd171
...
...
@@ -391,7 +391,7 @@ void thread_top_init(char *thread_name,
// Block CPU C-states deep sleep
void
configure_linux
(
void
)
{
void
set_latency_target
(
void
)
{
int
ret
;
static
int
latency_target_fd
=-
1
;
uint32_t
latency_target_value
=
2
;
// in microseconds
...
...
common/utils/system.h
View file @
3f2dd171
...
...
@@ -43,10 +43,9 @@ int background_system(char *command);
void
start_background_system
(
void
);
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
);
void
threadCreate
(
pthread_t
*
t
,
void
*
(
*
func
)(
void
*
),
void
*
param
,
char
*
name
,
int
affinity
,
int
priority
);
#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)+sched_get_priority_max(SCHED_OAI))/2)
...
...
@@ -65,7 +64,7 @@ void thread_top_init(char *thread_name,
int
checkIfFedoraDistribution
(
void
);
int
checkIfGenericKernelOnFedora
(
void
);
int
checkIfInsideContainer
(
void
);
int
rt_sleep_ns
(
uint64_t
x
);
int
rt_sleep_ns
(
uint64_t
x
);
#ifdef __cplusplus
}
#endif
...
...
common/utils/utils.c
View file @
3f2dd171
...
...
@@ -7,23 +7,7 @@
#include <errno.h>
#include "utils.h"
void
*
calloc_or_fail
(
size_t
size
)
{
void
*
ptr
=
calloc
(
1
,
size
);
if
(
ptr
==
NULL
)
{
fprintf
(
stderr
,
"[UE] Failed to calloc %zu bytes"
,
size
);
exit
(
EXIT_FAILURE
);
}
return
ptr
;
}
void
*
malloc_or_fail
(
size_t
size
)
{
void
*
ptr
=
malloc
(
size
);
if
(
ptr
==
NULL
)
{
fprintf
(
stderr
,
"[UE] Failed to malloc %zu bytes"
,
size
);
exit
(
EXIT_FAILURE
);
}
return
ptr
;
}
const
char
*
hexdump
(
const
void
*
data
,
size_t
data_len
,
char
*
out
,
size_t
out_len
)
{
...
...
common/utils/utils.h
View file @
3f2dd171
#ifndef _UTILS_H
#define _UTILS_H
#include <stdint.h>
#include <sys/types.h>
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <sys/types.h>
#include <common/utils/assertions.h>
#ifdef MALLOC_TRACE
#define malloc myMalloc
#endif
#define sizeofArray(a) (sizeof(a)/sizeof(*(a)))
void
*
calloc_or_fail
(
size_t
size
);
void
*
malloc_or_fail
(
size_t
size
);
const
char
*
hexdump
(
const
void
*
data
,
size_t
data_len
,
char
*
out
,
size_t
out_len
);
#define cmax(a,b) ((a>b) ? (a) : (b))
#define cmax3(a,b,c) ((cmax(a,b)>c) ? (cmax(a,b)) : (c))
#define cmin(a,b) ((a<b) ? (a) : (b))
#ifdef __cplusplus
#ifdef min
#undef min
#undef max
#endif
#else
#define max(a,b) cmax(a,b)
#define min(a,b) cmin(a,b)
#endif
#ifndef malloc16
# ifdef __AVX2__
# define malloc16(x) memalign(32,x+32)
# else
# define malloc16(x) memalign(16,x+16)
# endif
#endif
#define free16(y,x) free(y)
#define bigmalloc malloc
#define bigmalloc16 malloc16
#define openair_free(y,x) free((y))
#define PAGE_SIZE 4096
#define free_and_zero(PtR) do { \
if (PtR) { \
free(PtR); \
PtR = NULL; \
} \
} while (0)
static
inline
void
*
malloc16_clear
(
size_t
size
)
{
#ifdef __AVX2__
void
*
ptr
=
memalign
(
32
,
size
+
32
);
#else
void
*
ptr
=
memalign
(
16
,
size
+
16
);
#endif
DevAssert
(
ptr
);
memset
(
ptr
,
0
,
size
);
return
ptr
;
}
static
inline
void
*
calloc_or_fail
(
size_t
size
)
{
void
*
ptr
=
calloc
(
1
,
size
);
if
(
ptr
==
NULL
)
{
fprintf
(
stderr
,
"[UE] Failed to calloc %zu bytes"
,
size
);
exit
(
EXIT_FAILURE
);
}
return
ptr
;
}
static
inline
void
*
malloc_or_fail
(
size_t
size
)
{
void
*
ptr
=
malloc
(
size
);
if
(
ptr
==
NULL
)
{
fprintf
(
stderr
,
"[UE] Failed to malloc %zu bytes"
,
size
);
exit
(
EXIT_FAILURE
);
}
return
ptr
;
}
#if !defined (msg)
# define msg(aRGS...) LOG_D(PHY, ##aRGS)
#endif
#ifndef malloc16
# ifdef __AVX2__
# define malloc16(x) memalign(32,x)
# else
# define malloc16(x) memalign(16,x)
# endif
#endif
#define free16(y,x) free(y)
#define bigmalloc malloc
#define bigmalloc16 malloc16
#define openair_free(y,x) free((y))
#define PAGE_SIZE 4096
#define PAGE_MASK 0xfffff000
#define virt_to_phys(x) (x)
const
char
*
hexdump
(
const
void
*
data
,
size_t
data_len
,
char
*
out
,
size_t
out_len
);
// Converts an hexadecimal ASCII coded digit into its value. **
int
hex_char_to_hex_value
(
char
c
);
...
...
executables/main-ocp.c
View file @
3f2dd171
...
...
@@ -1150,7 +1150,7 @@ int main ( int argc, char **argv ) {
#if T_TRACER
T_Config_Init
();
#endif
configure_linux
();
set_latency_target
();
set_softmodem_sighandler
();
cpuf
=
get_cpu_freq_GHz
();
set_taus_seed
(
0
);
...
...
executables/nr-softmodem.c
View file @
3f2dd171
...
...
@@ -656,7 +656,7 @@ int main( int argc, char **argv ) {
memset
(
&
openair0_cfg
[
0
],
0
,
sizeof
(
openair0_config_t
)
*
MAX_CARDS
);
memset
(
tx_max_power
,
0
,
sizeof
(
int
)
*
MAX_NUM_CCs
);
logInit
();
configure_linux
();
set_latency_target
();
printf
(
"Reading in command-line options
\n
"
);
get_options
();
...
...
executables/nr-uesoftmodem.c
View file @
3f2dd171
...
...
@@ -523,7 +523,7 @@ int main( int argc, char **argv ) {
// init UE_PF_PO and mutex lock
pthread_mutex_init
(
&
ue_pf_po_mutex
,
NULL
);
memset
(
&
UE_PF_PO
[
0
][
0
],
0
,
sizeof
(
UE_PF_PO_t
)
*
NUMBER_OF_UE_MAX
*
MAX_NUM_CCs
);
configure_linux
();
set_latency_target
();
mlockall
(
MCL_CURRENT
|
MCL_FUTURE
);
if
(
IS_SOFTMODEM_DOSCOPE
)
{
...
...
executables/ocp-gnb.c
View file @
3f2dd171
...
...
@@ -920,7 +920,7 @@ int main( int argc, char **argv ) {
# define PACKAGE_VERSION "UNKNOWN"
#endif
LOG_I
(
HW
,
"Version: %s
\n
"
,
PACKAGE_VERSION
);
configure_linux
();
set_latency_target
();
get_options
();
get_common_options
(
SOFTMODEM_GNB_BIT
);
AssertFatal
(
!
CONFIG_ISFLAGSET
(
CONFIG_ABORT
),
"Getting configuration failed
\n
"
);
...
...
openair1/PHY/TOOLS/calibration_test.c
View file @
3f2dd171
...
...
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
get_common_options
(
SOFTMODEM_GNB_BIT
);
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
CONFIG_CLEARRTFLAG
(
CONFIG_NOEXITONHELP
);
configure_linux
();
set_latency_target
();
int
N_RB
=
50
;
...
...
openair1/PHY/impl_defs_top.h
View file @
3f2dd171
...
...
@@ -107,11 +107,10 @@
* @}
*/
#include <common/utils/utils.h>
#include "defs_eNB.h"
#include "types.h"
/** @addtogroup _PHY_STRUCTURES_
* @{
*/
...
...
@@ -315,50 +314,6 @@ typedef struct {
#include "openairinterface5g_limits.h"
#include "assertions.h"
#define cmax(a,b) ((a>b) ? (a) : (b))
#define cmax3(a,b,c) ((cmax(a,b)>c) ? (cmax(a,b)) : (c))
#define cmin(a,b) ((a<b) ? (a) : (b))
#ifdef __cplusplus
#ifdef min
#undef min
#undef max
#endif
#else
#define max(a,b) cmax(a,b)
#define min(a,b) cmin(a,b)
#endif
#ifndef malloc16
# ifdef __AVX2__
# define malloc16(x) memalign(32,x+32)
# else
# define malloc16(x) memalign(16,x+16)
# endif
#endif
#define free16(y,x) free(y)
#define bigmalloc malloc
#define bigmalloc16 malloc16
#define openair_free(y,x) free((y))
#define PAGE_SIZE 4096
#define free_and_zero(PtR) do { \
if (PtR) { \
free(PtR); \
PtR = NULL; \
} \
} while (0)
static
inline
void
*
malloc16_clear
(
size_t
size
)
{
#ifdef __AVX2__
void
*
ptr
=
memalign
(
32
,
size
+
32
);
#else
void
*
ptr
=
memalign
(
16
,
size
+
16
);
#endif
DevAssert
(
ptr
);
memset
(
ptr
,
0
,
size
);
return
ptr
;
}
#endif //__PHY_IMPLEMENTATION_DEFS_H__
/**@}
*/
openair2/COMMON/openair_defs.h
View file @
3f2dd171
...
...
@@ -24,26 +24,6 @@
#include <stdio.h>
#include <stdlib.h>
#if !defined (msg)
# define msg(aRGS...) LOG_D(PHY, ##aRGS)
#endif
#ifndef malloc16
# ifdef __AVX2__
# define malloc16(x) memalign(32,x)
# else
# define malloc16(x) memalign(16,x)
# endif
#endif
#define free16(y,x) free(y)
#define bigmalloc malloc
#define bigmalloc16 malloc16
#define openair_free(y,x) free((y))
#define PAGE_SIZE 4096
#define PAGE_MASK 0xfffff000
#define virt_to_phys(x) (x)
#define cmax(a,b) ((a>b) ? (a) : (b))
#define cmin(a,b) ((a<b) ? (a) : (b))
#include <common/utils/utils.h>
#endif //
/*__openair_DEFS_H__ */
openair2/SIMULATION/NR_RRC/itti_sim.c
View file @
3f2dd171
...
...
@@ -546,7 +546,7 @@ int main( int argc, char **argv )
#endif
logInit
();
//
configure_linux
();
//
set_latency_target
();
printf
(
"Reading in command-line options
\n
"
);
get_options
();
...
...
targets/RT/USER/lte-softmodem.c
View file @
3f2dd171
...
...
@@ -530,7 +530,7 @@ int main ( int argc, char **argv )
mode
=
normal_txrx
;
logInit
();
configure_linux
();
set_latency_target
();
printf
(
"Reading in command-line options
\n
"
);
get_options
();
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
3f2dd171
...
...
@@ -557,7 +557,7 @@ int main( int argc, char **argv ) {
mode
=
normal_txrx
;
memset
(
&
openair0_cfg
[
0
],
0
,
sizeof
(
openair0_config_t
)
*
MAX_CARDS
);
logInit
();
configure_linux
();
set_latency_target
();
printf
(
"Reading in command-line options
\n
"
);
for
(
int
i
=
0
;
i
<
MAX_NUM_CCs
;
i
++
)
tx_max_power
[
i
]
=
23
;
...
...
targets/build_helper.bash
deleted
100755 → 0
View file @
d7515686
This diff is collapsed.
Click to expand it.
targets/build_oai.bash
deleted
100755 → 0
View file @
d7515686
This diff is collapsed.
Click to expand it.
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