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
fff95cc0
Commit
fff95cc0
authored
Oct 29, 2025
by
Laurent THOMAS
Committed by
Robert Schmidt
Oct 30, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor rx_nr_prach
parent
d745e6fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+6
-7
No files found.
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
fff95cc0
...
...
@@ -409,7 +409,6 @@ void rx_nr_prach_ru(prach_item_t *p, int32_t **rxdata, NR_DL_FRAME_PARMS *fp, in
rx_prach_out_t
rx_nr_prach
(
const
prach_item_t
*
in
,
int
occasion
)
{
rx_prach_out_t
out
=
{};
c16_t
**
input
=
in
->
rxsigF
[
occasion
];
uint16_t
preamble_index0
=
0
;
uint16_t
numshift
=
0
;
int
first_nonzero_root_idx
=
0
;
...
...
@@ -453,7 +452,7 @@ rx_prach_out_t rx_nr_prach(const prach_item_t *in, int occasion)
int32_t
prach_ifft
[
dft_sz
]
__attribute__
((
aligned
(
32
)));
for
(
int
preamble_index
=
0
;
preamble_index
<
64
;
preamble_index
++
)
{
if
(
LOG_DEBUGFLAG
(
DEBUG_PRACH
))
{
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
in
put
[
0
],
N_ZC
==
839
?
840
:
140
));
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
in
->
rxsigF
[
occasion
]
[
0
],
N_ZC
==
839
?
840
:
140
));
if
(
en
>
60
)
LOG_D
(
PHY
,
"frame %d, slot %d : Trying preamble %d
\n
"
,
in
->
frame
,
in
->
slot
,
preamble_index
);
}
...
...
@@ -527,9 +526,9 @@ rx_prach_out_t rx_nr_prach(const prach_item_t *in, int occasion)
first_nonzero_root_idx
=
preamble_offset
;
}
// Compute DFT of RX signal (conjugate in
put
, results in conjugate output) for each new rootSequenceIndex
// Compute DFT of RX signal (conjugate in
->rxsigF[occasion]
, results in conjugate output) for each new rootSequenceIndex
if
(
LOG_DEBUGFLAG
(
DEBUG_PRACH
))
{
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
in
put
[
0
],
840
));
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
in
->
rxsigF
[
occasion
]
[
0
],
840
));
if
(
en
>
60
)
LOG_D
(
PHY
,
"frame %d, slot %d : preamble index %d, NCS %d, N_ZC/NCS %d: offset %d, preamble shift %d , en %d)
\n
"
,
...
...
@@ -558,14 +557,14 @@ rx_prach_out_t rx_nr_prach(const prach_item_t *in, int occasion)
memset
(
prach_ifft
,
0
,
sizeof
(
prach_ifft
));
if
(
LOG_DUMPFLAG
(
DEBUG_PRACH
))
{
LOG_M
(
"prach_rxF0.m"
,
"prach_rxF0"
,
in
put
[
0
],
N_ZC
,
1
,
1
);
LOG_M
(
"prach_rxF1.m"
,
"prach_rxF1"
,
in
put
[
1
],
6144
,
1
,
1
);
LOG_M
(
"prach_rxF0.m"
,
"prach_rxF0"
,
in
->
rxsigF
[
occasion
]
[
0
],
N_ZC
,
1
,
1
);
LOG_M
(
"prach_rxF1.m"
,
"prach_rxF1"
,
in
->
rxsigF
[
occasion
]
[
1
],
6144
,
1
,
1
);
}
c16_t
prachF
[
dft_sz
]
__attribute__
((
aligned
(
32
)));
for
(
int
aa
=
0
;
aa
<
nb_rx
;
aa
++
)
{
// Do componentwise product with Xu* on each antenna
for
(
int
offset
=
0
;
offset
<
N_ZC
;
offset
++
)
{
prachF
[
offset
]
=
c16MulConjShift
(
Xu
[
offset
],
in
put
[
aa
][
offset
],
15
);
prachF
[
offset
]
=
c16MulConjShift
(
Xu
[
offset
],
in
->
rxsigF
[
occasion
]
[
aa
][
offset
],
15
);
}
memset
(
prachF
+
N_ZC
,
0
,
sizeof
(
*
prachF
)
*
(
dft_sz
-
N_ZC
));
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
...
...
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