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
lizhongxiao
OpenXG-RAN
Commits
1be69de2
Commit
1be69de2
authored
Jan 03, 2022
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
e1d88d6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
33 deletions
+5
-33
openair1/PHY/NR_REFSIG/pss_nr.h
openair1/PHY/NR_REFSIG/pss_nr.h
+1
-1
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
+3
-31
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+1
-1
No files found.
openair1/PHY/NR_REFSIG/pss_nr.h
View file @
1be69de2
...
...
@@ -141,7 +141,7 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain
int
*
eNB_id
,
int
*
f_off
);
int
nr_adjust_pss_synch
(
PHY_VARS_NR_UE
*
ue
,
int
*
f_off
);
int
nr_adjust_pss_synch
(
PHY_VARS_NR_UE
*
ue
);
#endif
#undef EXTERN
...
...
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
View file @
1be69de2
...
...
@@ -976,7 +976,7 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain
return
(
peak_position
);
}
int
nr_adjust_pss_synch
(
PHY_VARS_NR_UE
*
ue
,
int
*
f_off
)
{
int
nr_adjust_pss_synch
(
PHY_VARS_NR_UE
*
ue
)
{
int
**
rxdata
=
ue
->
common_vars
.
rxdata
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
...
...
@@ -1030,36 +1030,8 @@ int nr_adjust_pss_synch(PHY_VARS_NR_UE *ue, int *f_off) {
}
}
// Fractional frequency offset computation according to Cross-correlation Synchronization Algorithm Using PSS
// Shoujun Huang, Yongtao Su, Ying He and Shan Tang, "Joint time and frequency offset estimation in LTE downlink,"
// 7th International Conference on Communications and Networking in China, 2012.
// Computing cross-correlation at peak on half the symbol size for first half of data
int64_t
result1
=
dot_product64
((
short
*
)
primary_synchro_time_nr
[
Nid2
],
(
short
*
)
&
(
rxdata
[
0
][
peak_position
]),
frame_parms
->
ofdm_symbol_size
>>
1
,
shift
);
// Computing cross-correlation at peak on half the symbol size for data shifted by half symbol size
// as it is real and complex it is necessary to shift by a value equal to symbol size to obtain such shift
int64_t
result2
=
dot_product64
((
short
*
)
primary_synchro_time_nr
[
Nid2
]
+
(
frame_parms
->
ofdm_symbol_size
),
(
short
*
)
&
(
rxdata
[
0
][
peak_position
])
+
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
ofdm_symbol_size
>>
1
,
shift
);
int64_t
re1
=
((
int
*
)
&
result1
)[
0
];
int64_t
re2
=
((
int
*
)
&
result2
)[
0
];
int64_t
im1
=
((
int
*
)
&
result1
)[
1
];
int64_t
im2
=
((
int
*
)
&
result2
)[
1
];
// Estimation of fractional frequency offset: angle[(result1)'*(result2)]/pi
double
ffo_est
=
atan2
(
re1
*
im2
-
re2
*
im1
,
re1
*
re2
+
im1
*
im2
)
/
M_PI
;
// Computing absolute value of frequency offset
*
f_off
=
ffo_est
*
frame_parms
->
subcarrier_spacing
;
LOG_D
(
NR_PHY
,
"nr_adjust_pss_synch: peak_position %d, peak_position_diff %d, peak_value %d dB, avg %d dB, ffo %lf
\n
"
,
peak_position
,
peak_position_diff
,
dB_fixed64
(
peak_value
),
dB_fixed64
(
avg
),
ffo_est
);
LOG_D
(
NR_PHY
,
"nr_adjust_pss_synch: peak_position %d, peak_position_diff %d, peak_value %d dB, avg %d dB
\n
"
,
peak_position
,
peak_position_diff
,
dB_fixed64
(
peak_value
),
dB_fixed64
(
avg
));
return
peak_position_diff
;
}
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
1be69de2
...
...
@@ -1648,7 +1648,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
if
((
ue
->
decode_MIB
==
1
)
&&
slot_pbch
)
{
nr_adjust_pss_synch
(
ue
,
(
int
*
)
&
ue
->
common_vars
.
freq_offset
);
nr_adjust_pss_synch
(
ue
);
LOG_D
(
PHY
,
" ------ Decode MIB: frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
);
nr_ue_pbch_procedures
(
gNB_id
,
ue
,
proc
,
0
);
...
...
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