Merge remote-tracking branch 'origin/bugfix_pucch2_prb_size' into integration_2025_w16 (!3121)

Bugfix for number of PRBs in PUCCH format 2

[TS 38.213 - Section 9.2.1 PUCCH Resource Sets] If the format indicates
PUCCH-format2 or PUCCH-format3, the PUCCH format configured for a PUCCH resource
is PUCCH format 2 or PUCCH format 3, respectively, where the PUCCH resource also
includes a number of PRBs provided by nrofPRBs, a number of symbols for a PUCCH
transmission provided by nrofSymbols, and a first symbol for the PUCCH
transmission provided by startingSymbolIndex.

[TS 38.213 - Section 9.2.3 UE procedure for reporting HARQ-ACK] If a UE transmits
a PUCCH with O_ACK HARQ-ACK information bits and O_CRC bits using PUCCH format 2
or PUCCH format 3 in a PUCCH resource that includes M_PUCCH_RB PRBs, the UE
determines a number of PRBs M_PUCCH_RB_min for the PUCCH transmission to be the
minimum number of PRBs (...)

[TS 38.213 - Section 9.2.5.1 UE procedure for multiplexing HARQ-ACK or CSI and
SR in a PUCCH] If a UE transmits a PUCCH with O_ACK HARQ-ACK information bits,
O_SR = ⌈log2(K+1)⌉ SR bits, and O_CRC CRC bits using PUCCH format 2 or PUCCH
format 3 in a PUCCH resource that includes M_PUCCH_RB PRBs, the UE determines
a number of PRBs M_PUCCH_RB_min for the PUCCH transmission to be the minimum
number of PRBs (...)

[TS 38.213 - Section 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR/CSI in
a PUCCH] If a UE has HARQ-ACK, SR and wideband or sub-band CSI reports to
transmit and the UE determines a PUCCH resource with PUCCH format 2, or the UE
has HARQ-ACK, SR and wideband CSI reports to transmit and the UE determines a
PUCCH resource with PUCCH format 3 or PUCCH format 4, where (...) the UE
transmits the HARQ-ACK, SR, and CSI reports bits by selecting the minimum number
PUCCH M_PUCCH_RB_min of the M_PUCCH_RB PRBs satisfying (...)

[TS 38.213 - Section 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR/CSI in a
PUCCH] If a UE has one or more CSI reports and zero or more HARQ-ACK/SR
information bits to transmit in a PUCCH where the HARQ-ACK, if any, is in
response to a PDSCH reception without a corresponding PDCCH; if any of the CSI
reports are overlapping (...); else, the UE transmits the
O_ACK + O_SR + O_CSI + O_CRC bits in a PUCCH resource provided by
pucch-CSI-ResourceList and determined as described in clause 9.2.5

Therefore, the number of PRBs to be used by PUCCH-format2 is M_PUCCH_RB_min,
except if we have zero HARQ-ACK bits, or if we have any HARQ-ACK, is in response
to a PDSCH reception without a corresponding PDCCH. In this case, we must use
the resources indicated in the pucch-CSI-ResourceList and determined as described
in clause 9.2.5.

In OAI, we have:
asn1cSeqAdd(&csirep->reportConfigType.choice.periodic->pucch_CSI_ResourceList.list, pucchcsires);

Where the resource added to the list corresponds to:

pucchres2->pucch_ResourceId = *pucchressetid;
pucchres2->startingPRB = 0;
pucchres2->intraSlotFrequencyHopping = NULL;
pucchres2->secondHopPRB = NULL;
pucchres2->format.present = NR_PUCCH_Resource__format_PR_format2;
pucchres2->format.choice.format2 = calloc(1,sizeof(*pucchres2->format.choice.format2));
pucchres2->format.choice.format2->nrofPRBs = 8;
pucchres2->format.choice.format2->nrofSymbols = 1;
pucchres2->format.choice.format2->startingSymbolIndex = 13;

Currently, in develop branch, we get these prb_size for PUCCH-format2:

[NR_RRC]   NGAP_PDUSESSION_SETUP_RESP: sending the message
[NGAP]   pdusession_setup_resp_p: pdusession ID 1, gnb_addr 172.31.0.1, SIZE 4, TEID 1579669408
[NR_MAC]   (596.3) pucch_pdu->prb_size = 4
[NR_MAC]   (596.4) pucch_pdu->prb_size = 3
[NR_MAC]   (600.3) pucch_pdu->prb_size = 4
[NR_MAC]   (600.4) pucch_pdu->prb_size = 3
[NR_MAC]   (604.3) pucch_pdu->prb_size = 4
[NR_MAC]   (604.4) pucch_pdu->prb_size = 3
[NR_MAC]   (608.3) pucch_pdu->prb_size = 4

While in QXDM we have Num RB = 8, whenever we have zero HARQ-ACK bits:

UCI Request BMask =             ACK_NACK_RPT | CSI_RPT
               Start symbol = 13
               Num Symbols = 1
               Starting RB = 0
               REL16 DMRS EN = 0
               Dual Pol Status = 0
               Num RB = 2
               Freq Hopping Flag =          HOP_MOD_NEITHER
               Second Hop RB = NA
               Num HARQ ACK Bits = 1
               Num SR Bits = 0
               Num UCI P1 Bits = 8

