From 4836e90b2c843c5971c111c0fa475e8783d9670c Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Fri, 12 Nov 2021 22:28:16 +0100 Subject: [PATCH] Move place to apply reference_point_k_rb to dmrs --- lib/src/phy/phch/ra_nr.c | 8 ++++++++ lib/src/phy/ue/test/ue_dl_nr_file_test.cc | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/src/phy/phch/ra_nr.c b/lib/src/phy/phch/ra_nr.c index f265578ea..a94f65949 100644 --- a/lib/src/phy/phch/ra_nr.c +++ b/lib/src/phy/phch/ra_nr.c @@ -559,6 +559,14 @@ static int ra_dl_dmrs(const srsran_sch_hl_cfg_nr_t* hl_cfg, const srsran_dci_dl_ (cfg->grant.mapping == srsran_sch_mapping_type_A) ? hl_cfg->dmrs_typeA.present : hl_cfg->dmrs_typeB.present; if (dci->ctx.format == srsran_dci_format_nr_1_0 || !dedicated_dmrs_present) { + // 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 (dci->ctx.rnti_type == srsran_rnti_type_si) { + cfg->dmrs.reference_point_k_rb = dci->ctx.coreset_start_rb; + } + if (cfg->grant.mapping == srsran_sch_mapping_type_A) { // Absent default values are defined is TS 38.331 - DMRS-DownlinkConfig cfg->dmrs.additional_pos = srsran_dmrs_sch_add_pos_2; 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 d144c4274..1358b8c10 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 @@ -206,14 +206,6 @@ 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");