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
90cb9d6c
Commit
90cb9d6c
authored
8 years ago
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding RRU/Fronthaul functionality to oaisim
parent
2045a493
Branches unavailable
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
2024.w23
2024.w22
2024.w21
2024.w18
2024.w17
2024.w16
2024.w15
2024.w14
2024.w13
2024.w12
2024.w11
2024.w10
2024.w09
2024.w08
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
2020.w41
2020.w39
2020.w38
2020.w37
2020.w36
2020.w34
2020.w33
2020.w31
2020.w30
2020.w29
2020.w28
2020.w26
2020.w25
2020.w24
2020.w23
2020.w22
2020.w19
2020.w17
2020.w16
2020.w15
2020.w11
2020.w09
2020.w06
2020.w05
2020.w04
2020.w03
2019.w51
2019.w44
2019.w41
2019.w36
2019.w30
2019.w28
2019.w27
2019.w25
2019.w23
2019.w21
2019.w17
2019.w15
2019.w13
2019.w11
2019.w10
2019.w09
2019.w08
2019.w07
2019.w06
2019.w04
2019.w03
2018.w51
2018.w48
2018.w47
2018.w46
2018.w44
2018.w41
2018.w40
2018.w39
2018.w36
2018.w33
2018.w31
2018.w29
2018.w25
2018.w19
2018.w15
2018.w12
2018.w11
2018.w10
2018.w09
2018.w08
2018.w07
2018.w06
2018.w05
2018.w04
2018.w03
2018.w02
2017.w48
2017.w46
2017.w43
2017.w42
2017.w34
2017.w30
2017.w25
2017.w24
2017.w22
2017.w20
2017.w19
2017.w15
2017.w14
2017.w13
2017.w12
2017.w11
2017.w10
2017.w09
2017.w08
2017.w07
2017.w06
v2.1.0
v2.0.0
v1.2.2
v1.2.1
v1.2.0
v1.1.1
v1.1.0
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v0.6.1
v0.6.1_tdd
v0.6
setparam
osa-etsi-ws-ue
osa-etsi-ws-try2
osa-etsi-ws-try1
osa-etsi-ws-gNB
oai_nr_sync
nr-ip-over-lte
nr-ip-over-lte-v.1.5
nr-ip-over-lte-v.1.4
nr-ip-over-lte-v.1.3
nr-ip-over-lte-v.1.2
nr-ip-over-lte-v.1.1
nr-ip-over-lte-v.1.0
flexran-eol
develop-nr-pdcch
develop-nr-2020w03
develop-nr-2020w02
develop-nr-2019w51
develop-nr-2019w50
develop-nr-2019w48
develop-nr-2019w47
develop-nr-2019w45
develop-nr-2019w43
develop-nr-2019w42
develop-nr-2019w40
develop-nr-2019w28
develop-nr-2019w23
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
ARC_1.3
No related merge requests found
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
183 additions
and
32 deletions
+183
-32
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-1
cmake_targets/build_oai
cmake_targets/build_oai
+11
-2
openair1/PHY/defs.h
openair1/PHY/defs.h
+1
-0
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
+1
-1
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+22
-15
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+2
-2
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+7
-3
targets/SIMU/USER/oaisim.c
targets/SIMU/USER/oaisim.c
+20
-6
targets/SIMU/USER/oaisim_functions.c
targets/SIMU/USER/oaisim_functions.c
+117
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
90cb9d6c
...
...
@@ -1883,6 +1883,7 @@ add_executable(oaisim
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim_functions.c
${
OPENAIR_TARGETS
}
/SIMU/USER/event_handler.c
${
OPENAIR_TARGETS
}
/SIMU/USER/oaisim.c
${
OPENAIR_TARGETS
}
/ARCH/COMMON/common_lib.c
${
OPENAIR2_DIR
}
/RRC/NAS/nas_config.c
${
OPENAIR2_DIR
}
/RRC/NAS/rb_config.c
${
OPENAIR3_DIR
}
/NAS/UE/nas_ue_task.c
...
...
@@ -1897,7 +1898,7 @@ add_executable(oaisim
target_include_directories
(
oaisim PUBLIC
${
OPENAIR_TARGETS
}
/SIMU/USER
)
target_link_libraries
(
oaisim
-Wl,--start-group
-Wl,-
ldl,-
-start-group
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS
${
MSC_LIB
}
L2
${
RAL_LIB
}
LIB_NAS_UE SIMU SIMU_ETH SECU_OSA
${
ITTI_LIB
}
${
MIH_LIB
}
-Wl,--end-group
)
...
...
This diff is collapsed.
Click to expand it.
cmake_targets/build_oai
View file @
90cb9d6c
...
...
@@ -418,9 +418,9 @@ function main() {
if
[
"
$oaisim
"
=
"1"
]
;
then
#to be discussed
# there is no RF device
and no
transport protocol
# there is no RF device transport protocol
HW
=
"None"
TP
=
"
None
"
TP
=
"
ETHERNET
"
if
[
"
$XFORMS
"
==
"True"
]
;
then
PRINT_STATS
=
"True"
...
...
@@ -666,6 +666,15 @@ function main() {
CMakeFiles/oai_nw_drv/oai_nw_drv.ko
$dbin
/oai_nw_drv.ko
fi
if
[
"
$TP
"
==
"ETHERNET"
]
;
then
compilations
\
$oaisim_build_dir
oai_eth_transpro
\
liboai_eth_transpro.so
$dbin
/liboai_eth_transpro.so.
$REL
ln
-s
liboai_eth_transpro.so liboai_transpro.so
ln
-s
$dbin
/liboai_eth_transpro.so.
$REL
$dbin
/liboai_transpro.so
echo_info
"liboai_transpro.so is linked with ETHERNET library"
fi
cmake_file
=
$DIR
/oaisim_mme_build_oai/CMakeLists.txt
cp
$DIR
/oaisim_mme_build_oai/CMakeLists.template
$cmake_file
echo
"set ( CMAKE_BUILD_TYPE
$CMAKE_BUILD_TYPE
)"
>>
$cmake_file
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/defs.h
View file @
90cb9d6c
...
...
@@ -430,6 +430,7 @@ typedef struct PHY_VARS_eNB_s {
eNB_proc_t
proc
;
eNB_func_t
node_function
;
eNB_timing_t
node_timing
;
eth_params_t
*
eth_params
;
int
single_thread_flag
;
openair0_rf_map
rf_map
;
int
abstraction_flag
;
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
View file @
90cb9d6c
...
...
@@ -97,7 +97,7 @@ int trx_eth_start(openair0_device *device) {
if
(
eth_set_dev_conf_udp
(
device
)
!=
0
)
return
-
1
;
}
else
{
if
(
eth_get_dev_conf_udp
(
device
)
!=
0
)
return
-
1
;
}
}
}
/* apply additional configuration */
if
(
ethernet_tune
(
device
,
SND_BUF_SIZE
,
2000000000
)
!=
0
)
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-enb.c
View file @
90cb9d6c
...
...
@@ -130,6 +130,8 @@ extern int sync_var;
extern
int
transmission_mode
;
extern
int
oaisim_flag
;
//pthread_t main_eNB_thread;
time_stats_t
softmodem_stats_mt
;
// main thread
...
...
@@ -1986,6 +1988,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
=
PHY_vars_eNB_g
[
inst
][
CC_id
];
eNB
->
node_function
=
node_function
[
CC_id
];
eNB
->
node_timing
=
node_timing
[
CC_id
];
eNB
->
eth_params
=
eth_params
+
CC_id
;
eNB
->
abstraction_flag
=
0
;
eNB
->
single_thread_flag
=
single_thread_flag
;
eNB
->
ts_offset
=
0
;
...
...
@@ -2011,14 +2014,16 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
->
start_rf
=
start_rf
;
eNB
->
start_if
=
start_if
;
eNB
->
fh_asynch
=
fh_if5_asynch_DL
;
ret
=
openair0_device_load
(
&
eNB
->
rfdevice
,
&
openair0_cfg
[
CC_id
]);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize rf device
\n
"
);
exit
(
-
1
);
}
if
(
oaisim_flag
==
0
)
{
ret
=
openair0_device_load
(
&
eNB
->
rfdevice
,
&
openair0_cfg
[
CC_id
]);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize rf device
\n
"
);
exit
(
-
1
);
}
}
eNB
->
rfdevice
.
host_type
=
RRH_HOST
;
eNB
->
ifdevice
.
host_type
=
RRH_HOST
;
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
(
eth_params
+
CC_id
)
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
@@ -2038,15 +2043,17 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
->
fh_asynch
=
fh_if4p5_asynch_DL
;
eNB
->
start_rf
=
start_rf
;
eNB
->
start_if
=
start_if
;
ret
=
openair0_device_load
(
&
eNB
->
rfdevice
,
&
openair0_cfg
[
CC_id
]);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize rf device
\n
"
);
exit
(
-
1
);
}
if
(
oaisim_flag
==
0
)
{
ret
=
openair0_device_load
(
&
eNB
->
rfdevice
,
&
openair0_cfg
[
CC_id
]);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize rf device
\n
"
);
exit
(
-
1
);
}
}
eNB
->
rfdevice
.
host_type
=
RRH_HOST
;
eNB
->
ifdevice
.
host_type
=
RRH_HOST
;
printf
(
"loading transport interface ...
\n
"
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
(
eth_params
+
CC_id
)
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
@@ -2103,7 +2110,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
->
ifdevice
.
host_type
=
BBU_HOST
;
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
(
eth_params
+
CC_id
)
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
@@ -2125,7 +2132,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
->
fh_asynch
=
(
eNB
->
node_timing
==
synch_to_other
)
?
fh_if4p5_asynch_UL
:
NULL
;
eNB
->
rfdevice
.
host_type
=
BBU_HOST
;
eNB
->
ifdevice
.
host_type
=
BBU_HOST
;
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
(
eth_params
+
CC_id
)
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
@@ -2151,7 +2158,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
->
rfdevice
.
host_type
=
BBU_HOST
;
eNB
->
ifdevice
.
host_type
=
BBU_HOST
;
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
(
eth_params
+
CC_id
)
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-softmodem.c
View file @
90cb9d6c
...
...
@@ -112,7 +112,7 @@ extern int netlink_init(void);
// In lte-enb.c
extern
int
setup_eNB_buffers
(
PHY_VARS_eNB
**
phy_vars_eNB
,
openair0_config_t
*
openair0_cfg
);
extern
void
init_eNB
(
eNB_func_t
*
,
eNB_timing_t
*
,
int
,
eth_params_t
*
,
int
,
int
);
extern
void
init_eNB
(
eNB_func_t
*
,
eNB_timing_t
*
,
int
)
,
eth_params_t
*
,
int
,
int
);
extern
void
stop_eNB
(
int
);
extern
void
kill_eNB_proc
(
void
);
...
...
@@ -285,7 +285,7 @@ double cpuf;
char
uecap_xer
[
1024
],
uecap_xer_in
=
0
;
int
oaisim_flag
=
0
;
/*---------------------BMC: timespec helpers -----------------------------*/
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
90cb9d6c
...
...
@@ -110,6 +110,8 @@ extern int rx_input_level_dBm;
extern
uint8_t
exit_missed_slots
;
extern
uint64_t
num_missed_slots
;
// counter for the number of missed slots
extern
int
oaisim_flag
;
extern
void
exit_fun
(
const
char
*
s
);
#define KHz (1000UL)
...
...
@@ -180,9 +182,11 @@ void init_UE(int nb_inst) {
sleep
(
1
);
UE
=
PHY_vars_UE_g
[
inst
][
0
];
ret
=
openair0_device_load
(
&
(
UE
->
rfdevice
),
&
openair0_cfg
[
0
]);
if
(
ret
!=
0
){
exit_fun
(
"Error loading device library"
);
if
(
oaisim_flag
==
0
)
{
ret
=
openair0_device_load
(
&
(
UE
->
rfdevice
),
&
openair0_cfg
[
0
]);
if
(
ret
!=
0
){
exit_fun
(
"Error loading device library"
);
}
}
UE
->
rfdevice
.
host_type
=
BBU_HOST
;
// UE->rfdevice.type = NONE_DEV;
...
...
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/oaisim.c
View file @
90cb9d6c
...
...
@@ -1286,7 +1286,25 @@ main (int argc, char **argv)
init_openair2
();
init_openair0
();
init_ocm
();
#if defined(ENABLE_ITTI)
// Handle signals until all tasks are terminated
// Note: Cannot handle both RRU/RAU and eNB at the same time, if the first "eNB" is an RRU/RAU, no NAS
if
(
oai_emulation
.
info
.
node_function
[
0
]
<
NGFI_RAU_IF4p5
)
{
if
(
create_tasks
(
oai_emulation
.
info
.
nb_enb_local
,
oai_emulation
.
info
.
nb_ue_local
)
<
0
)
exit
(
-
1
);
// need a softer mode
}
else
{
if
(
create_tasks
(
0
,
oai_emulation
.
info
.
nb_ue_local
)
<
0
)
exit
(
-
1
);
// need a softer mode
}
#endif
// wait for all threads to startup
sleep
(
3
);
...
...
@@ -1327,12 +1345,8 @@ main (int argc, char **argv)
#if defined(ENABLE_ITTI)
// Handle signals until all tasks are terminated
if
(
create_tasks
(
oai_emulation
.
info
.
nb_enb_local
,
oai_emulation
.
info
.
nb_ue_local
)
>=
0
)
{
itti_wait_tasks_end
();
}
else
{
exit
(
-
1
);
// need a softer mode
}
itti_wait_tasks_end
();
#else
...
...
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/oaisim_functions.c
View file @
90cb9d6c
...
...
@@ -77,6 +77,9 @@
# include "s1ap_eNB.h"
#endif
#include "../../ARCH/COMMON/common_lib.h"
#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
#ifdef SMBV
extern
uint8_t
config_smbv
;
extern
char
smbv_ip
[
16
];
...
...
@@ -88,6 +91,8 @@ extern char smbv_ip[16];
#define K 2 // averaging coefficient
#define TARGET_SF_TIME_NS 1000000 // 1ms = 1000000 ns
#define min(a,b) ((a)<(b)?(a):(b))
int
otg_times
=
0
;
int
if_times
=
0
;
int
for_times
=
0
;
...
...
@@ -170,11 +175,14 @@ extern int xforms;
extern
uint32_t
downlink_frequency
[
MAX_NUM_CCs
][
4
];
extern
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
void
init_eNB
(
eNB_func_t
node_function
[],
eNB_timing_t
node_timing
[],
int
nb_inst
);
eth_params_t
*
eth_params
;
void
init_eNB
(
eNB_func_t
node_function
[],
eNB_timing_t
node_timing
[],
int
nb_inst
,
eth_params_t
*
,
int
,
int
);
void
stop_eNB
(
int
nb_inst
);
const
Enb_properties_array_t
*
enb_properties
;
int
oaisim_flag
=
1
;
void
get_simulation_options
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -786,7 +794,33 @@ void get_simulation_options(int argc, char *argv[])
AssertFatal
(
oai_emulation
.
info
.
nb_enb_local
<=
enb_properties
->
number
,
"Number of eNB is greater than eNB defined in configuration file %s (%d/%d)!"
,
conf_config_file_name
,
oai_emulation
.
info
.
nb_enb_local
,
enb_properties
->
number
);
eth_params
=
(
eth_params_t
*
)
malloc
(
enb_properties
->
properties
[
0
]
->
nb_rrh_gw
*
sizeof
(
eth_params_t
));
memset
(
eth_params
,
0
,
enb_properties
->
properties
[
0
]
->
nb_rrh_gw
*
sizeof
(
eth_params_t
));
for
(
int
j
=
0
;
j
<
enb_properties
->
properties
[
0
]
->
nb_rrh_gw
;
j
++
)
{
if
(
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
active
==
1
)
{
// local_remote_radio = BBU_REMOTE_RADIO_HEAD;
(
eth_params
+
j
)
->
local_if_name
=
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
rrh_gw_if_name
;
(
eth_params
+
j
)
->
my_addr
=
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
local_address
;
(
eth_params
+
j
)
->
my_port
=
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
local_port
;
(
eth_params
+
j
)
->
remote_addr
=
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
remote_address
;
(
eth_params
+
j
)
->
remote_port
=
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
remote_port
;
if
(
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
raw
==
1
)
{
(
eth_params
+
j
)
->
transp_preference
=
ETH_RAW_MODE
;
}
else
if
(
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
rawif4p5
==
1
)
{
(
eth_params
+
j
)
->
transp_preference
=
ETH_RAW_IF4p5_MODE
;
}
else
if
(
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
udpif4p5
==
1
)
{
(
eth_params
+
j
)
->
transp_preference
=
ETH_UDP_IF4p5_MODE
;
}
else
if
(
enb_properties
->
properties
[
0
]
->
rrh_gw_config
[
j
].
rawif5_mobipass
==
1
)
{
(
eth_params
+
j
)
->
transp_preference
=
ETH_RAW_IF5_MOBIPASS
;
}
else
{
(
eth_params
+
j
)
->
transp_preference
=
ETH_UDP_MODE
;
}
}
}
/* Update some simulation parameters */
oai_emulation
.
info
.
frame_type
[
0
]
=
enb_properties
->
properties
[
0
]
->
frame_type
[
0
];
oai_emulation
.
info
.
tdd_config
[
0
]
=
enb_properties
->
properties
[
0
]
->
tdd_config
[
0
];
...
...
@@ -1126,6 +1160,85 @@ int UE_trx_write(openair0_device *device,openair0_timestamp timestamp, void **bu
return
(
nsamps
);
}
void
init_openair0
(
void
);
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
void
init_openair0
()
{
int
card
;
int
i
;
for
(
card
=
0
;
card
<
MAX_CARDS
;
card
++
)
{
openair0_cfg
[
card
].
configFilename
=
NULL
;
if
(
frame_parms
[
0
]
->
N_RB_DL
==
100
)
{
if
(
frame_parms
[
0
]
->
threequarter_fs
)
{
openair0_cfg
[
card
].
sample_rate
=
23.04e6
;
openair0_cfg
[
card
].
samples_per_frame
=
230400
;
openair0_cfg
[
card
].
tx_bw
=
10e6
;
openair0_cfg
[
card
].
rx_bw
=
10e6
;
}
else
{
openair0_cfg
[
card
].
sample_rate
=
30.72e6
;
openair0_cfg
[
card
].
samples_per_frame
=
307200
;
openair0_cfg
[
card
].
tx_bw
=
10e6
;
openair0_cfg
[
card
].
rx_bw
=
10e6
;
}
}
else
if
(
frame_parms
[
0
]
->
N_RB_DL
==
50
)
{
openair0_cfg
[
card
].
sample_rate
=
15.36e6
;
openair0_cfg
[
card
].
samples_per_frame
=
153600
;
openair0_cfg
[
card
].
tx_bw
=
5e6
;
openair0_cfg
[
card
].
rx_bw
=
5e6
;
}
else
if
(
frame_parms
[
0
]
->
N_RB_DL
==
25
)
{
openair0_cfg
[
card
].
sample_rate
=
7.68e6
;
openair0_cfg
[
card
].
samples_per_frame
=
76800
;
openair0_cfg
[
card
].
tx_bw
=
2.5e6
;
openair0_cfg
[
card
].
rx_bw
=
2.5e6
;
}
else
if
(
frame_parms
[
0
]
->
N_RB_DL
==
6
)
{
openair0_cfg
[
card
].
sample_rate
=
1.92e6
;
openair0_cfg
[
card
].
samples_per_frame
=
19200
;
openair0_cfg
[
card
].
tx_bw
=
1.5e6
;
openair0_cfg
[
card
].
rx_bw
=
1.5e6
;
}
if
(
frame_parms
[
0
]
->
frame_type
==
TDD
)
openair0_cfg
[
card
].
duplex_mode
=
duplex_mode_TDD
;
else
//FDD
openair0_cfg
[
card
].
duplex_mode
=
duplex_mode_FDD
;
openair0_cfg
[
card
].
remote_addr
=
(
eth_params
+
card
)
->
remote_addr
;
openair0_cfg
[
card
].
remote_port
=
(
eth_params
+
card
)
->
remote_port
;
openair0_cfg
[
card
].
my_addr
=
(
eth_params
+
card
)
->
my_addr
;
openair0_cfg
[
card
].
my_port
=
(
eth_params
+
card
)
->
my_port
;
printf
(
"HW: Configuring card %d, nb_antennas_tx/rx %d/%d
\n
"
,
card
,
PHY_vars_eNB_g
[
0
][
0
]
->
frame_parms
.
nb_antennas_tx
,
PHY_vars_eNB_g
[
0
][
0
]
->
frame_parms
.
nb_antennas_rx
);
openair0_cfg
[
card
].
Mod_id
=
0
;
openair0_cfg
[
card
].
num_rb_dl
=
frame_parms
[
0
]
->
N_RB_DL
;
openair0_cfg
[
card
].
tx_num_channels
=
min
(
2
,
PHY_vars_eNB_g
[
0
][
0
]
->
frame_parms
.
nb_antennas_tx
);
openair0_cfg
[
card
].
rx_num_channels
=
min
(
2
,
PHY_vars_eNB_g
[
0
][
0
]
->
frame_parms
.
nb_antennas_rx
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
openair0_cfg
[
card
].
rx_gain
[
i
]
=
PHY_vars_eNB_g
[
0
][
0
]
->
rx_total_gain_dB
;
printf
(
"Card %d, channel %d, Setting tx_gain %f, rx_gain %f, tx_freq %f, rx_freq %f
\n
"
,
card
,
i
,
openair0_cfg
[
card
].
tx_gain
[
i
],
openair0_cfg
[
card
].
rx_gain
[
i
],
openair0_cfg
[
card
].
tx_freq
[
i
],
openair0_cfg
[
card
].
rx_freq
[
i
]);
}
}
}
void
init_devices
(
void
){
module_id_t
UE_id
,
eNB_id
;
...
...
@@ -1270,7 +1383,7 @@ void init_openair1(void)
init_devices
();
init_eNB
(
oai_emulation
.
info
.
node_function
,
oai_emulation
.
info
.
node_timing
,
NB_eNB_INST
);
init_eNB
(
oai_emulation
.
info
.
node_function
,
oai_emulation
.
info
.
node_timing
,
NB_eNB_INST
,
eth_params
,
1
,
0
);
// init_ue_status();
for
(
UE_id
=
0
;
UE_id
<
NB_UE_INST
;
UE_id
++
)
{
...
...
@@ -1820,6 +1933,7 @@ void init_time()
td_avg
=
TARGET_SF_TIME_NS
;
}
/*
int openair0_transport_load(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * eth_params) {
return(0);
...
...
@@ -1831,3 +1945,4 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
return(0);
}
*/
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