diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index a70dbb05b..f7f4ee178 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -661,9 +661,7 @@ int parse_rr(all_args_t* args_, rrc_cfg_t* rrc_cfg_) cell_cfg.pci = args_->enb.pci; cell_cfg.root_seq_idx = rrc_cfg_->sibs[1].sib2().rr_cfg_common.prach_cfg.root_seq_idx; cell_cfg.dl_earfcn = args_->enb.dl_earfcn; - cell_cfg.dl_freq_hz = args_->rf.dl_freq; cell_cfg.ul_earfcn = args_->enb.ul_earfcn; - cell_cfg.ul_freq_hz = args_->rf.ul_freq; } return p.parse(); @@ -730,10 +728,8 @@ static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root) parse_default_field(cell_cfg.pci, cellroot, "pci", args->enb.pci); parse_default_field( cell_cfg.root_seq_idx, cellroot, "root_seq_idx", rrc_cfg->sibs[1].sib2().rr_cfg_common.prach_cfg.root_seq_idx); - parse_default_field(cell_cfg.dl_earfcn, cellroot, "dl_earfcn", args->enb.dl_earfcn); - parse_default_field(cell_cfg.ul_earfcn, cellroot, "ul_earfcn", args->enb.ul_earfcn); - parse_default_field(cell_cfg.dl_freq_hz, cellroot, "dl_freq", args->rf.dl_freq); - parse_default_field(cell_cfg.ul_freq_hz, cellroot, "ul_freq", args->rf.ul_freq); + cell_cfg.dl_earfcn = cellroot["dl_earfcn"]; + cell_cfg.ul_earfcn = cellroot["ul_earfcn"]; if (cellroot["ho_active"]) { HANDLEPARSERCODE(parse_meas_cell_list(&rrc_cfg->meas_cfg, cellroot["meas_cell_list"])); @@ -870,7 +866,6 @@ int parse_cfg_files(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_) int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_, srslte_cell_t* cell_cfg_) { - // Copy cell struct to rrc and phy rrc_cfg_->cell = *cell_cfg_; @@ -886,7 +881,7 @@ int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_ if (cfg.dl_freq_hz > 0) { phy_cell_cfg.dl_freq_hz = cfg.dl_freq_hz; } else { - cfg.dl_freq_hz = 1e6f * srslte_band_fd(cfg.dl_earfcn); + phy_cell_cfg.dl_freq_hz = 1e6f * srslte_band_fd(cfg.dl_earfcn); } if (cfg.ul_freq_hz > 0) { @@ -895,7 +890,7 @@ int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_ if (cfg.ul_earfcn == 0) { cfg.ul_earfcn = srslte_band_ul_earfcn(cfg.dl_earfcn); } - cfg.ul_freq_hz = 1e6f * srslte_band_fd(cfg.ul_earfcn); + phy_cell_cfg.ul_freq_hz = 1e6f * srslte_band_fu(cfg.ul_earfcn); } phy_cfg_->phy_cell_cfg.push_back(phy_cell_cfg); } diff --git a/srsenb/src/phy/txrx.cc b/srsenb/src/phy/txrx.cc index e6cd8f4a9..314baee04 100644 --- a/srsenb/src/phy/txrx.cc +++ b/srsenb/src/phy/txrx.cc @@ -92,7 +92,6 @@ void txrx::run_thread() uint32_t sf_len = SRSLTE_SF_LEN_PRB(worker_com->get_nof_prb(0)); float samp_rate = srslte_sampling_freq_hz(worker_com->get_nof_prb(0)); - log_h->console("Setting Sampling frequency %.2f MHz\n", samp_rate / 1000000.0f); // Configure radio radio_h->set_rx_srate(0, samp_rate); @@ -104,10 +103,14 @@ void txrx::run_thread() float rx_freq_hz = worker_com->get_ul_freq_hz(cc_idx); uint32_t rf_port = worker_com->get_rf_port(cc_idx); for (uint32_t i = 0; i < worker_com->get_nof_ports(cc_idx); i++) { - log_h->console("Setting frequency: DL=%.1f Mhz, UL=%.1f MHz\n", tx_freq_hz / 1e6f, rx_freq_hz / 1e6f); radio_h->set_tx_freq(0, rf_port + i, tx_freq_hz); radio_h->set_rx_freq(0, rf_port + i, rx_freq_hz); } + log_h->console("RF%d: samp_rate=%.2f MHz, DL=%.1f Mhz, UL=%.1f MHz\n", + cc_idx, + samp_rate / 1e6f, + tx_freq_hz / 1e6f, + rx_freq_hz / 1e6f); } // Set channel emulator sampling rate @@ -143,7 +146,7 @@ void txrx::run_thread() srslte_timestamp_copy(&tx_time, &rx_time); srslte_timestamp_add(&tx_time, 0, FDD_HARQ_DELAY_MS * 1e-3); - Debug("Settting TTI=%d, tx_mutex=%d, tx_time=%ld:%f to worker %d\n", + Debug("Setting TTI=%d, tx_mutex=%d, tx_time=%ld:%f to worker %d\n", tti, tx_worker_cnt, tx_time.full_secs, diff --git a/srsenb/test/upper/rrc_mobility_test.cc b/srsenb/test/upper/rrc_mobility_test.cc index 5d3a2e5e5..6d24049aa 100644 --- a/srsenb/test/upper/rrc_mobility_test.cc +++ b/srsenb/test/upper/rrc_mobility_test.cc @@ -271,6 +271,7 @@ int test_mobility_class(mobility_test_params test_params) cell2.pci = 2; cell2.eci = 0x19C02; cfg.meas_cfg.meas_cells.push_back(cell2); + cfg.meas_cfg_present = true; srsenb::rrc rrc; mac_dummy mac;