Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
a2c6ad42
Commit
a2c6ad42
authored
2 years ago
by
Thomas Schlichter
Browse files
Options
Downloads
Patches
Plain Diff
NR_UE: minor improvements in nr_initial_sync()
parent
b94d6b5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1800
integration_2022_wk44
,
!1764
NR_UE: improve timing and initial frequency synchronization
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+9
-4
9 additions, 4 deletions
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
with
9 additions
and
4 deletions
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+
9
−
4
View file @
a2c6ad42
...
...
@@ -51,7 +51,7 @@ extern openair0_config_t openair0_cfg[];
int
cnt
=
0
;
#define DEBUG_INITIAL_SYNCH
#define DUMP_PBCH_CH_ESTIMATES 0
// create a new node of SSB structure
NR_UE_SSB
*
create_ssb_node
(
uint8_t
i
,
uint8_t
h
)
{
...
...
@@ -168,6 +168,11 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
phy_pdcch_config
,
&
result
);
if
(
DUMP_PBCH_CH_ESTIMATES
&&
(
ret
==
0
))
{
write_output
(
"pbch_ch_estimates.m"
,
"pbch_ch_estimates"
,
dl_ch_estimates
,
frame_parms
->
nb_antennas_rx
*
estimateSz
,
1
,
1
);
write_output
(
"pbch_ch_estimates_time.m"
,
"pbch_ch_estimates_time"
,
dl_ch_estimates_time
,
frame_parms
->
nb_antennas_rx
*
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
}
temp_ptr
=
temp_ptr
->
next_ssb
;
}
...
...
@@ -250,7 +255,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
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_
sub
frame
*
10
)
-
fp
->
nb_prefix_samples
;
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
);
...
...
@@ -269,7 +274,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
int
start
=
sa
?
is
*
fp
->
samples_per_frame
:
is
*
fp
->
samples_per_frame
+
ue
->
ssb_offset
;
// loop over samples
int
end
=
sa
?
n_frames
*
fp
->
samples_per_frame
-
1
:
start
+
NR_N_SYMBOLS_SSB
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
int
end
=
sa
?
n_frames
*
fp
->
samples_per_frame
:
start
+
NR_N_SYMBOLS_SSB
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
for
(
int
n
=
start
;
n
<
end
;
n
++
){
for
(
int
ar
=
0
;
ar
<
fp
->
nb_antennas_rx
;
ar
++
)
{
...
...
@@ -282,7 +287,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
}
/* check that SSS/PBCH block is continuous inside the received buffer */
if
(
s
ync_pos
<
(
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
fp
->
samples_per_
sub
frame
-
(
NB
_SYMBOLS_
PBCH
*
fp
->
ofdm_symbol_size
))
)
{
if
(
i
s
*
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 */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment