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
zzha zzha
OpenXG-RAN
Commits
271b761a
Commit
271b761a
authored
Mar 05, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
frame resynch completed. to be tested with more than 2 RRU.
parent
4afeaaf2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
openair1/PHY/defs.h
openair1/PHY/defs.h
+2
-1
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+2
-2
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+12
-5
No files found.
openair1/PHY/defs.h
View file @
271b761a
...
...
@@ -690,7 +690,8 @@ typedef enum {
typedef
enum
{
EMPTY
=
0
,
STOP_RU
=
1
,
RU_FRAME_RESYNCH
=
2
RU_FRAME_RESYNCH
=
2
,
WAIT_RESYNCH
=
3
}
rru_cmd_t
;
typedef
struct
RU_t_s
{
...
...
targets/RT/USER/lte-enb.c
View file @
271b761a
...
...
@@ -225,7 +225,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
// UE-specific RX processing for subframe n
if
(
nfapi_mode
==
0
||
nfapi_mode
==
1
)
{
LOG_
I
(
PHY
,
"Calling RX procedures for SFNSF %d.%d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
LOG_
D
(
PHY
,
"Calling RX procedures for SFNSF %d.%d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
phy_procedures_eNB_uespec_RX
(
eNB
,
proc
,
no_relay
);
}
...
...
@@ -251,7 +251,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
if
(
oai_exit
)
return
(
-
1
);
LOG_
I
(
PHY
,
"Calling eNB_procedures_TX for SFN.SF %d.%d
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
LOG_
D
(
PHY
,
"Calling eNB_procedures_TX for SFN.SF %d.%d
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
phy_procedures_eNB_TX
(
eNB
,
proc
,
no_relay
,
NULL
,
1
);
stop_meas
(
&
softmodem_stats_rxtx_sf
);
...
...
targets/RT/USER/lte-ru.c
View file @
271b761a
...
...
@@ -488,10 +488,14 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
LOG_E
(
PHY
,
"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)
\n
"
,
proc
->
subframe_rx
,
*
subframe
);
exit_fun
(
"Exiting"
);
}
if
(
proc
->
frame_rx
!=
*
frame
)
{
if
(
ru
->
cmd
!=
WAIT_RESYNCH
&&
proc
->
frame_rx
!=
*
frame
)
{
LOG_E
(
PHY
,
"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)
\n
"
,
proc
->
frame_rx
,
*
frame
);
exit_fun
(
"Exiting"
);
}
else
if
(
ru
->
cmd
==
WAIT_RESYNCH
&&
proc
->
frame_rx
!=
*
frame
){
ru
->
cmd
=
EMPTY
;
*
frame
=
proc
->
frame_rx
;
}
}
else
{
proc
->
first_rx
=
0
;
*
frame
=
proc
->
frame_rx
;
...
...
@@ -1275,7 +1279,8 @@ void wakeup_eNBs(RU_t *ru) {
sprintf
(
string
,
"Incoming RU %d"
,
ru
->
idx
);
pthread_mutex_lock
(
&
proc
->
mutex_RU
);
LOG_D
(
PHY
,
"Frame %d, Subframe %d: RU %d done,RU_mask[%d] %x
\n
"
,
ru
->
proc
.
frame_rx
,
ru
->
proc
.
subframe_rx
,
ru
->
idx
,
ru
->
proc
.
subframe_rx
,
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]);
LOG_I
(
PHY
,
"Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask[%d] %x
\n
"
,
ru
->
proc
.
frame_rx
,
ru
->
proc
.
subframe_rx
,
ru
->
idx
,
ru
->
wait_cnt
,
ru
->
proc
.
subframe_rx
,
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]);
if
(
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
==
0
)
clock_gettime
(
CLOCK_MONOTONIC
,
&
proc
->
t
[
ru
->
proc
.
subframe_rx
]);
...
...
@@ -1293,13 +1298,13 @@ void wakeup_eNBs(RU_t *ru) {
if
(
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
==
(
1
<<
eNB
->
num_RU
)
-
1
)
{
proc
->
RU_mask
[
ru
->
proc
.
subframe_rx
]
=
0
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
t
);
AssertFatal
(
t
.
tv_nsec
>
proc
->
t
[
ru
->
proc
.
subframe_rx
].
tv_nsec
+
500000
,
AssertFatal
(
t
.
tv_nsec
<
proc
->
t
[
ru
->
proc
.
subframe_rx
].
tv_nsec
+
500000
,
"Time difference for subframe %d => %d > 5ms
\n
"
,
ru
->
proc
.
subframe_rx
,
t
.
tv_nsec
-
proc
->
t
[
ru
->
proc
.
subframe_rx
].
tv_nsec
);
}
pthread_mutex_unlock
(
&
proc
->
mutex_RU
);
LOG_
D
(
PHY
,
"wakeup eNB top for for subframe %d
\n
"
,
ru
->
proc
.
subframe_rx
);
LOG_
I
(
PHY
,
"wakeup eNB top for for subframe %d
\n
"
,
ru
->
proc
.
subframe_rx
);
ru
->
eNB_top
(
eNB_list
[
0
],
ru
->
proc
.
frame_rx
,
ru
->
proc
.
subframe_rx
,
string
);
}
else
{
// multiple eNB case for later
...
...
@@ -1749,6 +1754,7 @@ static void* ru_thread_control( void* param ) {
else
{
ru
->
cmd
=
RU_FRAME_RESYNCH
;
ru
->
cmdval
=
((
uint16_t
*
)
&
rru_config_msg
.
msg
[
0
])[
0
];
LOG_I
(
PHY
,
"Received Frame Resynch messaage with value %d
\n
"
,
ru
->
cmdval
);
}
break
;
...
...
@@ -1884,12 +1890,13 @@ static void* ru_thread( void* param ) {
if
(
ru
->
wait_cnt
>
0
)
{
ru
->
wait_cnt
--
;
if
(
ru
->
if_south
!=
LOCAL_RF
&&
ru
->
wait_cnt
<=
2
0
&&
subframe
==
5
&&
frame
!=
RC
.
ru
[
0
]
->
proc
.
frame_rx
)
{
if
(
ru
->
if_south
!=
LOCAL_RF
&&
ru
->
wait_cnt
<=
1
0
&&
subframe
==
5
&&
frame
!=
RC
.
ru
[
0
]
->
proc
.
frame_rx
)
{
// Send RRU_frame adjust
RRU_CONFIG_msg_t
rru_config_msg
;
rru_config_msg
.
type
=
RRU_frame_resynch
;
rru_config_msg
.
len
=
sizeof
(
RRU_CONFIG_msg_t
);
// TODO: set to correct msg len
((
uint16_t
*
)
&
rru_config_msg
.
msg
[
0
])[
0
]
=
RC
.
ru
[
0
]
->
proc
.
frame_rx
;
ru
->
cmd
=
WAIT_RESYNCH
;
LOG_I
(
PHY
,
"Sending Frame Resynch %d to RRU
\n
"
,
ru
->
idx
,
RC
.
ru
[
0
]
->
proc
.
frame_rx
);
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
);
...
...
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