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
Michael Black
OpenXG-RAN
Commits
28c015db
Commit
28c015db
authored
May 25, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_UE_fix_timing_adjust' into integration_2023_w21
parents
7c7d54e4
9825842e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
27 deletions
+23
-27
executables/nr-ue.c
executables/nr-ue.c
+7
-18
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
+4
-0
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+1
-1
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+1
-0
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+10
-8
No files found.
executables/nr-ue.c
View file @
28c015db
...
...
@@ -734,16 +734,6 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
}
}
int
computeSamplesShift
(
PHY_VARS_NR_UE
*
UE
)
{
int
samples_shift
=
-
(
UE
->
rx_offset
>>
1
);
if
(
samples_shift
!=
0
)
{
LOG_I
(
NR_PHY
,
"Adjusting frame in time by %i samples
\n
"
,
samples_shift
);
UE
->
rx_offset
=
0
;
// reset so that it is not applied falsely in case of SSB being only in every second frame
UE
->
max_pos_fil
+=
samples_shift
<<
15
;
// reset IIR filter when sample shift is applied
}
return
samples_shift
;
}
static
inline
int
get_firstSymSamp
(
uint16_t
slot
,
NR_DL_FRAME_PARMS
*
fp
)
{
if
(
fp
->
numerology_index
==
0
)
return
fp
->
nb_prefix_samples0
+
fp
->
ofdm_symbol_size
;
...
...
@@ -904,14 +894,13 @@ void *UE_thread(void *arg) {
int
readBlockSize
,
writeBlockSize
;
if
(
slot_nr
<
(
nb_slot_frame
-
1
))
{
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
);
}
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
)
%
nb_slot_frame
,
&
UE
->
frame_parms
)
-
UE
->
rx_offset_diff
;
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
))
{
const
int
sampShift
=
-
(
UE
->
rx_offset
>>
1
);
readBlockSize
-=
sampShift
;
writeBlockSize
-=
sampShift
;
UE
->
apply_timing_offset
=
false
;
}
AssertFatal
(
readBlockSize
==
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
View file @
28c015db
...
...
@@ -94,6 +94,10 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
else
ue
->
rx_offset
=
diff
;
const
int
sample_shift
=
-
(
ue
->
rx_offset
>>
1
);
// reset IIR filter for next offset calculation
ue
->
max_pos_fil
+=
sample_shift
<<
15
;
if
(
abs
(
diff
)
<
5
)
count_max_pos_ok
++
;
else
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
28c015db
...
...
@@ -284,7 +284,7 @@ void nr_processDLSegment(void* arg) {
if
(
no_iteration_ldpc
>
dlsch
->
max_ldpc_iterations
)
no_iteration_ldpc
=
dlsch
->
max_ldpc_iterations
;
}
else
{
LOG_
I
(
PHY
,
"%d.%d CRC NOT OK
\n
"
,
rdata
->
proc
->
frame_rx
,
rdata
->
proc
->
nr_slot_rx
);
LOG_
D
(
PHY
,
"%d.%d CRC NOT OK
\n
"
,
rdata
->
proc
->
frame_rx
,
rdata
->
proc
->
nr_slot_rx
);
no_iteration_ldpc
=
dlsch
->
max_ldpc_iterations
+
1
;
}
...
...
openair1/PHY/defs_nr_UE.h
View file @
28c015db
...
...
@@ -516,6 +516,7 @@ typedef struct {
int
rx_offset
;
/// Timing offset
int
rx_offset_diff
;
/// Timing adjustment for ofdm symbol0 on HW USRP
int
max_pos_fil
;
/// Timing offset IIR filter
bool
apply_timing_offset
;
/// Do time sync for current frame
int
time_sync_cell
;
/// Timing Advance updates variables
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
28c015db
...
...
@@ -352,12 +352,12 @@ void nr_ue_measurement_procedures(uint16_t l,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_MEASUREMENT_PROCEDURES
,
VCD_FUNCTION_OUT
);
}
static
void
nr_ue_pbch_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
estimateSz
,
struct
complex16
dl_ch_estimates
[][
estimateSz
],
nr_phy_data_t
*
phy_data
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
{
static
int
nr_ue_pbch_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
estimateSz
,
struct
complex16
dl_ch_estimates
[][
estimateSz
],
nr_phy_data_t
*
phy_data
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
{
int
ret
=
0
;
DevAssert
(
ue
);
...
...
@@ -420,6 +420,7 @@ static void nr_ue_pbch_procedures(PHY_VARS_NR_UE *ue,
}
return
ret
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES
,
VCD_FUNCTION_OUT
);
}
...
...
@@ -929,9 +930,9 @@ void pbch_pdcch_processing(PHY_VARS_NR_UE *ue,
if
(
ssb_index
==
fp
->
ssb_index
)
{
LOG_D
(
PHY
,
" ------ Decode MIB: frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
);
nr_ue_pbch_procedures
(
ue
,
proc
,
estimateSz
,
dl_ch_estimates
,
phy_data
,
rxdataF
);
const
int
pbchSuccess
=
nr_ue_pbch_procedures
(
ue
,
proc
,
estimateSz
,
dl_ch_estimates
,
phy_data
,
rxdataF
);
if
(
ue
->
no_timing_correction
==
0
)
{
if
(
ue
->
no_timing_correction
==
0
&&
pbchSuccess
==
0
)
{
LOG_D
(
PHY
,
"start adjust sync slot = %d no timing %d
\n
"
,
nr_slot_rx
,
ue
->
no_timing_correction
);
nr_adjust_synch_ue
(
fp
,
ue
,
...
...
@@ -943,6 +944,7 @@ void pbch_pdcch_processing(PHY_VARS_NR_UE *ue,
0
,
16384
);
}
ue
->
apply_timing_offset
=
true
;
}
LOG_D
(
PHY
,
"Doing N0 measurements in %s
\n
"
,
__FUNCTION__
);
nr_ue_rrc_measurements
(
ue
,
proc
,
rxdataF
);
...
...
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