Bugfix for number of PRBs in PUCCH format 2
This commit is contained in:
@@ -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,
|
uint16_t compute_pucch_prb_size(uint8_t format,
|
||||||
uint8_t nr_prbs,
|
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,
|
NR_PUCCH_MaxCodeRate_t *maxCodeRate,
|
||||||
uint8_t Qm,
|
uint8_t Qm,
|
||||||
uint8_t n_symb,
|
uint8_t n_symb,
|
||||||
uint8_t n_re_ctrl)
|
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_crc = compute_pucch_crc_size(O_uci);
|
||||||
int O_tot = O_uci + O_crc;
|
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,
|
uint16_t compute_pucch_prb_size(uint8_t format,
|
||||||
uint8_t nr_prbs,
|
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,
|
NR_PUCCH_MaxCodeRate_t *maxCodeRate,
|
||||||
uint8_t Qm,
|
uint8_t Qm,
|
||||||
uint8_t n_symb,
|
uint8_t n_symb,
|
||||||
|
|||||||
@@ -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->dmrs_scrambling_id = id0 != NULL ? *id0 : mac->physCellId;
|
||||||
pucch_pdu->prb_size = compute_pucch_prb_size(2,
|
pucch_pdu->prb_size = compute_pucch_prb_size(2,
|
||||||
pucchres->format.choice.format2->nrofPRBs,
|
pucchres->format.choice.format2->nrofPRBs,
|
||||||
n_uci,
|
pucch->n_csi,
|
||||||
|
pucch->n_harq,
|
||||||
|
pucch->n_sr,
|
||||||
pucch_Config->format2->choice.setup->maxCodeRate,
|
pucch_Config->format2->choice.setup->maxCodeRate,
|
||||||
2,
|
2,
|
||||||
pucchres->format.choice.format2->nrofSymbols,
|
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,
|
pucch_pdu->prb_size = compute_pucch_prb_size(3,
|
||||||
pucchres->format.choice.format3->nrofPRBs,
|
pucchres->format.choice.format3->nrofPRBs,
|
||||||
n_uci,
|
pucch->n_csi,
|
||||||
|
pucch->n_harq,
|
||||||
|
pucch->n_sr,
|
||||||
pucch_Config->format3->choice.setup->maxCodeRate,
|
pucch_Config->format3->choice.setup->maxCodeRate,
|
||||||
2 - pucch_pdu->pi_2bpsk,
|
2 - pucch_pdu->pi_2bpsk,
|
||||||
pucchres->format.choice.format3->nrofSymbols - f3_dmrs_symbols,
|
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->dmrs_scrambling_id = id0 ? *id0 : *scc->physCellId;
|
||||||
pucch_pdu->prb_size = compute_pucch_prb_size(2,
|
pucch_pdu->prb_size = compute_pucch_prb_size(2,
|
||||||
pucchres->format.choice.format2->nrofPRBs,
|
pucchres->format.choice.format2->nrofPRBs,
|
||||||
O_uci + O_sr,
|
O_csi,
|
||||||
|
O_ack,
|
||||||
|
O_sr,
|
||||||
pucch_Config->format2->choice.setup->maxCodeRate,
|
pucch_Config->format2->choice.setup->maxCodeRate,
|
||||||
2,
|
2,
|
||||||
pucchres->format.choice.format2->nrofSymbols,
|
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);
|
int f3_dmrs_symbols = get_f3_dmrs_symbols(pucchres, pucch_Config);
|
||||||
pucch_pdu->prb_size = compute_pucch_prb_size(3,
|
pucch_pdu->prb_size = compute_pucch_prb_size(3,
|
||||||
pucchres->format.choice.format3->nrofPRBs,
|
pucchres->format.choice.format3->nrofPRBs,
|
||||||
O_uci + O_sr,
|
O_csi,
|
||||||
|
O_ack,
|
||||||
|
O_sr,
|
||||||
pucch_Config->format3->choice.setup->maxCodeRate,
|
pucch_Config->format3->choice.setup->maxCodeRate,
|
||||||
2 - pucch_pdu->pi_2bpsk,
|
2 - pucch_pdu->pi_2bpsk,
|
||||||
pucchres->format.choice.format3->nrofSymbols - f3_dmrs_symbols,
|
pucchres->format.choice.format3->nrofSymbols - f3_dmrs_symbols,
|
||||||
|
|||||||
Reference in New Issue
Block a user