From b7283671497618a949c11b292e4f8fc2bbfe3e8f Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 2 Aug 2021 13:03:03 +0200 Subject: [PATCH] Fix Scheduler NR cell config generator for variable number of PRB --- srsenb/test/mac/nr/sched_nr_cfg_generators.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srsenb/test/mac/nr/sched_nr_cfg_generators.h b/srsenb/test/mac/nr/sched_nr_cfg_generators.h index 1c6c84edc..65698c402 100644 --- a/srsenb/test/mac/nr/sched_nr_cfg_generators.h +++ b/srsenb/test/mac/nr/sched_nr_cfg_generators.h @@ -18,14 +18,14 @@ namespace srsenb { -srsran_coreset_t get_default_coreset0() +srsran_coreset_t get_default_coreset0(uint32_t nof_prb) { srsran_coreset_t coreset{}; coreset.id = 0; coreset.duration = 1; coreset.precoder_granularity = srsran_coreset_precoder_granularity_reg_bundle; for (uint32_t i = 0; i < SRSRAN_CORESET_FREQ_DOMAIN_RES_SIZE; ++i) { - coreset.freq_resources[i] = i < 8; + coreset.freq_resources[i] = i < (nof_prb / 6); } return coreset; } @@ -44,7 +44,7 @@ sched_nr_interface::cell_cfg_t get_default_cell_cfg(const srsran::phy_cfg_nr_t& cell_cfg.bwps[0].rb_width = phy_cfg.carrier.nof_prb; cell_cfg.bwps[0].pdcch.coreset_present[0] = true; - cell_cfg.bwps[0].pdcch.coreset[0] = get_default_coreset0(); + cell_cfg.bwps[0].pdcch.coreset[0] = get_default_coreset0(phy_cfg.carrier.nof_prb); cell_cfg.bwps[0].pdcch.search_space_present[0] = true; auto& ss = cell_cfg.bwps[0].pdcch.search_space[0]; ss.id = 0;