From 798e9b7a5e0ac75f6005b2422eb23c865b7bdb24 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Fri, 12 Nov 2021 20:24:52 +0100 Subject: [PATCH] ue_dl: reference point for DMRS varies for SIB --- lib/include/srsran/phy/phch/phch_cfg_nr.h | 2 ++ lib/src/phy/ch_estimation/dmrs_sch.c | 6 ++++-- lib/src/phy/ue/test/ue_dl_nr_file_test.cc | 8 ++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/include/srsran/phy/phch/phch_cfg_nr.h b/lib/include/srsran/phy/phch/phch_cfg_nr.h index cd76ecc0b..09b4ea114 100644 --- a/lib/include/srsran/phy/phch/phch_cfg_nr.h +++ b/lib/include/srsran/phy/phch/phch_cfg_nr.h @@ -77,6 +77,8 @@ typedef struct { srsran_dmrs_sch_typeA_pos_t typeA_pos; bool lte_CRS_to_match_around; + uint32_t reference_point_k_rb; + /// Parameters provided by FeatureSetDownlink-v1540 bool additional_DMRS_DL_Alt; diff --git a/lib/src/phy/ch_estimation/dmrs_sch.c b/lib/src/phy/ch_estimation/dmrs_sch.c index 629e61b2f..3956e08fd 100644 --- a/lib/src/phy/ch_estimation/dmrs_sch.c +++ b/lib/src/phy/ch_estimation/dmrs_sch.c @@ -216,7 +216,8 @@ static int srsran_dmrs_sch_put_symbol(srsran_dmrs_sch_t* q, // ... save first consecutive PRB in the group prb_start = prb_idx; - // ... discard unused pilots and reset counter + // ... discard unused pilots and reset counter unless the PDSCH transmission carries SIB + prb_skip = SRSRAN_MAX(0, (int)prb_skip - (int)dmrs_cfg->reference_point_k_rb); srsran_sequence_state_advance(&sequence_state, prb_skip * nof_pilots_x_prb * 2); prb_skip = 0; } @@ -704,7 +705,8 @@ static int srsran_dmrs_sch_get_symbol(srsran_dmrs_sch_t* q, // ... save first consecutive PRB in the group prb_start = prb_idx; - // ... discard unused pilots and reset counter + // ... discard unused pilots and reset counter unless the PDSCH transmission carries SIB + prb_skip = SRSRAN_MAX(0, (int)prb_skip - (int)dmrs_cfg->reference_point_k_rb); srsran_sequence_state_advance(&sequence_state, prb_skip * nof_pilots_x_prb * 2); prb_skip = 0; } diff --git a/lib/src/phy/ue/test/ue_dl_nr_file_test.cc b/lib/src/phy/ue/test/ue_dl_nr_file_test.cc index cc85dbfa6..2f41bac4b 100644 --- a/lib/src/phy/ue/test/ue_dl_nr_file_test.cc +++ b/lib/src/phy/ue/test/ue_dl_nr_file_test.cc @@ -205,6 +205,14 @@ static int work_ue_dl(srsran_ue_dl_nr_t* ue_dl, srsran_slot_cfg_t* slot) srsran_pdsch_res_nr_t pdsch_res = {}; pdsch_res.tb[0].payload = data; + // See 7.4.1.1.2 38.211 The reference point for k is + // - for PDSCH transmission carrying SIB1, subcarrier 0 of the lowest-numbered common resource block in the + // CORESET configured by the PBCH + //- otherwise, subcarrier 0 in common resource block 0 + if (rnti_type == srsran_rnti_type_si) { + pdsch_cfg.dmrs.reference_point_k_rb = pdcch_cfg.coreset[0].offset_rb; + } + // Decode PDSCH if (srsran_ue_dl_nr_decode_pdsch(ue_dl, slot, &pdsch_cfg, &pdsch_res) < SRSRAN_SUCCESS) { ERROR("Error decoding PDSCH search");