Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openairinterface-6g
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
OpenXG
openairinterface-6g
Commits
825c6803
Commit
825c6803
authored
Aug 26, 2025
by
rakesh mundlamuri
Committed by
Rakesh Mundlamuri
Nov 03, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
harmonize IQ samples in prs channel estimation to use c16_t
parent
5690aa0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+9
-9
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
+1
-1
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
825c6803
...
@@ -47,12 +47,12 @@
...
@@ -47,12 +47,12 @@
#define NO_INTERP 1
#define NO_INTERP 1
/* Generic function to find the peak of channel estimation buffer */
/* Generic function to find the peak of channel estimation buffer */
void
peak_estimator
(
int32
_t
*
buffer
,
int32_t
buf_len
,
int32_t
*
peak_idx
,
int32_t
*
peak_val
,
int32_t
mean_val
)
void
peak_estimator
(
c16
_t
*
buffer
,
int32_t
buf_len
,
int32_t
*
peak_idx
,
int32_t
*
peak_val
,
int32_t
mean_val
)
{
{
int32_t
max_val
=
0
,
max_idx
=
0
,
abs_val
=
0
;
int32_t
max_val
=
0
,
max_idx
=
0
,
abs_val
=
0
;
for
(
int
k
=
0
;
k
<
buf_len
;
k
++
)
for
(
int
k
=
0
;
k
<
buf_len
;
k
++
)
{
{
abs_val
=
squaredMod
(
((
c16_t
*
)
buffer
)
[
k
]);
abs_val
=
squaredMod
(
buffer
[
k
]);
if
(
abs_val
>
max_val
)
if
(
abs_val
>
max_val
)
{
{
max_val
=
abs_val
;
max_val
=
abs_val
;
...
@@ -83,8 +83,8 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -83,8 +83,8 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
prs_config_t
*
prs_cfg
=
&
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
rsc_id
].
prs_cfg
;
prs_config_t
*
prs_cfg
=
&
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
rsc_id
].
prs_cfg
;
prs_meas_t
**
prs_meas
=
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
rsc_id
].
prs_meas
;
prs_meas_t
**
prs_meas
=
ue
->
prs_vars
[
gNB_id
]
->
prs_resource
[
rsc_id
].
prs_meas
;
c16_t
ch_tmp_buf
[
ue
->
frame_parms
.
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
c16_t
ch_tmp_buf
[
ue
->
frame_parms
.
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
int32
_t
chF_interpol
[
frame_params
->
nb_antennas_rx
][
NR_PRS_IDFT_OVERSAMP_FACTOR
*
ue
->
frame_parms
.
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
c16
_t
chF_interpol
[
frame_params
->
nb_antennas_rx
][
NR_PRS_IDFT_OVERSAMP_FACTOR
*
ue
->
frame_parms
.
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
int32
_t
chT_interpol
[
frame_params
->
nb_antennas_rx
][
NR_PRS_IDFT_OVERSAMP_FACTOR
*
ue
->
frame_parms
.
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
c16
_t
chT_interpol
[
frame_params
->
nb_antennas_rx
][
NR_PRS_IDFT_OVERSAMP_FACTOR
*
ue
->
frame_parms
.
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
memset
(
ch_tmp_buf
,
0
,
sizeof
(
ch_tmp_buf
));
memset
(
ch_tmp_buf
,
0
,
sizeof
(
ch_tmp_buf
));
memset
(
chF_interpol
,
0
,
sizeof
(
chF_interpol
));
memset
(
chF_interpol
,
0
,
sizeof
(
chF_interpol
));
memset
(
chT_interpol
,
0
,
sizeof
(
chF_interpol
));
memset
(
chT_interpol
,
0
,
sizeof
(
chF_interpol
));
...
@@ -420,9 +420,9 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -420,9 +420,9 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
// Place PRS channel estimates in FFT shifted format
// Place PRS channel estimates in FFT shifted format
if
(
first_half
>
0
)
if
(
first_half
>
0
)
memcpy
(
(
int16_t
*
)
&
chF_interpol
[
rxAnt
][
start_offset
],
&
ch_tmp
[
0
],
first_half
*
sizeof
(
int32
_t
));
memcpy
(
&
chF_interpol
[
rxAnt
][
start_offset
],
&
ch_tmp
[
0
],
first_half
*
sizeof
(
c16
_t
));
if
(
second_half
>
0
)
if
(
second_half
>
0
)
memcpy
(
(
int16_t
*
)
&
chF_interpol
[
rxAnt
][
0
],
&
ch_tmp
[
first_half
],
second_half
*
sizeof
(
int32
_t
));
memcpy
(
&
chF_interpol
[
rxAnt
][
0
],
&
ch_tmp
[
first_half
],
second_half
*
sizeof
(
c16
_t
));
// Convert to time domain
// Convert to time domain
freq2time
(
NR_PRS_IDFT_OVERSAMP_FACTOR
*
frame_params
->
ofdm_symbol_size
,
freq2time
(
NR_PRS_IDFT_OVERSAMP_FACTOR
*
frame_params
->
ofdm_symbol_size
,
...
@@ -481,7 +481,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -481,7 +481,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
// T tracer dump
// T tracer dump
T
(
T_UE_PHY_INPUT_SIGNAL
,
T_INT
(
gNB_id
),
T
(
T_UE_PHY_INPUT_SIGNAL
,
T_INT
(
gNB_id
),
T_INT
(
proc
->
frame_rx
),
T_INT
(
proc
->
nr_slot_rx
),
T_INT
(
proc
->
frame_rx
),
T_INT
(
proc
->
nr_slot_rx
),
T_INT
(
rxAnt
),
T_BUFFER
(
&
rxdataF
[
rxAnt
][
0
],
frame_params
->
samples_per_slot_wCP
*
sizeof
(
int32
_t
)));
T_INT
(
rxAnt
),
T_BUFFER
(
&
rxdataF
[
rxAnt
][
0
],
frame_params
->
samples_per_slot_wCP
*
sizeof
(
c16
_t
)));
T
(
T_UE_PHY_DL_CHANNEL_ESTIMATE_FREQ
,
T
(
T_UE_PHY_DL_CHANNEL_ESTIMATE_FREQ
,
T_INT
(
gNB_id
),
T_INT
(
gNB_id
),
...
@@ -489,7 +489,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -489,7 +489,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
T_INT
(
proc
->
frame_rx
),
T_INT
(
proc
->
frame_rx
),
T_INT
(
proc
->
nr_slot_rx
),
T_INT
(
proc
->
nr_slot_rx
),
T_INT
(
rxAnt
),
T_INT
(
rxAnt
),
T_BUFFER
(
&
chF_interpol
[
rxAnt
][
0
],
NR_PRS_IDFT_OVERSAMP_FACTOR
*
frame_params
->
ofdm_symbol_size
*
sizeof
(
int32
_t
)));
T_BUFFER
(
&
chF_interpol
[
rxAnt
][
0
],
NR_PRS_IDFT_OVERSAMP_FACTOR
*
frame_params
->
ofdm_symbol_size
*
sizeof
(
c16
_t
)));
T
(
T_UE_PHY_DL_CHANNEL_ESTIMATE
,
T
(
T_UE_PHY_DL_CHANNEL_ESTIMATE
,
T_INT
(
gNB_id
),
T_INT
(
gNB_id
),
...
@@ -497,7 +497,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -497,7 +497,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
T_INT
(
proc
->
frame_rx
),
T_INT
(
proc
->
frame_rx
),
T_INT
(
proc
->
nr_slot_rx
),
T_INT
(
proc
->
nr_slot_rx
),
T_INT
(
rxAnt
),
T_INT
(
rxAnt
),
T_BUFFER
(
&
chT_interpol
[
rxAnt
][
0
],
NR_PRS_IDFT_OVERSAMP_FACTOR
*
frame_params
->
ofdm_symbol_size
*
sizeof
(
int32
_t
)));
T_BUFFER
(
&
chT_interpol
[
rxAnt
][
0
],
NR_PRS_IDFT_OVERSAMP_FACTOR
*
frame_params
->
ofdm_symbol_size
*
sizeof
(
c16
_t
)));
}
}
return
(
0
);
return
(
0
);
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
825c6803
...
@@ -39,7 +39,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -39,7 +39,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
]);
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
]);
/* Generic function to find the peak of channel estimation buffer */
/* Generic function to find the peak of channel estimation buffer */
void
peak_estimator
(
int32
_t
*
buffer
,
int32_t
buf_len
,
int32_t
*
peak_idx
,
int32_t
*
peak_val
,
int32_t
mean_val
);
void
peak_estimator
(
c16
_t
*
buffer
,
int32_t
buf_len
,
int32_t
*
peak_idx
,
int32_t
*
peak_val
,
int32_t
mean_val
);
/*!
/*!
\brief This function performs channel estimation including frequency and temporal interpolation
\brief This function performs channel estimation including frequency and temporal interpolation
...
...
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