Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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 UE
Commits
7748b1bf
Commit
7748b1bf
authored
Jun 18, 2020
by
magounak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing of standlone oairu
parent
96ba7153
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
21 deletions
+28
-21
executables/main_ru.c
executables/main_ru.c
+18
-12
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+6
-4
targets/RT/USER/ru_control.c
targets/RT/USER/ru_control.c
+4
-5
No files found.
executables/main_ru.c
View file @
7748b1bf
...
...
@@ -76,7 +76,6 @@ uint16_t sf_ahead = 4;
RU_t
ru_m
;
static
int
DEFBANDS
[]
=
{
7
};
void
init_RU0
(
RU_t
*
ru
,
int
ru_id
,
char
*
rf_config_file
,
int
send_dmrssync
);
...
...
@@ -163,16 +162,6 @@ int main ( int argc, char **argv )
RU_t
*
ru
=&
ru_m
;
init_RU0
(
ru
,
0
,
get_softmodem_params
()
->
rf_config_file
,
get_softmodem_params
()
->
send_dmrs_sync
);
ru
->
rf_map
.
card
=
0
;
ru
->
rf_map
.
chain
=
(
get_softmodem_params
()
->
chain_offset
);
LOG_I
(
PHY
,
"Initializing RRU descriptor %d : (%s,%s,%d)
\n
"
,
ru_id
,
ru_if_types
[
ru
->
if_south
],
NB_timing
[
ru
->
if_timing
],
ru
->
function
);
set_function_spec_param
(
ru
);
LOG_I
(
PHY
,
"Starting ru_thread %d, is_slave %d, send_dmrs %d
\n
"
,
ru_id
,
ru
->
is_slave
,
ru
->
generate_dmrs_sync
);
init_RU_proc
(
ru
);
config_sync_var
=
0
;
paramdef_t
RUParams
[]
=
RUPARAMS_DESC
;
paramlist_def_t
RUParamList
=
{
CONFIG_STRING_RU_LIST
,
NULL
,
0
};
...
...
@@ -323,7 +312,24 @@ int main ( int argc, char **argv )
mlockall
(
MCL_CURRENT
|
MCL_FUTURE
);
pthread_cond_init
(
&
sync_cond
,
NULL
);
pthread_mutex_init
(
&
sync_mutex
,
NULL
);
init_RU0
(
ru
,
0
,
get_softmodem_params
()
->
rf_config_file
,
get_softmodem_params
()
->
send_dmrs_sync
);
ru
->
rf_map
.
card
=
0
;
ru
->
rf_map
.
chain
=
(
get_softmodem_params
()
->
chain_offset
);
LOG_I
(
PHY
,
"Initializing RRU descriptor : (%s,%s,%d)
\n
"
,
ru_if_types
[
ru
->
if_south
],
NB_timing
[
ru
->
if_timing
],
ru
->
function
);
set_function_spec_param
(
ru
);
LOG_I
(
PHY
,
"Starting ru_thread , is_slave %d, send_dmrs %d
\n
"
,
ru
->
is_slave
,
ru
->
generate_dmrs_sync
);
init_RU_proc
(
ru
);
config_sync_var
=
0
;
pthread_mutex_lock
(
&
sync_mutex
);
sync_var
=
0
;
pthread_cond_broadcast
(
&
sync_cond
);
pthread_mutex_unlock
(
&
sync_mutex
);
while
(
oai_exit
==
0
)
sleep
(
1
);
// stop threads
...
...
targets/RT/USER/lte-ru.c
View file @
7748b1bf
...
...
@@ -534,7 +534,7 @@ void fh_if4p5_north_asynch_in(RU_t *ru,
LOG_D
(
PHY
,
"RU %d/%d TST %llu, frame %d, subframe %d
\n
"
,
ru
->
idx
,
0
,(
long
long
unsigned
int
)
proc
->
timestamp_tx
,
frame_tx
,
tti_tx
);
// dump VCD output for first RU in list
if
(
ru
==
RC
.
ru
[
0
]
)
{
if
(
ru
->
idx
==
0
)
{
/*VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame_tx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, tti_tx );*/
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_NORTH_ASYNCH_IN
,
frame_tx
);
...
...
@@ -730,7 +730,7 @@ void rx_rf(RU_t *ru,
proc
->
tti_rx
);
// dump VCD output for first RU in list
if
(
ru
==
RC
.
ru
[
0
]
)
{
if
(
ru
->
idx
==
0
)
{
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU
,
proc
->
frame_rx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU
,
proc
->
tti_rx
);
...
...
@@ -1731,8 +1731,10 @@ static void *ru_thread( void *param ) {
// wait to be woken up
if
(
ru
->
function
!=
eNodeB_3GPP
&&
ru
->
has_ctrl_prt
==
1
)
{
LOG_I
(
PHY
,
"Waiting for control thread to say go
\n
"
);
if
(
wait_on_condition
(
&
ru
->
proc
.
mutex_ru
,
&
ru
->
proc
.
cond_ru_thread
,
&
ru
->
proc
.
instance_cnt_ru
,
"ru_thread"
)
<
0
)
break
;
}
else
wait_sync
(
"ru_thread"
);
}
else
wait_sync
(
"ru_thread"
);
LOG_I
(
PHY
,
"Got start from control thread
\n
"
);
if
(
!
(
get_softmodem_params
()
->
emulate_rf
))
{
if
(
ru
->
is_slave
==
0
)
AssertFatal
(
ru
->
state
==
RU_RUN
,
"ru-%d state = %s != RU_RUN
\n
"
,
ru
->
idx
,
ru_states
[
ru
->
state
]);
...
...
@@ -1760,7 +1762,7 @@ static void *ru_thread( void *param ) {
// if this is a slave RRU, try to synchronize on the DL frequency
if
((
ru
->
is_slave
==
1
)
&&
(
ru
->
if_south
==
LOCAL_RF
))
do_ru_synch
(
ru
);
LOG_
D
(
PHY
,
"Starting steady-state operation
\n
"
);
LOG_
I
(
PHY
,
"Starting steady-state operation
\n
"
);
// This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
while
(
ru
->
state
==
RU_RUN
||
ru
->
state
==
RU_CHECK_SYNC
)
{
...
...
targets/RT/USER/ru_control.c
View file @
7748b1bf
...
...
@@ -84,7 +84,7 @@
int
attach_rru
(
RU_t
*
ru
);
void
configure_ru
(
int
idx
,
void
*
arg
);
void
configure_rru
(
int
idx
,
void
*
arg
);
void
configure_rru
(
RU_t
*
ru
,
void
*
arg
);
void
fill_rf_config
(
RU_t
*
ru
,
char
*
rf_config_file
);
void
*
ru_thread_control
(
void
*
param
);
...
...
@@ -335,7 +335,7 @@ int connect_rau(RU_t *ru)
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
prach_FreqOffset
[
0
],
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
prach_ConfigIndex
[
0
]);
configure_rru
(
ru
->
idx
,
configure_rru
(
ru
,
(
void
*
)
&
rru_config_msg
.
msg
[
0
]);
configuration_received
=
1
;
}
...
...
@@ -440,11 +440,10 @@ void configure_ru(int idx,
phy_init_RU
(
ru
);
}
void
configure_rru
(
int
idx
,
void
configure_rru
(
RU_t
*
ru
,
void
*
arg
)
{
RRU_config_t
*
config
=
(
RRU_config_t
*
)
arg
;
RU_t
*
ru
=
RC
.
ru
[
idx
];
ru
->
frame_parms
->
eutra_band
=
config
->
band_list
[
0
];
ru
->
frame_parms
->
dl_CarrierFreq
=
config
->
tx_freq
[
0
];
...
...
@@ -603,7 +602,7 @@ void* ru_thread_control( void* param )
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
prach_ConfigIndex
[
0
]);
ru
->
frame_parms
=
calloc
(
1
,
sizeof
(
*
ru
->
frame_parms
));
configure_rru
(
ru
->
idx
,
(
void
*
)
&
rru_config_msg
.
msg
[
0
]);
configure_rru
(
ru
,
(
void
*
)
&
rru_config_msg
.
msg
[
0
]);
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
...
...
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