From 603c67e36ddaab30da23c79d9a8d7f0646fed723 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Wed, 7 Jul 2021 16:03:04 +0200 Subject: [PATCH] Set g_ulsch LLR overlaped with g_harq_ack to zero --- lib/src/phy/phch/pusch_nr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/src/phy/phch/pusch_nr.c b/lib/src/phy/phch/pusch_nr.c index 184ac6f62..385059df2 100644 --- a/lib/src/phy/phch/pusch_nr.c +++ b/lib/src/phy/phch/pusch_nr.c @@ -839,6 +839,13 @@ static inline int pusch_nr_decode_codeword(srsran_pusch_nr_t* q, // Demultiplex UCI only if necessary if (q->uci_mux) { + // As it can be HARQ-ACK takes LLRs from ULSCH, demultiplex HARQ-ACK first + int8_t* g_ack = (int8_t*)q->g_ack; + for (uint32_t i = 0; i < q->G_ack; i++) { + g_ack[i] = llr[q->pos_ack[i]]; + llr[q->pos_ack[i]] = 0; + } + // Demultiplex UL-SCH, change sign int8_t* g_ulsch = (int8_t*)q->g_ulsch; for (uint32_t i = 0; i < q->G_ulsch; i++) { @@ -848,12 +855,6 @@ static inline int pusch_nr_decode_codeword(srsran_pusch_nr_t* q, g_ulsch[i] = 0; } - // Demultiplex HARQ-ACK - int8_t* g_ack = (int8_t*)q->g_ack; - for (uint32_t i = 0; i < q->G_ack; i++) { - g_ack[i] = llr[q->pos_ack[i]]; - } - // Demultiplex CSI part 1 int8_t* g_csi1 = (int8_t*)q->g_csi1; for (uint32_t i = 0; i < q->G_csi1; i++) {