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
b378acf2
Commit
b378acf2
authored
Oct 22, 2025
by
Rakesh Mundlamuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce SRS oversampling for better accuracy in estimating nanoseconds
parent
7846d83b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
22 deletions
+38
-22
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
+5
-4
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+21
-9
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
+5
-4
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+1
-1
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+1
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+5
-4
No files found.
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
View file @
b378acf2
...
@@ -37,12 +37,12 @@
...
@@ -37,12 +37,12 @@
#define I0_SKIP_DC 1
#define I0_SKIP_DC 1
int
nr_est_timing_advance_srs
(
const
NR_DL_FRAME_PARMS
*
frame_parms
,
int
nr_est_timing_advance_srs
(
const
NR_DL_FRAME_PARMS
*
frame_parms
,
const
c16_t
srs_estimated_channel_time
[][
frame_parms
->
ofdm_symbol_size
])
const
c16_t
srs_estimated_channel_time
[][
NR_SRS_IDFT_OVERSAMP_FACTOR
*
frame_parms
->
ofdm_symbol_size
])
{
{
int
timing_advance
=
0
;
int
timing_advance
=
0
;
int
max_val
=
0
;
int
max_val
=
0
;
for
(
int
i
=
0
;
i
<
frame_parms
->
ofdm_symbol_size
;
i
++
)
{
for
(
int
i
=
0
;
i
<
NR_SRS_IDFT_OVERSAMP_FACTOR
*
frame_parms
->
ofdm_symbol_size
;
i
++
)
{
int
temp
=
0
;
int
temp
=
0
;
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
int
Re
=
((
c16_t
*
)
srs_estimated_channel_time
[
aa
])[
i
].
r
;
int
Re
=
((
c16_t
*
)
srs_estimated_channel_time
[
aa
])[
i
].
r
;
...
@@ -55,9 +55,10 @@ int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
...
@@ -55,9 +55,10 @@ int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
}
}
}
}
if
(
timing_advance
>
frame_parms
->
ofdm_symbol_size
/
2
)
{
if
(
timing_advance
>
(
NR_SRS_IDFT_OVERSAMP_FACTOR
*
frame_parms
->
ofdm_symbol_size
)
/
2
)
{
timing_advance
=
timing_advance
-
frame_parms
->
ofdm_symbol_size
;
timing_advance
=
timing_advance
-
(
NR_SRS_IDFT_OVERSAMP_FACTOR
*
frame_parms
->
ofdm_symbol_size
)
;
}
}
timing_advance
=
timing_advance
/
NR_SRS_IDFT_OVERSAMP_FACTOR
;
LOG_I
(
NR_PHY
,
"Estimated SRS ToA %d
\n
"
,
timing_advance
);
LOG_I
(
NR_PHY
,
"Estimated SRS ToA %d
\n
"
,
timing_advance
);
...
...
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
b378acf2
...
@@ -780,8 +780,8 @@ int nr_srs_channel_estimation(int ant,
...
@@ -780,8 +780,8 @@ int nr_srs_channel_estimation(int ant,
c16_t
srs_received_signal
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_received_signal
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_received_noise
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_received_noise
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_freq
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_freq
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_time
[
ofdm_symbol_size
],
c16_t
srs_estimated_channel_time
[
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
],
c16_t
srs_estimated_channel_time_shifted
[
ofdm_symbol_size
],
c16_t
srs_estimated_channel_time_shifted
[
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
],
uint32_t
*
signal_power
,
uint32_t
*
signal_power
,
uint32_t
*
noise_power
,
uint32_t
*
noise_power
,
int16_t
*
noise_power_per_rb
)
int16_t
*
noise_power_per_rb
)
...
@@ -959,15 +959,27 @@ int nr_srs_channel_estimation(int ant,
...
@@ -959,15 +959,27 @@ int nr_srs_channel_estimation(int ant,
#endif
#endif
// Convert to time domain
// Convert to time domain
freq2time
(
ofdm_symbol_size
,
(
int16_t
*
)
srs_estimated_channel_freq
,
(
int16_t
*
)
srs_estimated_channel_time
);
int16_t
ofdm_symbol_size_half
=
ofdm_symbol_size
>>
1
;
int16_t
ofdm_os_size
=
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
;
int16_t
ofdm_os_size_half
=
ofdm_os_size
>>
1
;
int16_t
start_offset
=
ofdm_os_size
-
ofdm_symbol_size_half
;
memcpy
(
srs_estimated_channel_time_shifted
,
c16_t
chF_interpol
[
ofdm_os_size
]
__attribute__
((
aligned
(
32
)));
&
srs_estimated_channel_time
[
ofdm_symbol_size
>>
1
],
memset
(
chF_interpol
,
0
,
sizeof
(
chF_interpol
));
(
ofdm_symbol_size
>>
1
)
*
sizeof
(
c16_t
));
memcpy
(
&
srs_estimated_channel_time_shifted
[
ofdm_symbol_size
>>
1
],
// Place SRS channel estimates in FFT shifted format for oversampling
srs_estimated_channel_time
,
memcpy
(
&
chF_interpol
[
0
],
&
srs_estimated_channel_freq
[
0
],
ofdm_symbol_size_half
*
sizeof
(
c16_t
));
(
ofdm_symbol_size
>>
1
)
*
sizeof
(
c16_t
));
memcpy
(
&
chF_interpol
[
start_offset
],
&
srs_estimated_channel_freq
[
ofdm_symbol_size_half
],
ofdm_symbol_size_half
*
sizeof
(
c16_t
));
// Convert to time domain oversampled
freq2time
(
ofdm_os_size
,
(
int16_t
*
)
chF_interpol
,
(
int16_t
*
)
srs_estimated_channel_time
);
// Do FFT shift
memcpy
(
srs_estimated_channel_time_shifted
,
&
srs_estimated_channel_time
[
ofdm_os_size_half
],
ofdm_os_size_half
*
sizeof
(
c16_t
));
memcpy
(
&
srs_estimated_channel_time_shifted
[
ofdm_os_size_half
],
srs_estimated_channel_time
,
ofdm_os_size_half
*
sizeof
(
c16_t
));
// Compute wideband SNR
// Compute wideband SNR
int
tot_subcarriers
=
m_SRS_b
*
NR_NB_SC_PER_RB
;
int
tot_subcarriers
=
m_SRS_b
*
NR_NB_SC_PER_RB
;
...
...
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
View file @
b378acf2
...
@@ -59,8 +59,9 @@ void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
...
@@ -59,8 +59,9 @@ void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
void
gNB_I0_measurements
(
PHY_VARS_gNB
*
gNB
,
int
slot
,
int
first_symb
,
int
num_symb
,
uint32_t
rb_mask_ul
[
14
][
9
]);
void
gNB_I0_measurements
(
PHY_VARS_gNB
*
gNB
,
int
slot
,
int
first_symb
,
int
num_symb
,
uint32_t
rb_mask_ul
[
14
][
9
]);
int
nr_est_timing_advance_srs
(
const
NR_DL_FRAME_PARMS
*
frame_parms
,
int
nr_est_timing_advance_srs
(
const
c16_t
srs_estimated_channel_time
[][
frame_parms
->
ofdm_symbol_size
]);
const
NR_DL_FRAME_PARMS
*
frame_parms
,
const
c16_t
srs_estimated_channel_time
[][
NR_SRS_IDFT_OVERSAMP_FACTOR
*
frame_parms
->
ofdm_symbol_size
]);
void
nr_pusch_ptrs_processing
(
PHY_VARS_gNB
*
gNB
,
void
nr_pusch_ptrs_processing
(
PHY_VARS_gNB
*
gNB
,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_DL_FRAME_PARMS
*
frame_parms
,
...
@@ -81,8 +82,8 @@ int nr_srs_channel_estimation(int ant,
...
@@ -81,8 +82,8 @@ int nr_srs_channel_estimation(int ant,
c16_t
srs_received_signal
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_received_signal
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_received_noise
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_received_noise
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_freq
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_freq
[
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_time
[
ofdm_symbol_size
],
c16_t
srs_estimated_channel_time
[
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
],
c16_t
srs_estimated_channel_time_shifted
[
ofdm_symbol_size
],
c16_t
srs_estimated_channel_time_shifted
[
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
],
uint32_t
*
signal_power
,
uint32_t
*
signal_power
,
uint32_t
*
noise_power
,
uint32_t
*
noise_power
,
int16_t
*
noise_power_per_rb
);
int16_t
*
noise_power_per_rb
);
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
b378acf2
...
@@ -242,7 +242,7 @@ void nr_srs_rx_procedures(PHY_VARS_gNB *gNB,
...
@@ -242,7 +242,7 @@ void nr_srs_rx_procedures(PHY_VARS_gNB *gNB,
nr_srs_info_t
*
nr_srs_info
,
nr_srs_info_t
*
nr_srs_info
,
int
*
srs_est
,
int
*
srs_est
,
c16_t
srs_estimated_channel_freq
[][
N_ap
][
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_freq
[][
N_ap
][
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_time
[][
N_ap
][
ofdm_symbol_size
],
c16_t
srs_estimated_channel_time
[][
N_ap
][
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
],
int16_t
*
snr_per_rb
);
int16_t
*
snr_per_rb
);
int
get_nr_prach_duration
(
uint8_t
prach_format
);
int
get_nr_prach_duration
(
uint8_t
prach_format
);
...
...
openair1/PHY/defs_gNB.h
View file @
b378acf2
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
#define MAX_NUM_RU_PER_gNB 8
#define MAX_NUM_RU_PER_gNB 8
#define MAX_PUCCH0_NID 8
#define MAX_PUCCH0_NID 8
#define NR_SRS_IDFT_OVERSAMP_FACTOR 2
typedef
struct
{
typedef
struct
{
int
nb_id
;
int
nb_id
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
b378acf2
...
@@ -868,14 +868,14 @@ void nr_srs_rx_procedures(PHY_VARS_gNB *gNB,
...
@@ -868,14 +868,14 @@ void nr_srs_rx_procedures(PHY_VARS_gNB *gNB,
nr_srs_info_t
*
nr_srs_info
,
nr_srs_info_t
*
nr_srs_info
,
int
*
srs_est
,
int
*
srs_est
,
c16_t
srs_estimated_channel_freq
[][
N_ap
][
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_freq
[][
N_ap
][
ofdm_symbol_size
*
N_symb_SRS
],
c16_t
srs_estimated_channel_time
[][
N_ap
][
ofdm_symbol_size
],
c16_t
srs_estimated_channel_time
[][
N_ap
][
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
],
int16_t
*
snr_per_rb
)
int16_t
*
snr_per_rb
)
{
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
nfapi_nr_srs_pdu_t
*
srs_pdu
=
&
srs
->
srs_pdu
;
nfapi_nr_srs_pdu_t
*
srs_pdu
=
&
srs
->
srs_pdu
;
c16_t
srs_received_signal
[
nb_antennas_rx
][
ofdm_symbol_size
*
N_symb_SRS
];
c16_t
srs_received_signal
[
nb_antennas_rx
][
ofdm_symbol_size
*
N_symb_SRS
];
c16_t
srs_received_noise
[
nb_antennas_rx
][
ofdm_symbol_size
*
N_symb_SRS
];
c16_t
srs_received_noise
[
nb_antennas_rx
][
ofdm_symbol_size
*
N_symb_SRS
];
c16_t
srs_estimated_channel_time_shifted
[
nb_antennas_rx
][
N_ap
][
ofdm_symbol_size
];
c16_t
srs_estimated_channel_time_shifted
[
nb_antennas_rx
][
N_ap
][
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
];
start_meas
(
&
gNB
->
generate_srs_stats
);
start_meas
(
&
gNB
->
generate_srs_stats
);
...
@@ -946,7 +946,7 @@ void nr_srs_rx_procedures(PHY_VARS_gNB *gNB,
...
@@ -946,7 +946,7 @@ void nr_srs_rx_procedures(PHY_VARS_gNB *gNB,
T_INT
(
frame_rx
),
T_INT
(
frame_rx
),
T_INT
(
0
),
T_INT
(
0
),
T_INT
(
0
),
T_INT
(
0
),
T_BUFFER
(
srs_estimated_channel_time_shifted
[
0
][
0
],
ofdm_symbol_size
*
sizeof
(
int32_t
)));
T_BUFFER
(
srs_estimated_channel_time_shifted
[
0
][
0
],
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
*
sizeof
(
int32_t
)));
T
(
T_GNB_PHY_UL_SNR_ESTIMATE
,
T
(
T_GNB_PHY_UL_SNR_ESTIMATE
,
T_INT
(
0
),
T_INT
(
0
),
...
@@ -1171,7 +1171,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N
...
@@ -1171,7 +1171,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N
int
srs_est
;
int
srs_est
;
c16_t
srs_estimated_channel_freq
[
nb_antennas_rx
][
N_ap
][
ofdm_symbol_size
*
N_symb_SRS
]
__attribute__
((
aligned
(
32
)));
c16_t
srs_estimated_channel_freq
[
nb_antennas_rx
][
N_ap
][
ofdm_symbol_size
*
N_symb_SRS
]
__attribute__
((
aligned
(
32
)));
c16_t
srs_estimated_channel_time
[
nb_antennas_rx
][
N_ap
][
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
c16_t
srs_estimated_channel_time
[
nb_antennas_rx
][
N_ap
][
NR_SRS_IDFT_OVERSAMP_FACTOR
*
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
nr_srs_rx_procedures
(
gNB
,
nr_srs_rx_procedures
(
gNB
,
frame_rx
,
frame_rx
,
...
...
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