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
c17f65f1
Commit
c17f65f1
authored
Jan 18, 2019
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation, still no attach complete
parent
a57a6287
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
71 deletions
+81
-71
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+26
-18
cmake_targets/build_oai
cmake_targets/build_oai
+14
-14
common/utils/backtrace.h
common/utils/backtrace.h
+7
-0
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+2
-2
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+15
-14
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+1
-0
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+16
-23
No files found.
cmake_targets/CMakeLists.txt
View file @
c17f65f1
...
@@ -252,6 +252,7 @@ add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
...
@@ -252,6 +252,7 @@ add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
add_boolean_option
(
DISABLE_LOG_X False
"Deactivate all LOG_* macros"
)
add_boolean_option
(
DISABLE_LOG_X False
"Deactivate all LOG_* macros"
)
add_boolean_option
(
USRP_REC_PLAY False
"Enable USRP record playback mode"
)
add_boolean_option
(
USRP_REC_PLAY False
"Enable USRP record playback mode"
)
add_boolean_option
(
UE_NAS_USE_TUN False
"Enable UE NAS TUN device instead of ue_ip.ko"
)
add_boolean_option
(
UE_NAS_USE_TUN False
"Enable UE NAS TUN device instead of ue_ip.ko"
)
add_boolean_option
(
NOS1 False
"Allows to run without a EPC"
)
add_boolean_option
(
BASIC_SIMULATOR False
"Has to be True when building the basic simulator, False otherwise"
)
add_boolean_option
(
BASIC_SIMULATOR False
"Has to be True when building the basic simulator, False otherwise"
)
add_boolean_option
(
DEBUG_CONSOLE False
"makes debugging easier, disables stdout/stderr buffering"
)
add_boolean_option
(
DEBUG_CONSOLE False
"makes debugging easier, disables stdout/stderr buffering"
)
...
@@ -618,11 +619,6 @@ add_boolean_option(UE_EXPANSION False "enable UE_EXPANSION w
...
@@ -618,11 +619,6 @@ add_boolean_option(UE_EXPANSION False "enable UE_EXPANSION w
add_boolean_option
(
PHY_TX_THREAD False
"enable UE_EXPANSION with max 256 UE"
)
add_boolean_option
(
PHY_TX_THREAD False
"enable UE_EXPANSION with max 256 UE"
)
add_boolean_option
(
PRE_SCD_THREAD False
"enable UE_EXPANSION with max 256 UE"
)
add_boolean_option
(
PRE_SCD_THREAD False
"enable UE_EXPANSION with max 256 UE"
)
########################
# Include order
##########################
add_boolean_option
(
ENB_MODE True
"Swap the include directories between openair2 and openair3"
)
##########################
##########################
# SCHEDULING/REAL-TIME/PERF options
# SCHEDULING/REAL-TIME/PERF options
##########################
##########################
...
@@ -722,19 +718,13 @@ include_directories("${OPENAIR_BIN_DIR}")
...
@@ -722,19 +718,13 @@ include_directories("${OPENAIR_BIN_DIR}")
#include_directories("${include_dirs_all}")
#include_directories("${include_dirs_all}")
# Legacy exact order
# Legacy exact order
if
(
ENB_MODE
)
include_directories
(
"
${
OPENAIR2_DIR
}
/COMMON"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/COMMON"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/UTIL"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/UTIL"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/UTIL/LOG"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/UTIL/LOG"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/COMMON"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/COMMON"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/UTILS"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/UTILS"
)
else
()
include_directories
(
"
${
OPENAIR3_DIR
}
/COMMON"
)
include_directories
(
"
${
OPENAIR3_DIR
}
/UTILS"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/COMMON"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/UTIL"
)
include_directories
(
"
${
OPENAIR2_DIR
}
/UTIL/LOG"
)
endif
()
include_directories
(
"
${
NFAPI_DIR
}
/nfapi/public_inc"
)
include_directories
(
"
${
NFAPI_DIR
}
/nfapi/public_inc"
)
include_directories
(
"
${
NFAPI_DIR
}
/common/public_inc"
)
include_directories
(
"
${
NFAPI_DIR
}
/common/public_inc"
)
include_directories
(
"
${
NFAPI_DIR
}
/pnf/public_inc"
)
include_directories
(
"
${
NFAPI_DIR
}
/pnf/public_inc"
)
...
@@ -1386,6 +1376,10 @@ add_library(L2_UE
...
@@ -1386,6 +1376,10 @@ add_library(L2_UE
${
L2_SRC_UE
}
${
L2_SRC_UE
}
${
MAC_SRC_UE
}
${
MAC_SRC_UE
}
)
)
if
(
NOT
${
NOS1
}
)
target_compile_definitions
(
L2_UE INTERFACE -DPDCP_USE_NETLINK
)
endif
()
add_dependencies
(
L2_UE rrc_flag s1ap_flag x2_flag
)
add_dependencies
(
L2_UE rrc_flag s1ap_flag x2_flag
)
include_directories
(
${
NFAPI_USER_DIR
}
)
include_directories
(
${
NFAPI_USER_DIR
}
)
...
@@ -2039,6 +2033,9 @@ add_executable(lte-uesoftmodem
...
@@ -2039,6 +2033,9 @@ add_executable(lte-uesoftmodem
)
)
add_dependencies
(
lte-uesoftmodem rrc_flag s1ap_flag x2_flag
)
add_dependencies
(
lte-uesoftmodem rrc_flag s1ap_flag x2_flag
)
if
(
NOT
${
NOS1
}
)
target_compile_definitions
(
lte-uesoftmodem PRIVATE -DPDCP_USE_NETLINK
)
endif
()
target_link_libraries
(
lte-uesoftmodem
target_link_libraries
(
lte-uesoftmodem
-Wl,--start-group
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
...
@@ -2239,6 +2236,16 @@ endif (${T_TRACER})
...
@@ -2239,6 +2236,16 @@ endif (${T_TRACER})
# this is documented as https://www.kernel.org/doc/Documentation/kbuild/modules.txt
# this is documented as https://www.kernel.org/doc/Documentation/kbuild/modules.txt
######################################
######################################
# retrieve the compiler options to send it to gccxml
get_directory_property
(
DirDefs COMPILE_DEFINITIONS
)
foreach
(
d
${
DirDefs
}
)
set
(
module_cc_opt
"
${
module_cc_opt
}
-D
${
d
}
"
)
endforeach
()
get_directory_property
(
DirDefs INCLUDE_DIRECTORIES
)
foreach
(
d
${
DirDefs
}
)
set
(
module_cc_opt
"
${
module_cc_opt
}
-I
${
d
}
"
)
endforeach
()
EXECUTE_PROCESS
(
COMMAND uname -r
EXECUTE_PROCESS
(
COMMAND uname -r
OUTPUT_VARIABLE os_release
OUTPUT_VARIABLE os_release
OUTPUT_STRIP_TRAILING_WHITESPACE
)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
...
@@ -2265,6 +2272,7 @@ endfunction(make_driver name dir src)
...
@@ -2265,6 +2272,7 @@ endfunction(make_driver name dir src)
# nashmesh module
# nashmesh module
################
################
list
(
APPEND nasmesh_src device.c common.c ioctl.c classifier.c tool.c mesh.c
)
list
(
APPEND nasmesh_src device.c common.c ioctl.c classifier.c tool.c mesh.c
)
set
(
module_cc_opt
"
${
module_cc_opt
}
-DNAS_NETLINK -DPDCP_USE_NETLINK"
)
# legacy Makefile was using NAS_NETLINK flag, but other drivers the hereafter flag
# legacy Makefile was using NAS_NETLINK flag, but other drivers the hereafter flag
# so, this cmake use OAI_NW_DRIVER_USE_NETLINK everywhere
# so, this cmake use OAI_NW_DRIVER_USE_NETLINK everywhere
if
(
OAI_NW_DRIVER_USE_NETLINK
)
if
(
OAI_NW_DRIVER_USE_NETLINK
)
...
...
cmake_targets/build_oai
View file @
c17f65f1
...
@@ -51,7 +51,7 @@ CPU_AFFINITY_FLAG_USER="False" #Only valid when lowlatecy flag is set to False
...
@@ -51,7 +51,7 @@ CPU_AFFINITY_FLAG_USER="False" #Only valid when lowlatecy flag is set to False
REL
=
"Rel14"
REL
=
"Rel14"
HW
=
"None"
HW
=
"None"
TP
=
"None"
TP
=
"None"
NOS1
=
0
NOS1
=
"False"
EPC
=
0
EPC
=
0
VERBOSE_COMPILE
=
0
VERBOSE_COMPILE
=
0
CFLAGS_PROCESSOR_USER
=
""
CFLAGS_PROCESSOR_USER
=
""
...
@@ -287,7 +287,7 @@ function main() {
...
@@ -287,7 +287,7 @@ function main() {
echo_info
"Will copy OpenAirInterface files in Linux directories"
echo_info
"Will copy OpenAirInterface files in Linux directories"
shift
;;
shift
;;
--noS1
)
--noS1
)
NOS1
=
1
NOS1
=
"True"
echo_info
"Will compile without S1 interface"
echo_info
"Will compile without S1 interface"
shift
;;
shift
;;
--verbose-compile
)
--verbose-compile
)
...
@@ -493,7 +493,7 @@ function main() {
...
@@ -493,7 +493,7 @@ function main() {
if
[
"
$T_TRACER
"
=
"False"
]
;
then
if
[
"
$T_TRACER
"
=
"False"
]
;
then
noLOGDirsuffix
=
"_noLOG"
noLOGDirsuffix
=
"_noLOG"
fi
fi
if
[
"
$NOS1
"
=
"
1
"
]
;
then
if
[
"
$NOS1
"
=
"
True
"
]
;
then
noS1Dir
=
"_noS1"
noS1Dir
=
"_noS1"
bin_suffix
=
"-nos1"
bin_suffix
=
"-nos1"
else
else
...
@@ -513,7 +513,7 @@ function main() {
...
@@ -513,7 +513,7 @@ function main() {
mkdir
-p
$DIR
/
$lte_build_dir
/build
mkdir
-p
$DIR
/
$lte_build_dir
/build
cmake_file
=
$DIR
/
$lte_build_dir
/CMakeLists.txt
cmake_file
=
$DIR
/
$lte_build_dir
/CMakeLists.txt
echo
"cmake_minimum_required(VERSION 2.8)"
>
$cmake_file
echo
"cmake_minimum_required(VERSION 2.8)"
>
$cmake_file
if
[
"
$NOS1
"
=
"
1
"
]
;
then
if
[
"
$NOS1
"
=
"
True
"
]
;
then
cat
$DIR
/
$lte_build_dir
/CMakeLists.template
>>
$cmake_file
cat
$DIR
/
$lte_build_dir
/CMakeLists.template
>>
$cmake_file
fi
fi
echo
"set ( CMAKE_BUILD_TYPE
$CMAKE_BUILD_TYPE
)"
>>
$cmake_file
echo
"set ( CMAKE_BUILD_TYPE
$CMAKE_BUILD_TYPE
)"
>>
$cmake_file
...
@@ -534,10 +534,8 @@ function main() {
...
@@ -534,10 +534,8 @@ function main() {
echo
"set (UE_TIMING_TRACE
$UE_TIMING_TRACE
)"
>>
$cmake_file
echo
"set (UE_TIMING_TRACE
$UE_TIMING_TRACE
)"
>>
$cmake_file
echo
"set (DISABLE_LOG_X
$DISABLE_LOG_X
)"
>>
$cmake_file
echo
"set (DISABLE_LOG_X
$DISABLE_LOG_X
)"
>>
$cmake_file
echo
"set (USRP_REC_PLAY
$USRP_REC_PLAY
)"
>>
$cmake_file
echo
"set (USRP_REC_PLAY
$USRP_REC_PLAY
)"
>>
$cmake_file
if
[
"
$UE
"
=
1
-a
"
$NOS1
"
=
"0"
]
;
then
echo
"set (UE_NAS_USE_TUN
$UE_NAS_USE_TUN
)"
>>
$cmake_file
echo_info
"Compiling UE S1 build : enabling NETLINK"
echo
"set (NOS1
$NOS1
)"
>>
$cmake_file
echo
"set (PDCP_USE_NETLINK True )"
>>
$cmake_file
fi
echo
'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)'
>>
$cmake_file
echo
'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)'
>>
$cmake_file
cd
$DIR
/
$lte_build_dir
/build
cd
$DIR
/
$lte_build_dir
/build
eval
$CMAKE_CMD
eval
$CMAKE_CMD
...
@@ -557,7 +555,7 @@ function main() {
...
@@ -557,7 +555,7 @@ function main() {
$lte_build_dir
coding
\
$lte_build_dir
coding
\
libcoding.so
$dbin
/libcoding.so
libcoding.so
$dbin
/libcoding.so
if
[
"
$NOS1
"
=
"
1
"
]
;
then
if
[
"
$NOS1
"
=
"
True
"
]
;
then
compilations
\
compilations
\
$lte_build_dir
nasmesh
\
$lte_build_dir
nasmesh
\
CMakeFiles/nasmesh/nasmesh.ko
$dbin
/nasmesh.ko
CMakeFiles/nasmesh/nasmesh.ko
$dbin
/nasmesh.ko
...
@@ -582,7 +580,7 @@ function main() {
...
@@ -582,7 +580,7 @@ function main() {
$lte_build_dir
coding
\
$lte_build_dir
coding
\
libcoding.so
$dbin
/libcoding.so
libcoding.so
$dbin
/libcoding.so
if
[
"
$NOS1
"
=
"
1
"
]
;
then
if
[
"
$NOS1
"
=
"
True
"
]
;
then
compilations
\
compilations
\
$lte_build_dir
nasmesh
\
$lte_build_dir
nasmesh
\
CMakeFiles/nasmesh/nasmesh.ko
$dbin
/nasmesh.ko
CMakeFiles/nasmesh/nasmesh.ko
$dbin
/nasmesh.ko
...
@@ -593,9 +591,11 @@ function main() {
...
@@ -593,9 +591,11 @@ function main() {
else
else
# ue_ip driver compilation
# ue_ip driver compilation
echo_info
"Compiling UE specific part"
echo_info
"Compiling UE specific part"
compilations
\
if
[
"
$UE_NAS_USE_TUN
"
=
"False"
]
;
then
$lte_build_dir
ue_ip
\
compilations
\
CMakeFiles/ue_ip/ue_ip.ko
$dbin
/ue_ip.ko
$lte_build_dir
ue_ip
\
CMakeFiles/ue_ip/ue_ip.ko
$dbin
/ue_ip.ko
fi
# mkdir -p $DIR/at_commands/build
# mkdir -p $DIR/at_commands/build
# cd $DIR/at_commands/build
# cd $DIR/at_commands/build
...
@@ -771,7 +771,7 @@ function main() {
...
@@ -771,7 +771,7 @@ function main() {
fi
fi
# build trasport protocol libraries (currently only ETHERNET is available)
# build tra
n
sport protocol libraries (currently only ETHERNET is available)
if
[
"
$TP
"
!=
"None"
]
;
then
if
[
"
$TP
"
!=
"None"
]
;
then
rm
-f
liboai_transpro.so
rm
-f
liboai_transpro.so
rm
-f
$dbin
/liboai_transpro.so
rm
-f
$dbin
/liboai_transpro.so
...
...
common/utils/backtrace.h
View file @
c17f65f1
...
@@ -23,9 +23,16 @@
...
@@ -23,9 +23,16 @@
#ifndef BACKTRACE_H_
#ifndef BACKTRACE_H_
#define BACKTRACE_H_
#define BACKTRACE_H_
#ifdef __cplusplus
extern
"C"
{
#endif
void
display_backtrace
(
void
);
void
display_backtrace
(
void
);
void
backtrace_handle_signal
(
siginfo_t
*
info
);
void
backtrace_handle_signal
(
siginfo_t
*
info
);
#ifdef __cplusplus
}
#endif
#endif
/* BACKTRACE_H_ */
#endif
/* BACKTRACE_H_ */
openair2/LAYER2/MAC/ue_procedures.c
View file @
c17f65f1
...
@@ -3421,7 +3421,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t
...
@@ -3421,7 +3421,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t
SLSCH_t
*
ue_get_slsch
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
subframeP
)
{
SLSCH_t
*
ue_get_slsch
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
subframeP
)
{
mac_rlc_status_resp_t
rlc_status
;
//, rlc_status_data;
mac_rlc_status_resp_t
rlc_status
=
{
0
}
;
//, rlc_status_data;
uint32_t
absSF
=
(
frameP
*
10
)
+
subframeP
;
uint32_t
absSF
=
(
frameP
*
10
)
+
subframeP
;
UE_MAC_INST
*
ue
=
&
UE_mac_inst
[
module_idP
];
UE_MAC_INST
*
ue
=
&
UE_mac_inst
[
module_idP
];
int
rvtab
[
4
]
=
{
0
,
2
,
3
,
1
};
int
rvtab
[
4
]
=
{
0
,
2
,
3
,
1
};
...
@@ -3461,7 +3461,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
...
@@ -3461,7 +3461,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
(
ue
->
sltx_active
==
1
))
{
// every 4th subframe, check for new data from RLC
(
ue
->
sltx_active
==
1
))
{
// every 4th subframe, check for new data from RLC
// 10 PRBs, mcs 19
// 10 PRBs, mcs 19
int
TBS
=
4584
/
8
;
int
TBS
=
4584
/
8
;
int
req
;
int
req
=
0
;
if
(
TBS
<=
rlc_status
.
bytes_in_buffer
)
req
=
TBS
;
if
(
TBS
<=
rlc_status
.
bytes_in_buffer
)
req
=
TBS
;
...
...
targets/ARCH/COMMON/common_lib.c
View file @
c17f65f1
...
@@ -38,34 +38,35 @@
...
@@ -38,34 +38,35 @@
#include "common_lib.h"
#include "common_lib.h"
#include "common/utils/load_module_shlib.h"
#include "common/utils/load_module_shlib.h"
#include <common/utils/LOG/log.h>
int
set_device
(
openair0_device
*
device
)
{
int
set_device
(
openair0_device
*
device
)
{
switch
(
device
->
type
)
{
switch
(
device
->
type
)
{
case
EXMIMO_DEV
:
case
EXMIMO_DEV
:
printf
(
"[%s] has loaded EXPRESS MIMO device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_I
(
HW
,
"[%s] has loaded EXPRESS MIMO device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
break
;
break
;
case
USRP_B200_DEV
:
case
USRP_B200_DEV
:
printf
(
"[%s] has loaded USRP B200 device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_I
(
HW
,
"[%s] has loaded USRP B200 device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
break
;
break
;
case
USRP_X300_DEV
:
case
USRP_X300_DEV
:
printf
(
"[%s] has loaded USRP X300 device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_I
(
HW
,
"[%s] has loaded USRP X300 device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
break
;
break
;
case
BLADERF_DEV
:
case
BLADERF_DEV
:
printf
(
"[%s] has loaded BLADERF device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_I
(
HW
,
"[%s] has loaded BLADERF device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
break
;
break
;
case
LMSSDR_DEV
:
case
LMSSDR_DEV
:
printf
(
"[%s] has loaded LMSSDR device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_I
(
HW
,
"[%s] has loaded LMSSDR device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
break
;
break
;
case
IRIS_DEV
:
case
IRIS_DEV
:
printf
(
"[%s] has loaded Iris device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_I
(
HW
,
"[%s] has loaded Iris device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
break
;
break
;
case
NONE_DEV
:
case
NONE_DEV
:
printf
(
"[%s] has not loaded a HW device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_W
(
HW
,
"[%s] has not loaded a HW device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
break
;
break
;
default:
default:
printf
(
"[%s] invalid HW device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_E
(
HW
,
"[%s] invalid HW device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
return
-
1
;
return
-
1
;
}
}
return
0
;
return
0
;
...
@@ -76,15 +77,15 @@ int set_transport(openair0_device *device) {
...
@@ -76,15 +77,15 @@ int set_transport(openair0_device *device) {
switch
(
device
->
transp_type
)
{
switch
(
device
->
transp_type
)
{
case
ETHERNET_TP
:
case
ETHERNET_TP
:
printf
(
"[%s] has loaded ETHERNET trasport protocol.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_I
(
HW
,
"[%s] has loaded ETHERNET trasport protocol.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
return
0
;
return
0
;
break
;
break
;
case
NONE_TP
:
case
NONE_TP
:
printf
(
"[%s] has not loaded a transport protocol.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_W
(
HW
,
"[%s] has not loaded a transport protocol.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
return
0
;
return
0
;
break
;
break
;
default:
default:
printf
(
"[%s] invalid transport protocol.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_E
(
HW
,
"[%s] invalid transport protocol.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
return
-
1
;
return
-
1
;
break
;
break
;
}
}
...
@@ -109,7 +110,7 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
...
@@ -109,7 +110,7 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
}
}
ret
=
load_module_shlib
(
libname
,
shlib_fdesc
,
1
,
NULL
);
ret
=
load_module_shlib
(
libname
,
shlib_fdesc
,
1
,
NULL
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
fprintf
(
stderr
,
"Library %s couldn't be loaded
\n
"
,
libname
);
LOG_E
(
HW
,
"Library %s couldn't be loaded
\n
"
,
libname
);
}
else
{
}
else
{
ret
=
((
devfunc_t
)
shlib_fdesc
[
0
].
fptr
)(
device
,
openair0_cfg
,
cfg
);
ret
=
((
devfunc_t
)
shlib_fdesc
[
0
].
fptr
)(
device
,
openair0_cfg
,
cfg
);
}
}
...
@@ -125,7 +126,7 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
...
@@ -125,7 +126,7 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
if
(
rc
>=
0
)
{
if
(
rc
>=
0
)
{
if
(
set_device
(
device
)
<
0
)
{
if
(
set_device
(
device
)
<
0
)
{
fprintf
(
stderr
,
"%s %d:Unsupported radio head
\n
"
,
__FILE__
,
__LINE__
);
LOG_E
(
HW
,
"Unsupported radio head
\n
"
);
return
-
1
;
return
-
1
;
}
}
}
}
...
@@ -137,7 +138,7 @@ int openair0_transport_load(openair0_device *device, openair0_config_t *openair0
...
@@ -137,7 +138,7 @@ int openair0_transport_load(openair0_device *device, openair0_config_t *openair0
rc
=
load_lib
(
device
,
openair0_cfg
,
eth_params
,
RAU_REMOTE_RADIO_HEAD
);
rc
=
load_lib
(
device
,
openair0_cfg
,
eth_params
,
RAU_REMOTE_RADIO_HEAD
);
if
(
rc
>=
0
)
{
if
(
rc
>=
0
)
{
if
(
set_transport
(
device
)
<
0
)
{
if
(
set_transport
(
device
)
<
0
)
{
fprintf
(
stderr
,
"%s %d:Unsupported transport protocol
\n
"
,
__FILE__
,
__LINE__
);
LOG_E
(
HW
,
"Unsupported transport protocol
\n
"
);
return
-
1
;
return
-
1
;
}
}
}
}
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
c17f65f1
...
@@ -720,6 +720,7 @@ void *freq_thread(void *arg) {
...
@@ -720,6 +720,7 @@ void *freq_thread(void *arg) {
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
s
->
usrp
->
set_tx_freq
(
device
->
openair0_cfg
[
0
].
tx_freq
[
0
]);
s
->
usrp
->
set_tx_freq
(
device
->
openair0_cfg
[
0
].
tx_freq
[
0
]);
s
->
usrp
->
set_rx_freq
(
device
->
openair0_cfg
[
0
].
rx_freq
[
0
]);
s
->
usrp
->
set_rx_freq
(
device
->
openair0_cfg
[
0
].
rx_freq
[
0
]);
return
NULL
;
}
}
/*! \brief Set frequencies (TX/RX). Spawns a thread to handle the frequency change to not block the calling thread
/*! \brief Set frequencies (TX/RX). Spawns a thread to handle the frequency change to not block the calling thread
* \param device the hardware to use
* \param device the hardware to use
...
...
targets/RT/USER/lte-ue.c
View file @
c17f65f1
...
@@ -783,18 +783,11 @@ static void *UE_thread_rxn_txnp4(void *arg) {
...
@@ -783,18 +783,11 @@ static void *UE_thread_rxn_txnp4(void *arg) {
threadname
);
threadname
);
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
if
(
pthread_mutex_lock
(
&
proc
->
mutex_rxtx
)
!=
0
)
{
AssertFatal
(
pthread_mutex_lock
(
&
proc
->
mutex_rxtx
)
==
0
,
"[SCHED][UE] error locking mutex for UE RXTX
\n
"
);
LOG_E
(
PHY
,
"[SCHED][UE] error locking mutex for UE RXTX
\n
"
);
while
(
proc
->
instance_cnt_rxtx
<
0
)
exit_fun
(
"nothing to add"
);
}
while
(
proc
->
instance_cnt_rxtx
<
0
)
{
// most of the time, the thread is waiting here
// most of the time, the thread is waiting here
pthread_cond_wait
(
&
proc
->
cond_rxtx
,
&
proc
->
mutex_rxtx
);
pthread_cond_wait
(
&
proc
->
cond_rxtx
,
&
proc
->
mutex_rxtx
);
}
AssertFatal
(
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
)
==
0
,
"[SCHED][UE] error unlocking mutex for UE RXn_TXnp4
\n
"
);
if
(
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
)
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][UE] error unlocking mutex for UE RXn_TXnp4
\n
"
);
exit_fun
(
"nothing to add"
);
}
initRefTimes
(
t2
);
initRefTimes
(
t2
);
initRefTimes
(
t3
);
initRefTimes
(
t3
);
...
@@ -868,18 +861,12 @@ static void *UE_thread_rxn_txnp4(void *arg) {
...
@@ -868,18 +861,12 @@ static void *UE_thread_rxn_txnp4(void *arg) {
phy_procedures_UE_S_TX
(
UE
,
0
,
0
);
phy_procedures_UE_S_TX
(
UE
,
0
,
0
);
updateTimes
(
current
,
&
t3
,
10000
,
"Delay to process sub-frame (case 3)"
);
updateTimes
(
current
,
&
t3
,
10000
,
"Delay to process sub-frame (case 3)"
);
if
(
pthread_mutex_lock
(
&
proc
->
mutex_rxtx
)
!=
0
)
{
AssertFatal
(
pthread_mutex_lock
(
&
proc
->
mutex_rxtx
)
==
0
,
"[SCHED][UE] error locking mutex for UE RXTX
\n
"
);
LOG_E
(
PHY
,
"[SCHED][UE] error locking mutex for UE RXTX
\n
"
);
exit_fun
(
"noting to add"
);
}
proc
->
instance_cnt_rxtx
--
;
proc
->
instance_cnt_rxtx
--
;
#if BASIC_SIMULATOR
#if BASIC_SIMULATOR
if
(
pthread_cond_signal
(
&
proc
->
cond_rxtx
)
!=
0
)
abort
(
);
AssertFatal
(
pthread_cond_signal
(
&
proc
->
cond_rxtx
)
==
0
,
""
);
#endif
#endif
if
(
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
)
!=
0
)
{
AssertFatal
(
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
)
==
0
,
"[SCHED][UE] error unlocking mutex for UE RXTX
\n
"
);
LOG_E
(
PHY
,
"[SCHED][UE] error unlocking mutex for UE RXTX
\n
"
);
exit_fun
(
"noting to add"
);
}
}
}
// thread finished
// thread finished
...
@@ -994,7 +981,6 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
...
@@ -994,7 +981,6 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
}
}
while
(
phy_stub_ticking
->
ticking_var
<
0
)
{
while
(
phy_stub_ticking
->
ticking_var
<
0
)
{
// most of the time, the thread is waiting here
// most of the time, the thread is waiting here
//pthread_cond_wait( &proc->cond_rxtx, &proc->mutex_rxtx )
LOG_D
(
MAC
,
"Waiting for ticking_var
\n
"
);
LOG_D
(
MAC
,
"Waiting for ticking_var
\n
"
);
pthread_cond_wait
(
&
phy_stub_ticking
->
cond_ticking
,
&
phy_stub_ticking
->
mutex_ticking
);
pthread_cond_wait
(
&
phy_stub_ticking
->
cond_ticking
,
&
phy_stub_ticking
->
mutex_ticking
);
}
}
...
@@ -1279,7 +1265,6 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
...
@@ -1279,7 +1265,6 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
}
}
while
(
phy_stub_ticking
->
ticking_var
<
0
)
{
while
(
phy_stub_ticking
->
ticking_var
<
0
)
{
// most of the time, the thread is waiting here
// most of the time, the thread is waiting here
//pthread_cond_wait( &proc->cond_rxtx, &proc->mutex_rxtx )
LOG_D
(
MAC
,
"Waiting for ticking_var
\n
"
);
LOG_D
(
MAC
,
"Waiting for ticking_var
\n
"
);
pthread_cond_wait
(
&
phy_stub_ticking
->
cond_ticking
,
&
phy_stub_ticking
->
mutex_ticking
);
pthread_cond_wait
(
&
phy_stub_ticking
->
cond_ticking
,
&
phy_stub_ticking
->
mutex_ticking
);
}
}
...
@@ -1644,7 +1629,7 @@ void *UE_thread(void *arg) {
...
@@ -1644,7 +1629,7 @@ void *UE_thread(void *arg) {
// compute TO compensation that should be applied for this frame
// compute TO compensation that should be applied for this frame
if
(
UE
->
no_timing_correction
==
0
)
{
if
(
UE
->
no_timing_correction
==
0
)
{
if
(
getenv
(
RFSIMULATOR
)
!=
NULL
&&
UE
->
rx_offset
)
{
if
(
getenv
(
"RFSIMULATOR"
)
!=
NULL
&&
UE
->
rx_offset
)
{
//LOG_E(HW,"in simu, rx_offset is not null (impossible): %d\n", UE->rx_offset);
//LOG_E(HW,"in simu, rx_offset is not null (impossible): %d\n", UE->rx_offset);
UE
->
rx_offset
=
0
;
UE
->
rx_offset
=
0
;
}
}
...
@@ -1719,7 +1704,15 @@ void *UE_thread(void *arg) {
...
@@ -1719,7 +1704,15 @@ void *UE_thread(void *arg) {
proc
->
instance_cnt_rxtx
++
;
proc
->
instance_cnt_rxtx
++
;
LOG_D
(
PHY
,
"[SCHED][UE %d] UE RX instance_cnt_rxtx %d subframe %d !!
\n
"
,
UE
->
Mod_id
,
proc
->
instance_cnt_rxtx
,
proc
->
subframe_rx
);
LOG_D
(
PHY
,
"[SCHED][UE %d] UE RX instance_cnt_rxtx %d subframe %d !!
\n
"
,
UE
->
Mod_id
,
proc
->
instance_cnt_rxtx
,
proc
->
subframe_rx
);
if
(
proc
->
instance_cnt_rxtx
!=
0
)
{
if
(
proc
->
instance_cnt_rxtx
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][UE %d] UE RX thread busy (IC %d)!!
\n
"
,
UE
->
Mod_id
,
proc
->
instance_cnt_rxtx
);
if
(
getenv
(
"RFSIMULATOR"
)
!=
NULL
)
{
do
{
AssertFatal
(
pthread_mutex_unlock
(
&
proc
->
mutex_rxtx
)
==
0
,
""
);
usleep
(
100
);
AssertFatal
(
pthread_mutex_lock
(
&
proc
->
mutex_rxtx
)
==
0
,
""
);
}
while
(
proc
->
instance_cnt_rxtx
>=
0
);
}
else
LOG_E
(
PHY
,
"[SCHED][UE %d] UE RX thread busy (IC %d)!!
\n
"
,
UE
->
Mod_id
,
proc
->
instance_cnt_rxtx
);
if
(
proc
->
instance_cnt_rxtx
>
2
)
if
(
proc
->
instance_cnt_rxtx
>
2
)
exit_fun
(
"instance_cnt_rxtx > 2"
);
exit_fun
(
"instance_cnt_rxtx > 2"
);
}
}
...
...
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