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
799e5274
Commit
799e5274
authored
Dec 24, 2021
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust sync based on PSS improvements
parent
29268d0a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
executables/nr-ue.c
executables/nr-ue.c
+0
-3
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
+12
-3
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+1
-5
No files found.
executables/nr-ue.c
View file @
799e5274
...
...
@@ -642,9 +642,6 @@ void *UE_thread(void *arg) {
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
);
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
-
NR_RX_NB_TH
)
%
nb_slot_frame
,
&
UE
->
frame_parms
);
}
else
{
//UE->rx_offset_diff = computeSamplesShift(UE);
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
)
-
UE
->
rx_offset_diff
;
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
-
NR_RX_NB_TH
)
%
nb_slot_frame
,
&
UE
->
frame_parms
)
-
UE
->
rx_offset_diff
;
...
...
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
View file @
799e5274
...
...
@@ -981,6 +981,7 @@ int nr_adjust_pss_synch(PHY_VARS_NR_UE *ue, int *f_off) {
int
**
rxdata
=
ue
->
common_vars
.
rxdata
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
uint8_t
Nid2
=
GET_NID2
(
frame_parms
->
Nid_cell
);
int
peak_position_ref
=
((
frame_parms
->
ofdm_symbol_size
+
frame_parms
->
nb_prefix_samples
)
<<
1
)
+
frame_parms
->
nb_prefix_samples0
;
int
maxval
=
0
;
for
(
int
i
=
0
;
i
<
2
*
(
frame_parms
->
ofdm_symbol_size
);
i
++
)
{
...
...
@@ -996,8 +997,8 @@ int nr_adjust_pss_synch(PHY_VARS_NR_UE *ue, int *f_off) {
int
peak_position
=
0
;
int64_t
result
=
0
;
int64_t
avg
=
0
;
int
start
=
2
*
(
frame_parms
->
ofdm_symbol_size
+
frame_parms
->
nb_prefix_samples
)
+
frame_parms
->
nb_prefix_samples0
-
200
;
int
length
=
2
*
frame_parms
->
ofdm_symbol_size
+
200
;
int
start
=
peak_position_ref
-
(
frame_parms
->
ofdm_symbol_size
>>
3
)
;
int
length
=
frame_parms
->
ofdm_symbol_size
+
(
frame_parms
->
ofdm_symbol_size
>>
3
)
;
memset
(
pss_corr_ue
[
Nid2
],
0
,(
start
+
length
)
*
sizeof
(
int64_t
));
for
(
int
n
=
start
;
n
<
start
+
length
;
n
+=
4
)
{
//
for
(
int
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
...
...
@@ -1019,7 +1020,15 @@ int nr_adjust_pss_synch(PHY_VARS_NR_UE *ue, int *f_off) {
return
0
;
}
int
peak_position_diff
=
peak_position
-
(
((
frame_parms
->
ofdm_symbol_size
+
frame_parms
->
nb_prefix_samples
)
<<
1
)
+
frame_parms
->
nb_prefix_samples0
);
int
peak_position_diff
=
peak_position_ref
-
peak_position
;
ue
->
rx_offset_diff
=
0
;
if
(
peak_position_diff
!=
0
)
{
ue
->
rx_offset_diff
=
peak_position_diff
>>
3
;
if
(
ue
->
rx_offset_diff
==
0
)
{
ue
->
rx_offset_diff
=
peak_position_diff
>
0
?
1
:
-
1
;
}
}
// 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,"
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
799e5274
...
...
@@ -1648,7 +1648,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
if
((
ue
->
decode_MIB
==
1
)
&&
slot_pbch
)
{
int
peak_position_diff
=
nr_adjust_pss_synch
(
ue
,
(
int
*
)
&
ue
->
common_vars
.
freq_offset
);
nr_adjust_pss_synch
(
ue
,
(
int
*
)
&
ue
->
common_vars
.
freq_offset
);
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
);
...
...
@@ -1664,10 +1664,6 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
16384);
}*/
//ue->rx_offset = peak_position_diff;
ue
->
rx_offset_diff
=
-
peak_position_diff
;
LOG_D
(
PHY
,
"Doing N0 measurements in %s
\n
"
,
__FUNCTION__
);
nr_ue_rrc_measurements
(
ue
,
proc
,
nr_slot_rx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PBCH
,
VCD_FUNCTION_OUT
);
...
...
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