Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
a01e0ff8
Commit
a01e0ff8
authored
Oct 21, 2021
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NR_UE: fix bug in timing adjustment
parent
371b13c5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
executables/nr-ue.c
executables/nr-ue.c
+2
-0
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
+5
-7
No files found.
executables/nr-ue.c
View file @
a01e0ff8
...
...
@@ -464,12 +464,14 @@ int computeSamplesShift(PHY_VARS_NR_UE *UE) {
if
(
UE
->
rx_offset
<
UE
->
frame_parms
.
samples_per_frame
/
2
&&
UE
->
rx_offset
>
0
)
{
//LOG_I(PHY,"!!!adjusting -1 samples!!!\n");
UE
->
rx_offset
=
0
;
// reset so that it is not applied falsely in case of SSB being only in every second frame
return
-
1
;
}
if
(
UE
->
rx_offset
>
UE
->
frame_parms
.
samples_per_frame
/
2
&&
UE
->
rx_offset
<
UE
->
frame_parms
.
samples_per_frame
)
{
//LOG_I(PHY,"!!!adjusting +1 samples!!!\n");
UE
->
rx_offset
=
0
;
// reset so that it is not applied falsely in case of SSB being only in every second frame
return
1
;
}
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
View file @
a01e0ff8
...
...
@@ -55,13 +55,14 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
LOG_D
(
PHY
,
"AbsSubframe %d: rx_offset (before) = %d
\n
"
,
subframe
,
ue
->
rx_offset
);
//
we only use channel estimates from tx antenna 0 here
for
(
int
i
=
0
;
i
<
frame_parms
->
nb_prefix_samples
;
i
++
)
{
//
search for maximum position within the cyclic prefix
for
(
int
i
=
-
frame_parms
->
nb_prefix_samples
/
2
;
i
<
frame_parms
->
nb_prefix_samples
/
2
;
i
++
)
{
int
temp
=
0
;
int
j
=
(
i
<
0
)
?
(
i
+
frame_parms
->
ofdm_symbol_size
)
:
i
;
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
int
Re
=
((
int16_t
*
)
ue
->
pbch_vars
[
gNB_id
]
->
dl_ch_estimates_time
[
aa
])[(
i
<<
1
)];
int
Im
=
((
int16_t
*
)
ue
->
pbch_vars
[
gNB_id
]
->
dl_ch_estimates_time
[
aa
])[
1
+
(
i
<<
1
)];
int
Re
=
((
int16_t
*
)
ue
->
pbch_vars
[
gNB_id
]
->
dl_ch_estimates_time
[
aa
])[(
j
<<
1
)];
int
Im
=
((
int16_t
*
)
ue
->
pbch_vars
[
gNB_id
]
->
dl_ch_estimates_time
[
aa
])[
1
+
(
j
<<
1
)];
temp
+=
(
Re
*
Re
/
2
)
+
(
Im
*
Im
/
2
);
}
...
...
@@ -71,9 +72,6 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
}
}
if
(
max_pos
>
frame_parms
->
ofdm_symbol_size
/
2
)
max_pos
=
max_pos
-
frame_parms
->
ofdm_symbol_size
;
// filter position to reduce jitter
if
(
clear
==
1
)
max_pos_fil
=
max_pos
;
...
...
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