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
wangjie
OpenXG-RAN
Commits
e97122f5
Commit
e97122f5
authored
4 years ago
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added configuration file parsing to oairu
parent
e99ad54b
x2_handle_sctp_shutdown
512-dataplane-bug-in-l2nfapi_nos1
FR2_NSA
NRUE_usedlschparallel
NR_2port_CSIRS
NR_CSIRS_tomerge
NR_F1C_F1U_extensions
NR_RRCReconfiguration_BWP
NR_UE_PUCCH_bugfixes
NR_UE_SA
NR_UE_SSB_meas
NR_UE_reworking_UCI_procedures
NR_gNB_initial_MIB_fix
NR_new_ul_antennaports
NR_phytest_bugfixes
NR_reworking_UL_antennaports
RFquality
Test_SA_5GREC
add-ru-docker-image
avxllr
bandwidth-testing
benetel_dpdk20
bugfix-nr-t-reordering
ci-add-sabox-support
ci-fix-module-ul-iperf
ci_benetel_longrun_limits
ci_fix_iperf_for_module
ci_hotfix_module_ue_ip_address
ci_improve_module_ctl
ci_nsa_2x2_implem
ci_nsa_benetel
ci_nsa_fixes
ci_nsa_pipes_improve
ci_nsa_test_integration_2021_wk19
ci_nsa_traces
ci_nsa_uplink
ci_sa_rfsim_test
ci_test_5GREC
ci_test_nsa_2x2
ci_test_nsa_on_develop
ci_testinfra_as_code
ci_update_build_nasmesh
code-cleanup-20210716
debug-UL-5GRECORDS
debug_UL_signal
develop
develop-NR_SA_F1AP_5GRECORDS
develop-NR_SA_F1AP_5GRECORDS-abs
develop-NR_SA_F1AP_5GRECORDS-hs1
develop-NR_SA_F1AP_5GRECORDS-lts
develop-NR_SA_F1AP_5GRECORDS-lts-wf
develop-NR_SA_F1AP_5GRECORDS_100M
develop-NR_SA_F1AP_5GRECORDS_lfq_0607
develop-NSA_SA_fixes
develop-aw2sori
develop_fpga_ldpc
dongzhanyi-zte-develop1
episys-merge
fedora-gen-kernel-fix
fix-check
fix-compile
fix-lte-ue-modem-in-docker-container
fix-physim-run-script-on-cluster
fix-retransmission-rbg
fix_nr_ulsim
flexran-rtc-repo-is-public
hack-bch-no-sched-sf-0
integration_2021_wk19
integration_2021_wk20_a
integration_2021_wk22
integration_2021_wk23
integration_2021_wk27
integration_2021_wk28
integration_2021_wk30
integration_2021_wk30_b
inter-RRU-oairu
ldpc_offload_t1
migrate-vm-pipeline-to-bionic
nfapi_nr_arch_mod
nr-dl-mimo-2layer
nr-pdcp-small-bugfixes
nr_improve_chanest
nr_ue_remove_high_speed_flag
oairu
oairu-dockerfile-support
phy-asan-fixes
prb_based_dl_channel_estimation
rh_ci_test_rfsim_sa
scs_60_iisc
test-5GREC
test-nsa-benetel
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
158 additions
and
13 deletions
+158
-13
executables/main_ru.c
executables/main_ru.c
+158
-13
No files found.
executables/main_ru.c
View file @
e97122f5
...
...
@@ -82,13 +82,13 @@ void exit_function(const char *file, const char *function, const int line, const
oai_exit
=
1
;
if
(
ru_m
.
rfdevice
.
trx_end_func
)
{
ru_m
.
rfdevice
.
trx_end_func
(
&
ru_m
.
rfdevice
);
ru_m
.
rfdevice
.
trx_end_func
=
NULL
;
ru_m
.
rfdevice
.
trx_end_func
(
&
ru_m
.
rfdevice
);
ru_m
.
rfdevice
.
trx_end_func
=
NULL
;
}
if
(
ru_m
.
ifdevice
.
trx_end_func
)
{
ru_m
.
ifdevice
.
trx_end_func
(
&
ru_m
.
ifdevice
);
ru_m
.
ifdevice
.
trx_end_func
=
NULL
;
ru_m
.
ifdevice
.
trx_end_func
(
&
ru_m
.
ifdevice
);
ru_m
.
ifdevice
.
trx_end_func
=
NULL
;
}
sleep
(
1
);
//allow lte-softmodem threads to exit first
...
...
@@ -162,30 +162,175 @@ int main ( int argc, char **argv )
config_sync_var
=
0
;
// once all RUs are ready intiailize the rest of the eNBs ((dependence on final RU parameters after configuration)
printf
(
"ALL RUs ready - init eNBs
\n
"
);
paramlist_def_t
RUParamList
=
{
CONFIG_STRING_RU_LIST
,
NULL
,
0
};
config_getlist
(
&
RUParamList
,
NULL
,
0
,
NULL
);
AssertFatal
(
RUParamList
.
numelt
==
1
,
"Cannot handle %d RUs, only 1
\n
"
,
RUParamList
.
numelt
);
int
j
=
0
;
ru
->
if_timing
=
synch_to_ext_device
;
ru
->
num_eNB
=
0
;
ru
->
has_ctrl_prt
=
1
;
if
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_SDR_ADDRS
))
{
ru
->
openair0_cfg
.
sdr_addrs
=
strdup
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_ADDRS
].
strptr
));
}
if
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_SDR_CLK_SRC
))
{
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_CLK_SRC
].
strptr
),
"internal"
)
==
0
)
{
ru
->
openair0_cfg
.
clock_source
=
internal
;
LOG_D
(
PHY
,
"RU clock source set as internal
\n
"
);
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_CLK_SRC
].
strptr
),
"external"
)
==
0
)
{
ru
->
openair0_cfg
.
clock_source
=
external
;
LOG_D
(
PHY
,
"RU clock source set as external
\n
"
);
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_CLK_SRC
].
strptr
),
"gpsdo"
)
==
0
)
{
ru
->
openair0_cfg
.
clock_source
=
gpsdo
;
LOG_D
(
PHY
,
"RU clock source set as gpsdo
\n
"
);
}
else
{
LOG_E
(
PHY
,
"Erroneous RU clock source in the provided configuration file: '%s'
\n
"
,
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_CLK_SRC
].
strptr
));
}
}
else
{
ru
->
openair0_cfg
.
clock_source
=
unset
;
}
if
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_SDR_TME_SRC
))
{
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_TME_SRC
].
strptr
),
"internal"
)
==
0
)
{
ru
->
openair0_cfg
.
time_source
=
internal
;
LOG_D
(
PHY
,
"RU time source set as internal
\n
"
);
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_TME_SRC
].
strptr
),
"external"
)
==
0
)
{
ru
->
openair0_cfg
.
time_source
=
external
;
LOG_D
(
PHY
,
"RU time source set as external
\n
"
);
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_TME_SRC
].
strptr
),
"gpsdo"
)
==
0
)
{
ru
->
openair0_cfg
.
time_source
=
gpsdo
;
LOG_D
(
PHY
,
"RU time source set as gpsdo
\n
"
);
}
else
{
LOG_E
(
PHY
,
"Erroneous RU time source in the provided configuration file: '%s'
\n
"
,
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_CLK_SRC
].
strptr
));
}
}
else
{
ru
->
openair0_cfg
.
time_source
=
unset
;
}
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_RF_IDX
].
strptr
),
"yes"
)
==
0
)
{
if
(
!
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_LOCAL_IF_NAME_IDX
))
)
{
AssertFatal
(
1
==
0
,
"IF_NAME is required
\n
"
);
}
else
{
ru
->
eth_params
.
local_if_name
=
strdup
(
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_IF_NAME_IDX
].
strptr
));
ru
->
eth_params
.
my_addr
=
strdup
(
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_ADDRESS_IDX
].
strptr
));
ru
->
eth_params
.
remote_addr
=
strdup
(
*
(
RUParamList
.
paramarray
[
j
][
RU_REMOTE_ADDRESS_IDX
].
strptr
));
ru
->
eth_params
.
my_portd
=
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_PORTD_IDX
].
uptr
);
ru
->
eth_params
.
remote_portd
=
*
(
RUParamList
.
paramarray
[
j
][
RU_REMOTE_PORTD_IDX
].
uptr
);
// Check if control port set
if
(
!
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_REMOTE_PORTC_IDX
))
)
{
printf
(
"Removing control port for RU %d
\n
"
,
j
);
ru
->
has_ctrl_prt
=
0
;
}
else
{
ru
->
eth_params
.
my_portc
=
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_PORTC_IDX
].
uptr
);
ru
->
eth_params
.
remote_portc
=
*
(
RUParamList
.
paramarray
[
j
][
RU_REMOTE_PORTC_IDX
].
uptr
);
printf
(
" Control port %u
\n
"
,
ru
->
eth_params
.
my_portc
);
}
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_TRANSPORT_PREFERENCE_IDX
].
strptr
),
"udp"
)
==
0
)
{
ru
->
if_south
=
LOCAL_RF
;
ru
->
function
=
NGFI_RRU_IF5
;
ru
->
eth_params
.
transp_preference
=
ETH_UDP_MODE
;
printf
(
"Setting function for RU %d to NGFI_RRU_IF5 (udp)
\n
"
,
j
);
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_TRANSPORT_PREFERENCE_IDX
].
strptr
),
"raw"
)
==
0
)
{
ru
->
if_south
=
LOCAL_RF
;
ru
->
function
=
NGFI_RRU_IF5
;
ru
->
eth_params
.
transp_preference
=
ETH_RAW_MODE
;
printf
(
"Setting function for RU %d to NGFI_RRU_IF5 (raw)
\n
"
,
j
);
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_TRANSPORT_PREFERENCE_IDX
].
strptr
),
"udp_if4p5"
)
==
0
)
{
ru
->
if_south
=
LOCAL_RF
;
ru
->
function
=
NGFI_RRU_IF4p5
;
ru
->
eth_params
.
transp_preference
=
ETH_UDP_IF4p5_MODE
;
printf
(
"Setting function for RU %d to NGFI_RRU_IF4p5 (udp)
\n
"
,
j
);
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_TRANSPORT_PREFERENCE_IDX
].
strptr
),
"raw_if4p5"
)
==
0
)
{
ru
->
if_south
=
LOCAL_RF
;
ru
->
function
=
NGFI_RRU_IF4p5
;
ru
->
eth_params
.
transp_preference
=
ETH_RAW_IF4p5_MODE
;
printf
(
"Setting function for RU %d to NGFI_RRU_IF4p5 (raw)
\n
"
,
j
);
}
printf
(
"RU %d is_slave=%s
\n
"
,
j
,
*
(
RUParamList
.
paramarray
[
j
][
RU_IS_SLAVE_IDX
].
strptr
));
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_IS_SLAVE_IDX
].
strptr
),
"yes"
)
==
0
)
ru
->
is_slave
=
1
;
else
ru
->
is_slave
=
0
;
printf
(
"RU %d ota_sync_enabled=%s
\n
"
,
j
,
*
(
RUParamList
.
paramarray
[
j
][
RU_OTA_SYNC_ENABLE_IDX
].
strptr
));
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_OTA_SYNC_ENABLE_IDX
].
strptr
),
"yes"
)
==
0
)
ru
->
ota_sync_enable
=
1
;
else
ru
->
ota_sync_enable
=
0
;
}
ru
->
max_pdschReferenceSignalPower
=
*
(
RUParamList
.
paramarray
[
j
][
RU_MAX_RS_EPRE_IDX
].
uptr
);;
ru
->
max_rxgain
=
*
(
RUParamList
.
paramarray
[
j
][
RU_MAX_RXGAIN_IDX
].
uptr
);
ru
->
num_bands
=
RUParamList
.
paramarray
[
j
][
RU_BAND_LIST_IDX
].
numelt
;
/* sf_extension is in unit of samples for 30.72MHz here, has to be scaled later */
ru
->
sf_extension
=
*
(
RUParamList
.
paramarray
[
j
][
RU_SF_EXTENSION_IDX
].
uptr
);
for
(
int
i
=
0
;
i
<
ru
->
num_bands
;
i
++
)
ru
->
band
[
i
]
=
RUParamList
.
paramarray
[
j
][
RU_BAND_LIST_IDX
].
iptr
[
i
];
}
//strcmp(local_rf, "yes") == 0
else
{
printf
(
"RU %d: Transport %s
\n
"
,
j
,
*
(
RUParamList
.
paramarray
[
j
][
RU_TRANSPORT_PREFERENCE_IDX
].
strptr
));
ru
->
eth_params
.
local_if_name
=
strdup
(
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_IF_NAME_IDX
].
strptr
));
ru
->
eth_params
.
my_addr
=
strdup
(
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_ADDRESS_IDX
].
strptr
));
ru
->
eth_params
.
remote_addr
=
strdup
(
*
(
RUParamList
.
paramarray
[
j
][
RU_REMOTE_ADDRESS_IDX
].
strptr
));
ru
->
eth_params
.
my_portc
=
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_PORTC_IDX
].
uptr
);
ru
->
eth_params
.
remote_portc
=
*
(
RUParamList
.
paramarray
[
j
][
RU_REMOTE_PORTC_IDX
].
uptr
);
ru
->
eth_params
.
my_portd
=
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_PORTD_IDX
].
uptr
);
ru
->
eth_params
.
remote_portd
=
*
(
RUParamList
.
paramarray
[
j
][
RU_REMOTE_PORTD_IDX
].
uptr
);
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_TRANSPORT_PREFERENCE_IDX
].
strptr
),
"udp"
)
==
0
)
{
ru
->
if_south
=
REMOTE_IF5
;
ru
->
function
=
NGFI_RAU_IF5
;
ru
->
eth_params
.
transp_preference
=
ETH_UDP_MODE
;
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_TRANSPORT_PREFERENCE_IDX
].
strptr
),
"raw"
)
==
0
)
{
ru
->
if_south
=
REMOTE_IF5
;
ru
->
function
=
NGFI_RAU_IF5
;
ru
->
eth_params
.
transp_preference
=
ETH_RAW_MODE
;
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_TRANSPORT_PREFERENCE_IDX
].
strptr
),
"udp_if4p5"
)
==
0
)
{
ru
->
if_south
=
REMOTE_IF4p5
;
ru
->
function
=
NGFI_RAU_IF4p5
;
ru
->
eth_params
.
transp_preference
=
ETH_UDP_IF4p5_MODE
;
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_TRANSPORT_PREFERENCE_IDX
].
strptr
),
"raw_if4p5"
)
==
0
)
{
ru
->
if_south
=
REMOTE_IF4p5
;
ru
->
function
=
NGFI_RAU_IF4p5
;
ru
->
eth_params
.
transp_preference
=
ETH_RAW_IF4p5_MODE
;
}
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_IS_SLAVE_IDX
].
strptr
),
"yes"
)
==
0
)
ru
->
is_slave
=
1
;
else
ru
->
is_slave
=
0
;
}
/* strcmp(local_rf, "yes") != 0 */
ru
->
nb_tx
=
*
(
RUParamList
.
paramarray
[
j
][
RU_NB_TX_IDX
].
uptr
);
ru
->
nb_rx
=
*
(
RUParamList
.
paramarray
[
j
][
RU_NB_RX_IDX
].
uptr
);
ru
->
att_tx
=
*
(
RUParamList
.
paramarray
[
j
][
RU_ATT_TX_IDX
].
uptr
);
ru
->
att_rx
=
*
(
RUParamList
.
paramarray
[
j
][
RU_ATT_RX_IDX
].
uptr
);
while
(
oai_exit
==
0
)
sleep
(
1
);
// stop threads
kill_RU_proc
(
ru
);
phy_free_RU
(
ru
);
free_lte_top
();
end_configmodule
();
if
(
ru
->
rfdevice
.
trx_end_func
)
{
ru
->
rfdevice
.
trx_end_func
(
&
ru
->
rfdevice
);
ru
->
rfdevice
.
trx_end_func
=
NULL
;
}
if
(
ru
->
ifdevice
.
trx_end_func
)
{
ru
->
ifdevice
.
trx_end_func
(
&
ru
->
ifdevice
);
ru
->
ifdevice
.
trx_end_func
=
NULL
;
}
logClean
();
printf
(
"Bye.
\n
"
);
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