From 31665aa4ec3990bb5bd9f0f00c662fe1908e2e77 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 3 May 2022 08:29:03 +0200 Subject: [PATCH] enb,cfg_parser: remove strict arfcn check for SA and replace with list of supported configs the coreset0 index and various related parameters in the scheduler might lead to unsupported and/or overlapping resource allocation patterns. this patch adds a table of supported arfcns for three popular bands (all FDD). --- srsenb/src/enb_cfg_parser.cc | 37 ++++++++++++++++++++++++++++++++++-- srsenb/src/enb_cfg_parser.h | 2 ++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index edbf187e5..8fd77c89d 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -1805,8 +1805,9 @@ int set_derived_args_nr(all_args_t* args_, rrc_nr_cfg_t* rrc_nr_cfg_, phy_cfg_t* return SRSRAN_ERROR; } if (rrc_nr_cfg_->is_standalone) { - if (cfg.phy_cell.carrier.dl_center_frequency_hz != 1842.5e6) { - ERROR("Only DL-ARFCN 368500 supported."); + if (is_valid_arfcn(cfg.band, cfg.dl_arfcn) == false) { + ERROR("DL-ARFCN %d in band n%d not supported with coreset0 config.", cfg.dl_arfcn, cfg.band); + ERROR("Valid ARFCNs for band n%d are: %s", cfg.band, valid_arfcns_to_string(cfg.band).c_str()); return SRSRAN_ERROR; } if (cfg.duplex_mode == SRSRAN_DUPLEX_MODE_TDD) { @@ -1819,6 +1820,38 @@ int set_derived_args_nr(all_args_t* args_, rrc_nr_cfg_t* rrc_nr_cfg_, phy_cfg_t* return SRSRAN_SUCCESS; } +// List of selected ARFCNs in band n3, n7 and n20 that match the coreset0 config +using arfcn_list_t = std::list; +std::map valid_arfcn = {{3, {363500, 368500, 369500, 374500, 375000}}, + {7, {525000, 526200, 531000}}, + {20, {159000, 160200}}}; + +std::string valid_arfcns_to_string(uint32_t band) +{ + std::string band_string; + if (valid_arfcn.find(band) != valid_arfcn.end()) { + for (const auto& arfcn : valid_arfcn.at(band)) { + band_string += std::to_string(arfcn); + band_string += ", "; + } + } + return band_string; +} + +bool is_valid_arfcn(uint32_t band, uint32_t dl_arfcn) +{ + if (valid_arfcn.find(band) == valid_arfcn.end()) { + return false; + } + const auto& arfcn_list = valid_arfcn.at(band); + for (const auto& arfcn : arfcn_list) { + if (arfcn == dl_arfcn) { + return true; + } + } + return false; +} + } // namespace enb_conf_sections namespace sib_sections { diff --git a/srsenb/src/enb_cfg_parser.h b/srsenb/src/enb_cfg_parser.h index 574cf115b..10b19ed6f 100644 --- a/srsenb/src/enb_cfg_parser.h +++ b/srsenb/src/enb_cfg_parser.h @@ -42,6 +42,8 @@ int parse_cell_cfg(all_args_t* args_, srsran_cell_t* cell); int parse_cfg_files(all_args_t* args_, rrc_cfg_t* rrc_cfg_, rrc_nr_cfg_t* rrc_cfg_nr_, phy_cfg_t* phy_cfg_); int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_, const srsran_cell_t& cell_cfg_); int set_derived_args_nr(all_args_t* args_, rrc_nr_cfg_t* rrc_nr_cfg_, phy_cfg_t* phy_cfg_); +bool is_valid_arfcn(uint32_t band, uint32_t dl_arfcn); +std::string valid_arfcns_to_string(uint32_t band); } // namespace enb_conf_sections