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
常顺宇
OpenXG-RAN
Commits
31aade20
Commit
31aade20
authored
3 years ago
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tentative fix for wrong frame caused by rx offset
parent
bd060943
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
executables/nr-ue.c
executables/nr-ue.c
+3
-3
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+7
-5
No files found.
executables/nr-ue.c
View file @
31aade20
...
...
@@ -513,7 +513,7 @@ void *UE_thread(void *arg) {
if
(
UE
->
is_synchronized
)
{
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
decoded_frame_rx
=
(
decoded_frame_rx
+
(
!
UE
->
init_sync_frame
)
+
trashed_frames
)
%
MAX_FRAME_NUMBER
;
decoded_frame_rx
=
(
decoded_frame_rx
+
UE
->
init_sync_frame
+
trashed_frames
)
%
MAX_FRAME_NUMBER
;
}
delNotifiedFIFO_elt
(
res
);
}
else
{
...
...
@@ -652,9 +652,9 @@ void *UE_thread(void *arg) {
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
res
);
}
if
(
decoded_frame_rx
>
0
&&
decoded_frame_rx
!=
curMsg
->
proc
.
frame_rx
)
if
(
decoded_frame_rx
>
0
&&
decoded_frame_rx
!=
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
"
,
decoded_frame_rx
,
curMsg
->
proc
.
frame_rx
);
decoded_frame_rx
,
curMsg
->
proc
.
frame_rx
);
// use previous timing_advance value to compute writeTimestamp
writeTimestamp
=
timestamp
+
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
31aade20
...
...
@@ -308,12 +308,14 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames)
// every 7*(1<<mu) symbols there is a different prefix length (38.211 5.3.1)
int
n_symb_prefix0
=
(
ue
->
symbol_offset
/
(
7
*
(
1
<<
mu
)))
+
1
;
sync_pos_frame
=
n_symb_prefix0
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples0
)
+
(
ue
->
symbol_offset
-
n_symb_prefix0
)
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
if
(
ue
->
ssb_offset
<
sync_pos_frame
)
ue
->
rx_offset
=
fp
->
samples_per_frame
-
sync_pos_frame
+
ue
->
ssb_offset
;
else
if
(
ue
->
ssb_offset
<
sync_pos_frame
){
ue
->
rx_offset
=
(
2
*
fp
->
samples_per_frame
)
-
sync_pos_frame
+
ue
->
ssb_offset
;
ue
->
init_sync_frame
=
!
is
+
2
;
}
else
{
ue
->
rx_offset
=
ue
->
ssb_offset
-
sync_pos_frame
;
ue
->
init_sync_frame
=
is
;
ue
->
init_sync_frame
=
!
is
;
}
}
/*
...
...
This diff is collapsed.
Click to expand it.
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