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
e7122ad7
Commit
e7122ad7
authored
Jan 08, 2025
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NR UE: fix application of NTN TA information
parent
6b8a59cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
14 deletions
+30
-14
executables/nr-ue.c
executables/nr-ue.c
+29
-14
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+1
-0
No files found.
executables/nr-ue.c
View file @
e7122ad7
...
...
@@ -814,6 +814,33 @@ static inline int get_readBlockSize(uint16_t slot, NR_DL_FRAME_PARMS *fp) {
return
rem_samples
+
next_slot_first_symbol
;
}
static
inline
void
apply_ntn_config
(
PHY_VARS_NR_UE
*
UE
,
NR_DL_FRAME_PARMS
*
fp
,
int
slot_nr
,
bool
*
update_ntn_system_information
,
int
*
duration_rx_to_tx
,
int
*
timing_advance
,
int
*
ntn_koffset
)
{
if
(
*
update_ntn_system_information
)
{
*
update_ntn_system_information
=
false
;
*
duration_rx_to_tx
=
NR_UE_CAPABILITY_SLOT_RX_TO_TX
+
UE
->
ntn_config_message
->
ntn_config_params
.
cell_specific_k_offset
;
UE
->
timing_advance
=
fp
->
samples_per_subframe
*
UE
->
ntn_config_message
->
ntn_config_params
.
ntn_total_time_advance_ms
;
*
timing_advance
+=
fp
->
get_samples_slot_timestamp
(
slot_nr
,
fp
,
UE
->
ntn_config_message
->
ntn_config_params
.
cell_specific_k_offset
-
*
ntn_koffset
);
*
ntn_koffset
=
UE
->
ntn_config_message
->
ntn_config_params
.
cell_specific_k_offset
;
LOG_I
(
PHY
,
"cell_specific_k_offset = %d ms, ntn_total_time_advance_ms = %f ms (%d samples)
\n
"
,
*
ntn_koffset
,
UE
->
ntn_config_message
->
ntn_config_params
.
ntn_total_time_advance_ms
,
UE
->
timing_advance
);
}
}
void
*
UE_thread
(
void
*
arg
)
{
//this thread should be over the processing thread to keep in real time
...
...
@@ -869,7 +896,6 @@ void *UE_thread(void *arg)
readFrame
(
UE
,
&
tmp
,
true
);
}
double
ntn_ta_common
=
0
;
int
ntn_koffset
=
0
;
int
duration_rx_to_tx
=
NR_UE_CAPABILITY_SLOT_RX_TO_TX
;
...
...
@@ -1000,16 +1026,6 @@ void *UE_thread(void *arg)
absolute_slot
++
;
TracyCFrameMark
;
if
(
update_ntn_system_information
)
{
update_ntn_system_information
=
false
;
int
ta_offset
=
UE
->
frame_parms
.
samples_per_subframe
*
(
UE
->
ntn_config_message
->
ntn_config_params
.
ntn_total_time_advance_ms
-
ntn_ta_common
);
UE
->
timing_advance
+=
ta_offset
;
ntn_ta_common
=
UE
->
ntn_config_message
->
ntn_config_params
.
ntn_total_time_advance_ms
;
ntn_koffset
=
UE
->
ntn_config_message
->
ntn_config_params
.
cell_specific_k_offset
;
timing_advance
=
ntn_koffset
*
(
UE
->
frame_parms
.
samples_per_subframe
>>
mac
->
current_UL_BWP
->
scs
);
}
if
(
UE
->
ntn_config_message
->
update
)
{
UE
->
ntn_config_message
->
update
=
false
;
update_ntn_system_information
=
true
;
...
...
@@ -1129,10 +1145,9 @@ void *UE_thread(void *arg)
newTx
);
stream_status
=
STREAM_STATUS_SYNCED
;
tx_wait_for_dlsch
[
slot
]
=
0
;
// apply new duration next run to avoid thread dead lock
if
(
update_ntn_system_information
)
{
duration_rx_to_tx
=
NR_UE_CAPABILITY_SLOT_RX_TO_TX
+
UE
->
ntn_config_message
->
ntn_config_params
.
cell_specific_k_offset
;
}
apply_ntn_config
(
UE
,
fp
,
slot_nr
,
&
update_ntn_system_information
,
&
duration_rx_to_tx
,
&
timing_advance
,
&
ntn_koffset
);
}
return
NULL
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
e7122ad7
...
...
@@ -3617,6 +3617,7 @@ static void schedule_ntn_config_command(fapi_nr_dl_config_request_t *dl_config,
{
fapi_nr_dl_ntn_config_command_pdu
*
ntn_config_command_pdu
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
ntn_config_command_pdu
;
ntn_config_command_pdu
->
cell_specific_k_offset
=
mac
->
ntn_ta
.
cell_specific_k_offset
;
ntn_config_command_pdu
->
ntn_ta_commondrift
=
mac
->
ntn_ta
.
ntn_ta_commondrift
;
ntn_config_command_pdu
->
N_common_ta_adj
=
mac
->
ntn_ta
.
N_common_ta_adj
;
ntn_config_command_pdu
->
N_UE_TA_adj
=
mac
->
ntn_ta
.
N_UE_TA_adj
;
ntn_config_command_pdu
->
ntn_total_time_advance_ms
=
(
mac
->
ntn_ta
.
N_common_ta_adj
+
mac
->
ntn_ta
.
N_UE_TA_adj
)
*
2
;
...
...
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