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
a903ec64
Commit
a903ec64
authored
Jan 30, 2023
by
Marwan Hammouda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[develop] Added: timing offset compensation at UE
- post-compensation for DL and pre-compensation for UL
parent
8691824d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
executables/nr-ue.c
executables/nr-ue.c
+15
-6
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
+0
-5
No files found.
executables/nr-ue.c
View file @
a903ec64
...
...
@@ -762,6 +762,8 @@ void *UE_thread(void *arg)
int
timing_advance
=
UE
->
timing_advance
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
int
rx_offset_slot
=
0
;
//samples to be shifted for the current slot
int
UL_TO_Tx_ofs
=
0
;
bool
syncRunning
=
false
;
const
int
nb_slot_frame
=
UE
->
frame_parms
.
slots_per_frame
;
...
...
@@ -869,14 +871,21 @@ void *UE_thread(void *arg)
int
readBlockSize
,
writeBlockSize
;
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
);
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
)
%
nb_slot_frame
,
&
UE
->
frame_parms
);
if
(
UE
->
apply_timing_offset
&&
(
slot_nr
==
nb_slot_frame
-
1
))
{
rx_offset_slot
=
UE
->
rx_offset_TO
*
UE
->
rx_offset_slot
/
nb_slot_frame
-
UE
->
rx_offset_comp
;
UE
->
rx_offset_comp
+=
rx_offset_slot
;
UE
->
rx_offset_slot
++
;
UL_TO_Tx_ofs
+=
2
*
rx_offset_slot
;
//to adapt the UE's transmission time in order to get aligned at gNB
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
)
+
rx_offset_slot
;
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
)
%
nb_slot_frame
,
&
UE
->
frame_parms
);
/*
if (UE->apply_timing_offset && (slot_nr == nb_slot_frame-1)) {
const int sampShift = -(UE->rx_offset>>1);
readBlockSize -= sampShift;
writeBlockSize -= sampShift;
UE->apply_timing_offset = false;
}
*/
AssertFatal
(
readBlockSize
==
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
...
...
@@ -885,9 +894,9 @@ void *UE_thread(void *arg)
readBlockSize
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
if
(
slot_nr
==
(
nb_slot_frame
-
1
))
{
// read in first symbol of next frame
and adjust for timing drift
int
first_symbols
=
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
;
// first symbol of every frames
if
(
slot_nr
==
(
nb_slot_frame
-
1
))
{
// read in first symbol of next frame
int
first_symbols
=
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
;
// first symbol of every frames
if
(
first_symbols
>
0
)
{
openair0_timestamp
ignore_timestamp
;
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
View file @
a903ec64
...
...
@@ -114,11 +114,6 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
ue
->
rx_offset_comp
=
0
;
}
const
int
sample_shift
=
-
(
ue
->
rx_offset
>>
1
);
// reset IIR filter for next offset calculation
ue
->
max_pos_fil
+=
sample_shift
*
32768
;
if
(
abs
(
diff
)
<
5
)
count_max_pos_ok
++
;
else
...
...
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