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
canghaiwuhen
OpenXG-RAN
Commits
e57ecfb7
Commit
e57ecfb7
authored
Mar 03, 2018
by
Younes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifications for RU synch
parent
b68e7d76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+1
-2
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+12
-11
No files found.
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
e57ecfb7
...
...
@@ -327,8 +327,7 @@ static int trx_usrp_start(openair0_device *device) {
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"CTRL"
,
0x7f
,
0x7f
);
//set ATR register
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"ATR_RX"
,
1
<<
4
,
0x7f
);
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"ATR_RX"
,
1
<<
6
,
0x7f
);
s
->
usrp
->
set_gpio_attr
(
"FP0"
,
"ATR_RX"
,
(
1
<<
4
)
|
(
1
<<
6
),
0x7f
);
// init recv and send streaming
uhd
::
stream_cmd_t
cmd
(
uhd
::
stream_cmd_t
::
STREAM_MODE_START_CONTINUOUS
);
...
...
targets/RT/USER/lte-ru.c
View file @
e57ecfb7
...
...
@@ -1177,6 +1177,7 @@ void do_ru_synch(RU_t *ru) {
int32_t
dummy_rx
[
ru
->
nb_rx
][
fp
->
samples_per_tti
]
__attribute__
((
aligned
(
32
)));
int
rxs
;
int
ic
;
RRU_CONFIG_msg_t
rru_config_msg
;
// initialize the synchronization buffer to the common_vars.rxdata
for
(
int
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
...
...
@@ -1237,6 +1238,14 @@ void do_ru_synch(RU_t *ru) {
ru->rfdevice.trx_set_freq_func(&ru->rfdevice,ru->rfdevice.openair0_cfg,0);
*/
ru
->
state
=
RU_RUN
;
// Send RRU_sync_ok
rru_config_msg
.
type
=
RRU_sync_ok
;
rru_config_msg
.
len
=
sizeof
(
RRU_CONFIG_msg_t
);
// TODO: set to correct msg len
LOG_I
(
PHY
,
"Sending RRU_sync_ok to RAU
\n
"
,
ru
->
idx
);
AssertFatal
((
ru
->
ifdevice
.
trx_ctlsend_func
(
&
ru
->
ifdevice
,
&
rru_config_msg
,
rru_config_msg
.
len
)
!=-
1
),
"Failed to send msg to RAU %d
\n
"
,
ru
->
idx
);
LOG_I
(
PHY
,
"Exiting synch routine
\n
"
);
}
...
...
@@ -1858,9 +1867,9 @@ static void* ru_thread( void* param ) {
}
old_time
=
time_rf
.
tv_nsec
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
time_rf
);
if
((
time_rf
.
tv_nsec
>
old_time
+
1200000
)
||
(
time_rf
.
tv_nsec
<
old_time
+
500000
))
LOG_I
(
PHY
,
"RU thread %d, frame %d (%p), subframe %d : RF time difference : %lu
\n
"
,
ru
->
idx
,
frame
,
&
frame
,
subframe
,
time_rf
.
tv_nsec
-
old_time
);
//
if ((time_rf.tv_nsec > old_time + 1200000) || (time_rf.tv_nsec < old_time + 500000))
//
LOG_I(PHY,"RU thread %d, frame %d (%p), subframe %d : RF time difference : %lu\n",
//
ru->idx, frame,&frame,subframe,time_rf.tv_nsec - old_time);
if
(
ru
->
fh_south_in
&&
ru
->
state
==
RU_RUN
)
ru
->
fh_south_in
(
ru
,
&
frame
,
&
subframe
);
else
AssertFatal
(
1
==
0
,
"No fronthaul interface at south port"
);
...
...
@@ -1924,7 +1933,6 @@ void *ru_thread_synch(void *arg) {
uint32_t
sync_corr
[
307200
]
__attribute__
((
aligned
(
32
)));
static
int
ru_thread_synch_status
=
0
;
int
cnt
=
0
;
RRU_CONFIG_msg_t
rru_config_msg
;
thread_top_init
(
"ru_thread_synch"
,
0
,
5000000
,
10000000
,
10000000
);
...
...
@@ -1985,13 +1993,6 @@ void *ru_thread_synch(void *arg) {
}
*/
ru
->
in_synch
=
1
;
ru
->
state
=
RU_RUN
;
// Send RRU_sync_ok
rru_config_msg
.
type
=
RRU_sync_ok
;
rru_config_msg
.
len
=
sizeof
(
RRU_CONFIG_msg_t
);
// TODO: set to correct msg len
LOG_I
(
PHY
,
"Sending RRU_sync_ok to RAU
\n
"
,
ru
->
idx
);
AssertFatal
((
ru
->
ifdevice
.
trx_ctlsend_func
(
&
ru
->
ifdevice
,
&
rru_config_msg
,
rru_config_msg
.
len
)
!=-
1
),
"Failed to send msg to RAU %d
\n
"
,
ru
->
idx
);
}
// symc_pos > 0
else
{
...
...
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