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
d1d99d41
Commit
d1d99d41
authored
Aug 25, 2023
by
Marwan Hammouda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ta_frame and ta_slot calculation corrected
parent
be48ec8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
executables/nr-ue.c
executables/nr-ue.c
+5
-6
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
+1
-1
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+4
-3
No files found.
executables/nr-ue.c
View file @
d1d99d41
...
...
@@ -881,9 +881,6 @@ void *UE_thread(void *arg)
UL_TO_Tx_ofs
+=
2
*
rx_offset_slot
;
//to adapt the UE's transmission time in order to get aligned at gNB
}
LOG_I
(
PHY
,
"diff: %d, PI_Out: %d, offset_slot: %d, offset_UL: %d, TA: %d, TO_PScal: %f, TO_IScal: %f
\n
"
,
UE
->
rx_offset
,
UE
->
rx_offset_TO
,
rx_offset_slot
,
UL_TO_Tx_ofs
,
UE
->
timing_advance
,
TO_PScaling
,
TO_IScaling
);
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
);
/*
...
...
@@ -917,15 +914,17 @@ void *UE_thread(void *arg)
}
else
LOG_E
(
PHY
,
"can't compensate: diff =%d
\n
"
,
first_symbols
);
}
printf
(
"**** Option: 4 Activated
\n
"
);
//timing_advance += 1*rx_offset_slot;
//timing_advance += 2*rx_offset_slot;
//UE->timing_advance += 1*rx_offset_slot;
UE
->
timing_advance
+=
2
*
rx_offset_slot
;
extern
uint64_t
RFsim_PropDelay
;
LOG_D
(
PHY
,
"RFsim_PropDelay: %lu, TA: %d, diff: %d, PI_Out: %d, offset_slot: %d, offset_UL: %d
\n
"
,
RFsim_PropDelay
,
timing_advance
,
UE
->
rx_offset
,
UE
->
rx_offset_TO
,
rx_offset_slot
,
UL_TO_Tx_ofs
);
// use previous timing_advance value to compute writeTimestamp
writeTimestamp
=
timestamp
+
UE
->
frame_parms
.
get_samples_slot_timestamp
(
slot_nr
,
&
UE
->
frame_parms
,
DURATION_RX_TO_TX
)
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
View file @
d1d99d41
...
...
@@ -120,7 +120,7 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
ue
->
rx_offset_comp
=
0
;
}
LOG_
I
(
PHY
,
"Frame: %u, diff: %d, rx_offset_TO: %d, PScaling: %f, IScaling: %f, TA: %d, TO_I_Ctrl: %ld
\n
"
,
frame
,
ue
->
rx_offset
,
ue
->
rx_offset_TO
,
TO_PScaling
,
TO_IScaling
,
ue
->
timing_advance
,
TO_I_Ctrl
);
LOG_
D
(
PHY
,
"Frame: %u, diff: %d, rx_offset_TO: %d, PScaling: %f, IScaling: %f, TA: %d, TO_I_Ctrl: %ld
\n
"
,
frame
,
ue
->
rx_offset
,
ue
->
rx_offset_TO
,
TO_PScaling
,
TO_IScaling
,
ue
->
timing_advance
,
TO_I_Ctrl
);
if
(
abs
(
diff
)
<
5
)
count_max_pos_ok
++
;
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
d1d99d41
...
...
@@ -375,9 +375,10 @@ void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_command
const
double
t_subframe
=
1
.
0
;
// subframe duration of 1 msec
const
int
ul_tx_timing_adjustment
=
1
+
(
int
)
ceil
(
slots_per_subframe
*
(
N_t_1
+
N_t_2
+
N_TA_max
+
0
.
5
)
/
t_subframe
);
ue
->
ta_slot
=
(
ta_command_pdu
->
ta_slot
+
ul_tx_timing_adjustment
+
NTN_UE_slot_Rx_to_Tx
)
%
slots_per_frame
;
if
(
ta_command_pdu
->
ta_slot
+
ul_tx_timing_adjustment
>
slots_per_frame
)
ue
->
ta_frame
=
(
ta_command_pdu
->
ta_frame
+
1
)
%
1024
;
int
ta_slot_temp
=
ta_command_pdu
->
ta_slot
+
ul_tx_timing_adjustment
+
NTN_UE_slot_Rx_to_Tx
;
ue
->
ta_slot
=
ta_slot_temp
%
slots_per_frame
;
if
(
ta_slot_temp
>
slots_per_frame
)
ue
->
ta_frame
=
(
ta_command_pdu
->
ta_frame
+
ta_slot_temp
/
slots_per_frame
)
%
1024
;
else
ue
->
ta_frame
=
ta_command_pdu
->
ta_frame
;
...
...
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