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
85b4057b
Commit
85b4057b
authored
Mar 17, 2026
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor PUCCH processing into its own function
Signed-off-by:
Robert Schmidt
<
robert.schmidt@openairinterface.org
>
parent
b15d3942
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
33 deletions
+29
-33
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+2
-2
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+3
-3
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+24
-28
No files found.
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
85b4057b
...
@@ -227,14 +227,14 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
...
@@ -227,14 +227,14 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
int
frame
,
int
frame
,
int
slot
,
int
slot
,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu
,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
);
const
nfapi_nr_pucch_pdu_t
*
pucch_pdu
);
void
nr_decode_pucch0
(
PHY_VARS_gNB
*
gNB
,
void
nr_decode_pucch0
(
PHY_VARS_gNB
*
gNB
,
c16_t
**
rxdataF
,
c16_t
**
rxdataF
,
int
frame
,
int
frame
,
int
slot
,
int
slot
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
);
const
nfapi_nr_pucch_pdu_t
*
pucch_pdu
);
#endif
/*__NR_TRANSPORT__H__*/
#endif
/*__NR_TRANSPORT__H__*/
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
85b4057b
...
@@ -66,7 +66,7 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_pucch_pdu_t
...
@@ -66,7 +66,7 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_pucch_pdu_t
LOG_W
(
PHY
,
"PUCCH list is full
\n
"
);
LOG_W
(
PHY
,
"PUCCH list is full
\n
"
);
}
}
int
get_pucch0_cs_lut_index
(
PHY_VARS_gNB
*
gNB
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
int
get_pucch0_cs_lut_index
(
PHY_VARS_gNB
*
gNB
,
const
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
{
int
i
=
0
;
int
i
=
0
;
...
@@ -129,7 +129,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -129,7 +129,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
int
frame
,
int
frame
,
int
slot
,
int
slot
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
const
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
int
soffset
=
(
slot
%
RU_RX_SLOT_DEPTH
)
*
frame_parms
->
symbols_per_slot
*
frame_parms
->
ofdm_symbol_size
;
int
soffset
=
(
slot
%
RU_RX_SLOT_DEPTH
)
*
frame_parms
->
symbols_per_slot
*
frame_parms
->
ofdm_symbol_size
;
...
@@ -1132,7 +1132,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
...
@@ -1132,7 +1132,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
int
frame
,
int
frame
,
int
slot
,
int
slot
,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu
,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
const
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
// pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
// pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
85b4057b
...
@@ -989,6 +989,28 @@ void nr_srs_rx_procedures(PHY_VARS_gNB *gNB,
...
@@ -989,6 +989,28 @@ void nr_srs_rx_procedures(PHY_VARS_gNB *gNB,
}
}
}
}
static
void
handle_pucch
(
PHY_VARS_gNB
*
gNB
,
c16_t
**
rxdataF
,
const
NR_gNB_PUCCH_t
*
pucch
,
nfapi_nr_uci_t
*
uci
)
{
const
nfapi_nr_pucch_pdu_t
*
pucch_pdu
=
&
pucch
->
pucch_pdu
;
switch
(
pucch_pdu
->
format_type
)
{
case
0
:
uci
->
pdu_type
=
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE
;
uci
->
pdu_size
=
sizeof
(
nfapi_nr_uci_pucch_pdu_format_0_1_t
);
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu_format0
=
&
uci
->
pucch_pdu_format_0_1
;
nr_decode_pucch0
(
gNB
,
rxdataF
,
pucch
->
frame
,
pucch
->
slot
,
uci_pdu_format0
,
pucch_pdu
);
break
;
case
2
:
uci
->
pdu_type
=
NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE
;
uci
->
pdu_size
=
sizeof
(
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
);
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu_format2
=
&
uci
->
pucch_pdu_format_2_3_4
;
nr_decode_pucch2
(
gNB
,
rxdataF
,
pucch
->
frame
,
pucch
->
slot
,
uci_pdu_format2
,
pucch_pdu
);
break
;
default:
AssertFatal
(
1
==
0
,
"Only PUCCH formats 0 and 2 are currently supported
\n
"
);
}
}
int
phy_procedures_gNB_uespec_RX
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
,
NR_UL_IND_t
*
UL_INFO
)
int
phy_procedures_gNB_uespec_RX
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
,
NR_UL_IND_t
*
UL_INFO
)
{
{
/* those variables to log T_GNB_PHY_PUCCH_PUSCH_IQ only when we try to decode */
/* those variables to log T_GNB_PHY_PUCCH_PUSCH_IQ only when we try to decode */
...
@@ -1022,44 +1044,18 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N
...
@@ -1022,44 +1044,18 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N
gNB_I0_measurements
(
gNB
,
slot_rx
,
first_symb
,
num_symb
,
rb_mask_ul
);
gNB_I0_measurements
(
gNB
,
slot_rx
,
first_symb
,
num_symb
,
rb_mask_ul
);
}
}
const
int
soffset
=
(
slot_rx
&
3
)
*
frame_parms
->
symbols_per_slot
*
ofdm_symbol_size
;
start_meas
(
&
gNB
->
phy_proc_rx
);
start_meas
(
&
gNB
->
phy_proc_rx
);
for
(
int
i
=
0
;
i
<
gNB
->
max_nb_pucch
;
i
++
)
{
for
(
int
i
=
0
;
i
<
gNB
->
max_nb_pucch
;
i
++
)
{
NR_gNB_PUCCH_t
*
pucch
=
&
gNB
->
pucch
[
i
];
NR_gNB_PUCCH_t
*
pucch
=
&
gNB
->
pucch
[
i
];
if
(
!
(
pucch
&&
pucch
->
active
&&
pucch
->
frame
==
frame_rx
&&
pucch
->
slot
==
slot_rx
))
if
(
!
(
pucch
&&
pucch
->
active
&&
pucch
->
frame
==
frame_rx
&&
pucch
->
slot
==
slot_rx
))
continue
;
continue
;
c16_t
**
rxdataF
=
gNB
->
common_vars
.
rxdataF
[
pucch
->
beam_nb
];
c16_t
**
rxdataF
=
gNB
->
common_vars
.
rxdataF
[
pucch
->
beam_nb
];
pucch_decode_done
=
1
;
pucch_decode_done
=
1
;
nfapi_nr_pucch_pdu_t
*
pucch_pdu
=
&
pucch
->
pucch_pdu
;
UL_INFO
->
uci_ind
.
uci_list
=
UL_INFO
->
uci_pdu_list
;
UL_INFO
->
uci_ind
.
uci_list
=
UL_INFO
->
uci_pdu_list
;
nfapi_nr_uci_t
*
uci
=
UL_INFO
->
uci_ind
.
uci_list
+
UL_INFO
->
uci_ind
.
num_ucis
;
UL_INFO
->
uci_ind
.
sfn
=
frame_rx
;
UL_INFO
->
uci_ind
.
sfn
=
frame_rx
;
UL_INFO
->
uci_ind
.
slot
=
slot_rx
;
UL_INFO
->
uci_ind
.
slot
=
slot_rx
;
switch
(
pucch_pdu
->
format_type
)
{
nfapi_nr_uci_t
*
uci
=
UL_INFO
->
uci_ind
.
uci_list
+
UL_INFO
->
uci_ind
.
num_ucis
;
case
0
:
handle_pucch
(
gNB
,
rxdataF
,
pucch
,
uci
);
uci
->
pdu_type
=
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE
;
uci
->
pdu_size
=
sizeof
(
nfapi_nr_uci_pucch_pdu_format_0_1_t
);
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu_format0
=
&
uci
->
pucch_pdu_format_0_1
;
int
offset
=
pucch_pdu
->
start_symbol_index
*
ofdm_symbol_size
+
(
frame_parms
->
first_carrier_offset
+
pucch_pdu
->
prb_start
*
12
);
LOG_D
(
NR_PHY
,
"frame %d, slot %d: PUCCH signal energy %d
\n
"
,
frame_rx
,
slot_rx
,
signal_energy_nodc
(
&
rxdataF
[
0
][
soffset
+
offset
],
12
));
nr_decode_pucch0
(
gNB
,
rxdataF
,
frame_rx
,
slot_rx
,
uci_pdu_format0
,
pucch_pdu
);
break
;
case
2
:
uci
->
pdu_type
=
NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE
;
uci
->
pdu_size
=
sizeof
(
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
);
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu_format2
=
&
uci
->
pucch_pdu_format_2_3_4
;
LOG_D
(
PHY
,
"%d.%d Calling nr_decode_pucch2
\n
"
,
frame_rx
,
slot_rx
);
nr_decode_pucch2
(
gNB
,
rxdataF
,
frame_rx
,
slot_rx
,
uci_pdu_format2
,
pucch_pdu
);
break
;
default:
AssertFatal
(
1
==
0
,
"Only PUCCH formats 0 and 2 are currently supported
\n
"
);
}
UL_INFO
->
uci_ind
.
num_ucis
+=
1
;
UL_INFO
->
uci_ind
.
num_ucis
+=
1
;
pucch
->
active
=
false
;
pucch
->
active
=
false
;
}
}
...
...
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