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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
f6fd7b61
Commit
f6fd7b61
authored
Nov 24, 2025
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NR UE: improve NTN reestablishment by continuing with previous HFN
parent
30afbc41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
executables/nr-ue.c
executables/nr-ue.c
+21
-8
No files found.
executables/nr-ue.c
View file @
f6fd7b61
...
...
@@ -736,6 +736,10 @@ static inline int get_readBlockSize(uint16_t slot, NR_DL_FRAME_PARMS *fp) {
static
void
fix_ntn_epoch_hfn
(
PHY_VARS_NR_UE
*
UE
,
int
hfn
,
int
frame
)
{
if
(
!
UE
->
nrUE_config
.
ntn_config
.
is_targetcell
)
return
;
UE
->
nrUE_config
.
ntn_config
.
is_targetcell
=
false
;
const
int
epoch_frame
=
UE
->
nrUE_config
.
ntn_config
.
epoch_sfn
;
const
int
diff1
=
(
frame
-
epoch_frame
+
1024
)
%
1024
;
const
int
diff2
=
(
epoch_frame
-
frame
+
1024
)
%
1024
;
...
...
@@ -1057,22 +1061,31 @@ void *UE_thread(void *arg)
// we have the decoded frame index in the return of the synch process
// and we shifted above to the first slot of next frame
decoded_frame_rx
=
(
decoded_frame_rx
+
1
)
%
MAX_FRAME_NUMBER
;
const
int
prev_frame_rx
=
(
absolute_slot
/
nb_slot_frame
)
%
MAX_FRAME_NUMBER
;
const
int
prev_hfn_rx
=
(
absolute_slot
/
nb_slot_frame
)
/
MAX_FRAME_NUMBER
;
int
decoded_hfn_rx
=
prev_hfn_rx
;
if
(
decoded_frame_rx
<=
prev_frame_rx
)
decoded_hfn_rx
++
;
// we do ++ first in the regular processing, so it will be begin of frame;
absolute_slot
=
decoded_frame_rx
*
nb_slot_frame
-
1
;
absolute_slot
=
(
decoded_hfn_rx
*
MAX_FRAME_NUMBER
+
decoded_frame_rx
)
*
nb_slot_frame
-
1
;
if
(
UE
->
sl_mode
==
2
)
{
// Set to the slot where the SL-SSB was decoded
absolute_slot
+=
UE
->
SL_UE_PHY_PARAMS
.
sync_params
.
slot_offset
;
}
// With the correct frame and slot numbers, we can now fix the UL timing
const
int
frame_rx
=
(
absolute_slot
/
nb_slot_frame
)
%
1024
;
const
int
hfn_rx
=
(
absolute_slot
/
nb_slot_frame
)
/
1024
;
fix_ntn_epoch_hfn
(
UE
,
hfn_rx
,
frame_rx
);
UE
->
nrUE_config
.
ntn_config
.
is_targetcell
=
false
;
fix_ntn_epoch_hfn
(
UE
,
decoded_hfn_rx
,
decoded_frame_rx
);
if
(
UE
->
nrUE_config
.
ntn_config
.
params_changed
)
{
apply_ntn_config
(
UE
,
fp
,
hfn_rx
,
frame_rx
,
0
,
&
duration_rx_to_tx
,
&
timing_advance
,
&
ntn_koffset
,
&
ntn_targetcell
);
apply_ntn_config
(
UE
,
fp
,
decoded_hfn_rx
,
decoded_frame_rx
,
0
,
&
duration_rx_to_tx
,
&
timing_advance
,
&
ntn_koffset
,
&
ntn_targetcell
);
}
else
{
const
int
mu
=
fp
->
numerology_index
;
const
int
abs_subframe_tx
=
10240
*
hfn_rx
+
10
*
frame_rx
+
(
duration_rx_to_tx
>>
mu
);
const
int
abs_subframe_tx
=
(
absolute_slot
+
1
+
duration_rx_to_tx
)
/
fp
->
slots_per_subframe
;
apply_ntn_timing_advance_and_doppler
(
UE
,
fp
,
abs_subframe_tx
);
ntn_targetcell
=
false
;
}
...
...
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