From b875f855c78e7d40639911ab1900b6ceb07ebb3f Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Thu, 5 Feb 2026 10:33:13 +0000 Subject: [PATCH] fix(nr_dlsch): symbol offset calculation There was an indexing error in the calculation of the symbol offset `re_beginning_of_symbol`. The symbol was tested to hold PTRS or DMRS based on the index of the first symbol processed in the task and not based on the index of the symbol as it should be. Then PDSCH generation was not working properly for more than one symbol per task. --- openair1/PHY/NR_TRANSPORT/nr_dlsch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 52bfedf86c..710dac1efb 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -743,12 +743,12 @@ static int do_one_dlsch(unsigned char *input_ptr, PHY_VARS_gNB *gNB, NR_gNB_DLSC rdata->dlPtrsSymPos = dlPtrsSymPos; rdata->n_ptrs = n_ptrs; rdata->beam_nb = beam_nb; - for (int s = 0; s < rdata->numSymbols; s++) { - rdata->re_beginning_of_symbol[l_symbol + s] = re_beginning_of_symbol; + for (int s = l_symbol; s < l_symbol + rdata->numSymbols; s++) { + rdata->re_beginning_of_symbol[s] = re_beginning_of_symbol; re_beginning_of_symbol += rel15->rbSize * NR_NB_SC_PER_RB; - if (n_ptrs > 0 && is_ptrs_symbol(l_symbol, dlPtrsSymPos)) { + if (n_ptrs > 0 && is_ptrs_symbol(s, dlPtrsSymPos)) { re_beginning_of_symbol -= n_ptrs; - } else if (rel15->dlDmrsSymbPos & (1 << l_symbol)) { + } else if (rel15->dlDmrsSymbPos & (1 << s)) { re_beginning_of_symbol -= n_dmrs; } }