fix parsing of DL/UL earfcn in cell config

using a single earfcn or dl_freq value that gets set by default
in the [rf] section doesn't make sense in a enb config with more
than 1 cell, so we should actually remove the earfcn/freq setting in [rf]
and only configure the radio through the values in the cell list in rr.cfg
master
Andre Puschmann 5 years ago
parent 87f1b2a939
commit 33a410bda4

@ -661,9 +661,7 @@ int parse_rr(all_args_t* args_, rrc_cfg_t* rrc_cfg_)
cell_cfg.pci = args_->enb.pci; 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.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_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_earfcn = args_->enb.ul_earfcn;
cell_cfg.ul_freq_hz = args_->rf.ul_freq;
} }
return p.parse(); 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.pci, cellroot, "pci", args->enb.pci);
parse_default_field( 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); 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); cell_cfg.dl_earfcn = cellroot["dl_earfcn"];
parse_default_field(cell_cfg.ul_earfcn, cellroot, "ul_earfcn", args->enb.ul_earfcn); cell_cfg.ul_earfcn = cellroot["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);
if (cellroot["ho_active"]) { if (cellroot["ho_active"]) {
HANDLEPARSERCODE(parse_meas_cell_list(&rrc_cfg->meas_cfg, cellroot["meas_cell_list"])); 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_) 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 // Copy cell struct to rrc and phy
rrc_cfg_->cell = *cell_cfg_; 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) { if (cfg.dl_freq_hz > 0) {
phy_cell_cfg.dl_freq_hz = cfg.dl_freq_hz; phy_cell_cfg.dl_freq_hz = cfg.dl_freq_hz;
} else { } 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) { 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) { if (cfg.ul_earfcn == 0) {
cfg.ul_earfcn = srslte_band_ul_earfcn(cfg.dl_earfcn); 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); phy_cfg_->phy_cell_cfg.push_back(phy_cell_cfg);
} }

@ -92,7 +92,6 @@ void txrx::run_thread()
uint32_t sf_len = SRSLTE_SF_LEN_PRB(worker_com->get_nof_prb(0)); 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)); 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 // Configure radio
radio_h->set_rx_srate(0, samp_rate); 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); float rx_freq_hz = worker_com->get_ul_freq_hz(cc_idx);
uint32_t rf_port = worker_com->get_rf_port(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++) { 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_tx_freq(0, rf_port + i, tx_freq_hz);
radio_h->set_rx_freq(0, rf_port + i, rx_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 // Set channel emulator sampling rate
@ -143,7 +146,7 @@ void txrx::run_thread()
srslte_timestamp_copy(&tx_time, &rx_time); srslte_timestamp_copy(&tx_time, &rx_time);
srslte_timestamp_add(&tx_time, 0, FDD_HARQ_DELAY_MS * 1e-3); 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, tti,
tx_worker_cnt, tx_worker_cnt,
tx_time.full_secs, tx_time.full_secs,

@ -271,6 +271,7 @@ int test_mobility_class(mobility_test_params test_params)
cell2.pci = 2; cell2.pci = 2;
cell2.eci = 0x19C02; cell2.eci = 0x19C02;
cfg.meas_cfg.meas_cells.push_back(cell2); cfg.meas_cfg.meas_cells.push_back(cell2);
cfg.meas_cfg_present = true;
srsenb::rrc rrc; srsenb::rrc rrc;
mac_dummy mac; mac_dummy mac;

Loading…
Cancel
Save