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
cd8122d2
Commit
cd8122d2
authored
Oct 11, 2022
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NR_UE: fix frequency offset estimation/compensation if SSB is in the second captured frame
parent
f73fcd94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
34 deletions
+33
-34
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+33
-34
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
cd8122d2
...
...
@@ -251,17 +251,19 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
/* process pss search on received buffer */
sync_pos
=
pss_synchro_nr
(
ue
,
is
,
NO_RATE_CHANGE
);
if
(
sync_pos
<
fp
->
nb_prefix_samples
)
continue
;
if
(
sync_pos
>=
fp
->
nb_prefix_samples
)
ue
->
ssb_offset
=
sync_pos
-
fp
->
nb_prefix_samples
;
else
ue
->
ssb_offset
=
sync_pos
+
fp
->
samples_per_frame
-
fp
->
nb_prefix_samples
;
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE%d] Initial sync : Estimated PSS position %d, Nid2 %d
\n
"
,
ue
->
Mod_id
,
sync_pos
,
ue
->
common_vars
.
eNb_id
);
LOG_I
(
PHY
,
"sync_pos %d ssb_offset %d
\n
"
,
sync_pos
,
ue
->
ssb_offset
);
#endif
/* check that SSS/PBCH block is continuous inside the received buffer */
if
(
ue
->
ssb_offset
+
NR_N_SYMBOLS_SSB
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
)
<
fp
->
samples_per_frame
)
{
// digital compensation of FFO for SSB symbols
if
(
ue
->
UE_fo_compensation
){
double
s_time
=
1
/
(
1.0e3
*
fp
->
samples_per_subframe
);
// sampling time
...
...
@@ -271,10 +273,10 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
// and we do not know yet in which slot it goes.
// start for offset correction
int
start
=
sa
?
is
*
fp
->
samples_per_frame
:
is
*
fp
->
samples_per_frame
+
ue
->
ssb_offset
;
int
start
=
is
*
fp
->
samples_per_frame
;
// loop over samples
int
end
=
sa
?
n_frames
*
fp
->
samples_per_frame
:
start
+
NR_N_SYMBOLS_SSB
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
)
;
int
end
=
start
+
fp
->
samples_per_frame
;
for
(
int
n
=
start
;
n
<
end
;
n
++
){
for
(
int
ar
=
0
;
ar
<
fp
->
nb_antennas_rx
;
ar
++
)
{
...
...
@@ -286,9 +288,6 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
}
}
/* check that SSS/PBCH block is continuous inside the received buffer */
if
(
is
*
fp
->
samples_per_frame
+
ue
->
ssb_offset
+
NR_N_SYMBOLS_SSB
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
)
<
n_frames
*
fp
->
samples_per_frame
)
{
/* slop_fep function works for lte and takes into account begining of frame with prefix for subframe 0 */
/* for NR this is not the case but slot_fep is still used for computing FFT of samples */
/* in order to achieve correct processing for NR prefix samples is forced to 0 and then restored after function call */
...
...
@@ -322,10 +321,10 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
// and we do not know yet in which slot it goes.
// start for offset correction
int
start
=
sa
?
is
*
fp
->
samples_per_frame
:
is
*
fp
->
samples_per_frame
+
ue
->
ssb_offset
;
int
start
=
is
*
fp
->
samples_per_frame
;
// loop over samples
int
end
=
s
a
?
n_frames
*
fp
->
samples_per_frame
-
1
:
start
+
NR_N_SYMBOLS_SSB
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
)
;
int
end
=
s
tart
+
fp
->
samples_per_frame
;
for
(
int
n
=
start
;
n
<
end
;
n
++
){
for
(
int
ar
=
0
;
ar
<
fp
->
nb_antennas_rx
;
ar
++
)
{
...
...
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