Fix AckNack and SR multiplexing in PUCCH2
- correctly reset HARQ structure for HARQ Ack/Nack/PUCCH0 - reduce max PUCCH2 bits to have room for SR
This commit is contained in:
committed by
Robert Schmidt
parent
7f910a2e36
commit
8c81c70de9
@@ -370,6 +370,7 @@ void nr_decode_pucch1(int32_t **rxdataF,
|
||||
uint8_t nr_bit);
|
||||
|
||||
void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t* uci_pdu,
|
||||
nfapi_nr_pucch_pdu_t* pucch_pdu);
|
||||
@@ -380,10 +381,5 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
nfapi_nr_uci_pucch_pdu_format_0_1_t* uci_pdu,
|
||||
nfapi_nr_pucch_pdu_t* pucch_pdu);
|
||||
|
||||
void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
int slot,
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t* uci_pdu,
|
||||
nfapi_nr_pucch_pdu_t* pucch_pdu);
|
||||
|
||||
|
||||
#endif /*__NR_TRANSPORT__H__*/
|
||||
|
||||
@@ -1136,6 +1136,7 @@ void init_pucch2_luts() {
|
||||
|
||||
|
||||
void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t* uci_pdu,
|
||||
nfapi_nr_pucch_pdu_t* pucch_pdu) {
|
||||
@@ -1720,13 +1721,19 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
uci_pdu->pduBitmap|=2;
|
||||
uci_pdu->harq.harq_payload = (uint8_t*)malloc(harq_bytes);
|
||||
uci_pdu->harq.harq_crc = decoderState;
|
||||
LOG_D(PHY,"[DLSCH/PDSCH/PUCCH2] %d.%d HARQ bytes (%d) Decoder state %d\n",
|
||||
frame,slot,harq_bytes,decoderState);
|
||||
int i=0;
|
||||
for (;i<harq_bytes-1;i++) {
|
||||
uci_pdu->harq.harq_payload[i] = decodedPayload[0] & 255;
|
||||
LOG_D(PHY,"[DLSCH/PDSCH/PUCCH2] %d.%d HARQ paylod (%d) = %d\n",
|
||||
frame,slot,i,uci_pdu->harq.harq_payload[i]);
|
||||
decodedPayload[0]>>=8;
|
||||
}
|
||||
bit_left = pucch_pdu->bit_len_harq-((harq_bytes-1)<<3);
|
||||
uci_pdu->harq.harq_payload[i] = decodedPayload[0] & ((1<<bit_left)-1);
|
||||
LOG_D(PHY,"[DLSCH/PDSCH/PUCCH2] %d.%d HARQ paylod (%d) = %d\n",
|
||||
frame,slot,i,uci_pdu->harq.harq_payload[i]);
|
||||
decodedPayload[0] >>= pucch_pdu->bit_len_harq;
|
||||
}
|
||||
|
||||
|
||||
@@ -711,6 +711,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
|
||||
|
||||
LOG_D(PHY,"%d.%d Calling nr_decode_pucch2\n",frame_rx,slot_rx);
|
||||
nr_decode_pucch2(gNB,
|
||||
frame_rx,
|
||||
slot_rx,
|
||||
uci_pdu_format2,
|
||||
pucch_pdu);
|
||||
|
||||
@@ -705,7 +705,7 @@ int main(int argc, char **argv)
|
||||
pucch_pdu.second_hop_prb = N_RB_DL-1;
|
||||
}
|
||||
else pucch_pdu.freq_hop_flag = 0;
|
||||
nr_decode_pucch2(gNB,nr_slot_tx,&uci_pdu,&pucch_pdu);
|
||||
nr_decode_pucch2(gNB,nr_frame_tx,nr_slot_tx,&uci_pdu,&pucch_pdu);
|
||||
int csi_part1_bytes=pucch_pdu.bit_len_csi_part1>>3;
|
||||
if ((pucch_pdu.bit_len_csi_part1&7) > 0) csi_part1_bytes++;
|
||||
for (int i=0;i<csi_part1_bytes;i++) {
|
||||
|
||||
Reference in New Issue
Block a user