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
eebf8bf6
Commit
eebf8bf6
authored
Jun 26, 2020
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
frame number sync
parent
e68e72cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
executables/nr-ue.c
executables/nr-ue.c
+11
-4
No files found.
executables/nr-ue.c
View file @
eebf8bf6
...
@@ -597,6 +597,7 @@ void *UE_thread(void *arg) {
...
@@ -597,6 +597,7 @@ void *UE_thread(void *arg) {
openair0_timestamp
timestamp
;
openair0_timestamp
timestamp
;
void
*
rxp
[
NB_ANTENNAS_RX
],
*
txp
[
NB_ANTENNAS_TX
];
void
*
rxp
[
NB_ANTENNAS_RX
],
*
txp
[
NB_ANTENNAS_TX
];
int
start_rx_stream
=
0
;
int
start_rx_stream
=
0
;
int
slot_within_frame
=
0
;
AssertFatal
(
0
==
openair0_device_load
(
&
(
UE
->
rfdevice
),
&
openair0_cfg
[
0
]),
""
);
AssertFatal
(
0
==
openair0_device_load
(
&
(
UE
->
rfdevice
),
&
openair0_cfg
[
0
]),
""
);
UE
->
rfdevice
.
host_type
=
RAU_HOST
;
UE
->
rfdevice
.
host_type
=
RAU_HOST
;
AssertFatal
(
UE
->
rfdevice
.
trx_start_func
(
&
UE
->
rfdevice
)
==
0
,
"Could not start the device
\n
"
);
AssertFatal
(
UE
->
rfdevice
.
trx_start_func
(
&
UE
->
rfdevice
)
==
0
,
"Could not start the device
\n
"
);
...
@@ -624,9 +625,10 @@ void *UE_thread(void *arg) {
...
@@ -624,9 +625,10 @@ void *UE_thread(void *arg) {
syncRunning
=
false
;
syncRunning
=
false
;
syncData_t
*
tmp
=
(
syncData_t
*
)
NotifiedFifoData
(
res
);
syncData_t
*
tmp
=
(
syncData_t
*
)
NotifiedFifoData
(
res
);
if
(
UE
->
is_synchronized
)
{
if
(
UE
->
is_synchronized
)
{
decoded_frame_rx
=
(((
mac
->
mib
->
systemFrameNumber
.
buf
[
0
]
>>
mac
->
mib
->
systemFrameNumber
.
bits_unused
)
<<
4
)
|
tmp
->
proc
.
decoded_frame_rx
);
//
decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | tmp->proc.decoded_frame_rx);
// shift the frame index with all the frames we trashed meanwhile we perform the synch search
// shift the frame index with all the frames we trashed meanwhile we perform the synch search
decoded_frame_rx
=
(
decoded_frame_rx
+
(
!
UE
->
init_sync_frame
)
+
trashed_frames
)
%
MAX_FRAME_NUMBER
;
decoded_frame_rx
=
(
tmp
->
proc
.
decoded_frame_rx
+
(
!
UE
->
init_sync_frame
)
+
trashed_frames
)
%
MAX_FRAME_NUMBER
;
printf
(
"frame_sync %d decoded_frame %d trashed_frames %d start_frame %d
\n
"
,
UE
->
init_sync_frame
,
tmp
->
proc
.
decoded_frame_rx
,
trashed_frames
,
decoded_frame_rx
);
}
}
delNotifiedFIFO_elt
(
res
);
delNotifiedFIFO_elt
(
res
);
}
else
{
}
else
{
...
@@ -782,9 +784,14 @@ void *UE_thread(void *arg) {
...
@@ -782,9 +784,14 @@ void *UE_thread(void *arg) {
if
(
(
decoded_frame_rx
!=
curMsg
->
proc
.
frame_rx
)
&&
if
(
(
decoded_frame_rx
!=
curMsg
->
proc
.
frame_rx
)
&&
(((
decoded_frame_rx
+
1
)
%
MAX_FRAME_NUMBER
)
!=
curMsg
->
proc
.
frame_rx
)
&&
(((
decoded_frame_rx
+
1
)
%
MAX_FRAME_NUMBER
)
!=
curMsg
->
proc
.
frame_rx
)
&&
(((
decoded_frame_rx
+
2
)
%
MAX_FRAME_NUMBER
)
!=
curMsg
->
proc
.
frame_rx
))
(((
decoded_frame_rx
+
2
)
%
MAX_FRAME_NUMBER
)
!=
curMsg
->
proc
.
frame_rx
))
{
LOG_E
(
PHY
,
"Decoded frame index (%d) is not compatible with current context (%d),
UE should go back to synch mode
\n
"
,
LOG_E
(
PHY
,
"Decoded frame index (%d) is not compatible with current context (%d),
Synchronizing decoded frame number with processing frame number
\n
"
,
decoded_frame_rx
,
curMsg
->
proc
.
frame_rx
);
decoded_frame_rx
,
curMsg
->
proc
.
frame_rx
);
// syncronizing decoded frame number with processing frame number
slot_within_frame
=
absolute_slot
%
nb_slot_frame
;
absolute_slot
=
decoded_frame_rx
*
nb_slot_frame
+
slot_within_frame
;
}
nbSlotProcessing
++
;
nbSlotProcessing
++
;
msgToPush
->
key
=
slot_nr
;
msgToPush
->
key
=
slot_nr
;
...
...
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