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
ebb53665
Commit
ebb53665
authored
Dec 20, 2017
by
khadraou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dealing with sync
parent
efabb8b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
22 deletions
+30
-22
openair1/PHY/defs.h
openair1/PHY/defs.h
+6
-5
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+24
-17
No files found.
openair1/PHY/defs.h
View file @
ebb53665
...
...
@@ -670,11 +670,12 @@ typedef enum {
}
RU_if_south_t
;
typedef
enum
{
RU_IDLE
=
0
,
RU_CONFIG
=
1
,
RU_READY
=
2
,
RU_RUN
=
3
,
RU_ERROR
=
4
RU_IDLE
=
0
,
RU_CONFIG
=
1
,
RU_READY
=
2
,
RU_RUN
=
3
,
RU_ERROR
=
4
,
RU_SYNC
=
5
}
rru_state_t
;
typedef
struct
RU_t_s
{
...
...
targets/RT/USER/lte-ru.c
View file @
ebb53665
...
...
@@ -1210,6 +1210,10 @@ void wakeup_eNBs(RU_t *ru) {
pthread_mutex_lock
(
&
proc
->
mutex_RU
);
for
(
i
=
0
;
i
<
eNB
->
num_RU
;
i
++
)
{
if
(
ru
->
state
==
RU_SYNC
){
proc
->
RU_mask
|=
(
1
<<
i
);
break
;
}
if
(
ru
==
eNB
->
RU_list
[
i
])
{
//AssertFatal(((proc->RU_mask&(1<<i)) == 0) ,
if
((
proc
->
RU_mask
&
(
1
<<
i
))
>
0
)
...
...
@@ -1582,7 +1586,8 @@ static void* ru_thread_control( void* param ) {
exit
(
-
1
);
}
ru
->
state
=
RU_RUN
;
// Set state to RUN for Master RU, Others on SYNC
ru
->
state
=
(
ru
->
is_slave
==
1
)
?
RU_SYNC
:
RU_RUN
;
LOG_I
(
PHY
,
"Signaling main thread that RU %d is ready
\n
"
,
ru
->
idx
);
...
...
@@ -1598,9 +1603,9 @@ static void* ru_thread_control( void* param ) {
rru_config_msg
.
len
=
sizeof
(
RRU_CONFIG_msg_t
);
// TODO: set to correct msg len
LOG_I
(
PHY
,
"Sending Start to RRU
\n
"
,
ru
->
idx
);
AssertFatal
((
ru
->
ifdevice
.
trx_ctlsend_func
(
&
ru
->
ifdevice
,
&
rru_config_msg
,
rru_config_msg
.
len
)
!=-
1
)
,
"Failed to send msg to RU %d
\n
"
,
ru
->
idx
);
AssertFatal
((
ru
->
ifdevice
.
trx_ctlsend_func
(
&
ru
->
ifdevice
,
&
rru_config_msg
,
rru_config_msg
.
len
)
!=-
1
),
"Failed to send msg to RU %d
\n
"
,
ru
->
idx
);
// TODO: Start ru_thread
proc
->
instance_cnt_ru
=
1
;
if
(
pthread_cond_signal
(
&
proc
->
cond_ru_thread
)
!=
0
)
{
LOG_E
(
PHY
,
"ERROR pthread_cond_signal for RU %d
\n
"
,
ru
->
idx
);
...
...
@@ -1623,8 +1628,9 @@ static void* ru_thread_control( void* param ) {
pthread_mutex_unlock
(
&
RC
.
ru_mutex
);
wait_sync
(
"ru_thread"
);
// TODO: Start ru_thread
ru
->
state
=
RU_RUN
;
ru
->
state
=
(
ru
->
is_slave
==
1
)
?
RU_SYNC
:
RU_RUN
;
proc
->
instance_cnt_ru
=
1
;
if
(
pthread_cond_signal
(
&
proc
->
cond_ru_thread
)
!=
0
)
{
LOG_E
(
PHY
,
"ERROR pthread_cond_signal for RU %d
\n
"
,
ru
->
idx
);
...
...
@@ -1866,7 +1872,8 @@ void *ru_thread_synch(void *arg) {
exit(-1);
}
*/
ru
->
in_synch
=
1
;
ru
->
in_synch
=
1
;
ru
->
state
=
RU_SYNC
;
}
// symc_pos > 0
else
{
write_output
(
"ru_sync.m"
,
"sync"
,(
void
*
)
&
sync_corr
[
0
],
fp
->
samples_per_tti
*
5
,
1
,
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