UCI Request BMask =             ACK_NACK_RPT | CSI_RPT
               Start symbol = 13
               Num Symbols = 1
               Starting RB = 0
               REL16 DMRS EN = 0
               Dual Pol Status = 0
               Num RB = 3
               Freq Hopping Flag =          HOP_MOD_NEITHER
               Second Hop RB = NA
               Num HARQ ACK Bits = 3
               Num SR Bits = 0
               Num UCI P1 Bits = 13

UCI Request BMask =                            CSI_RPT
               Start symbol = 13
               Num Symbols = 1
               Starting RB = 0
               REL16 DMRS EN = 0
               Dual Pol Status = 0
               Num RB = 8
               Freq Hopping Flag =          HOP_MOD_NEITHER
               Second Hop RB = NA
               Num HARQ ACK Bits = 0
               Num SR Bits = 0
               Num UCI P1 Bits = 10

UCI Request BMask =                   CSI_RPT | SR_RPT
               Start symbol = 13
               Num Symbols = 1
               Starting RB = 0
               REL16 DMRS EN = 0
               Dual Pol Status = 0
               Num RB = 8
               Freq Hopping Flag =          HOP_MOD_NEITHER
               Second Hop RB = NA
               Num HARQ ACK Bits = 0
               Num SR Bits = 1
               Num UCI P1 Bits = 11

Therefore, this MR fixes the prb_size, so that the number of PUCCH-format2 PRBs matches correctly.
This commit is contained in:
Jaroslava Fiedlerova
2025-04-18 14:24:07 +02:00
4 changed files with 25 additions and 6 deletions
+10 -1
View File
@@ -4305,12 +4305,21 @@ int get_f3_dmrs_symbols(NR_PUCCH_Resource_t *pucchres, NR_PUCCH_Config_t *pucch_
uint16_t compute_pucch_prb_size(uint8_t format,
uint8_t nr_prbs,
uint16_t O_uci,
uint16_t O_csi,
uint16_t O_ack,
uint8_t O_sr,
NR_PUCCH_MaxCodeRate_t *maxCodeRate,
uint8_t Qm,
uint8_t n_symb,
uint8_t n_re_ctrl)
{
// TODO: Consider also the case where there is a HARQ-ACK in response to a PDSCH reception without a corresponding PDCCH
// as described in the 3GPP TS 38.213 - Section 9.2.5.2
if (O_csi > 0 && O_ack == 0) {
return nr_prbs;
}
int O_uci = O_csi + O_ack + O_sr;
int O_crc = compute_pucch_crc_size(O_uci);
int O_tot = O_uci + O_crc;
@@ -254,7 +254,9 @@ uint8_t get_pusch_nb_antenna_ports(NR_PUSCH_Config_t *pusch_Config,
uint16_t compute_pucch_prb_size(uint8_t format,
uint8_t nr_prbs,
uint16_t O_uci,
uint16_t O_csi,
uint16_t O_ack,
uint8_t O_sr,
NR_PUCCH_MaxCodeRate_t *maxCodeRate,
uint8_t Qm,
uint8_t n_symb,
+6 -2
View File
@@ -1633,7 +1633,9 @@ int nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
pucch_pdu->dmrs_scrambling_id = id0 != NULL ? *id0 : mac->physCellId;
pucch_pdu->prb_size = compute_pucch_prb_size(2,
pucchres->format.choice.format2->nrofPRBs,
n_uci,
pucch->n_csi,
pucch->n_harq,
pucch->n_sr,
pucch_Config->format2->choice.setup->maxCodeRate,
2,
pucchres->format.choice.format2->nrofSymbols,
@@ -1666,7 +1668,9 @@ int nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
}
pucch_pdu->prb_size = compute_pucch_prb_size(3,
pucchres->format.choice.format3->nrofPRBs,
n_uci,
pucch->n_csi,
pucch->n_harq,
pucch->n_sr,
pucch_Config->format3->choice.setup->maxCodeRate,
2 - pucch_pdu->pi_2bpsk,
pucchres->format.choice.format3->nrofSymbols - f3_dmrs_symbols,
@@ -1023,7 +1023,9 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t *pucch_pdu,
pucch_pdu->dmrs_scrambling_id = id0 ? *id0 : *scc->physCellId;
pucch_pdu->prb_size = compute_pucch_prb_size(2,
pucchres->format.choice.format2->nrofPRBs,
O_uci + O_sr,
O_csi,
O_ack,
O_sr,
pucch_Config->format2->choice.setup->maxCodeRate,
2,
pucchres->format.choice.format2->nrofSymbols,
@@ -1047,7 +1049,9 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t *pucch_pdu,
int f3_dmrs_symbols = get_f3_dmrs_symbols(pucchres, pucch_Config);
pucch_pdu->prb_size = compute_pucch_prb_size(3,
pucchres->format.choice.format3->nrofPRBs,
O_uci + O_sr,
O_csi,
O_ack,
O_sr,
pucch_Config->format3->choice.setup->maxCodeRate,
2 - pucch_pdu->pi_2bpsk,
pucchres->format.choice.format3->nrofSymbols - f3_dmrs_symbols,