From ebeb46b230c816669698ff7d2bdb966ebf8aa0d5 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Mon, 15 Nov 2021 17:27:45 +0100 Subject: [PATCH] nr,pdcch_dmrs: take into account offset_rb in DMRS mapping --- lib/src/phy/ch_estimation/dmrs_pdcch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/phy/ch_estimation/dmrs_pdcch.c b/lib/src/phy/ch_estimation/dmrs_pdcch.c index 3c862df2a..deaee7b6f 100644 --- a/lib/src/phy/ch_estimation/dmrs_pdcch.c +++ b/lib/src/phy/ch_estimation/dmrs_pdcch.c @@ -70,6 +70,9 @@ static void dmrs_pdcch_put_symbol(const srsran_carrier_nr_t* carrier, // CORESET Resource Block counter uint32_t rb_coreset_idx = 0; + // Get CORESET offset + uint32_t offset_k = coreset->offset_rb * SRSRAN_NRE; + // For each frequency resource (6 RB groups) for (uint32_t res_idx = 0; res_idx < nof_freq_res; res_idx++) { // Skip frequency resource if outside of the CORESET @@ -104,7 +107,7 @@ static void dmrs_pdcch_put_symbol(const srsran_carrier_nr_t* carrier, uint32_t k = n * SRSRAN_NRE + 4 * k_prime + 1; // Write DMRS - sf_symbol[k] = rl[k_prime]; + sf_symbol[k + offset_k] = rl[k_prime]; } } }