nr,gnb,rrc: add helper function to derive rrc cfg parameters for all cells

master
Francisco 3 years ago committed by Francisco Paisana
parent f959c8c14a
commit 9ecb3f516d

@ -1486,9 +1486,7 @@ int set_derived_args_nr(all_args_t* args_, rrc_nr_cfg_t* rrc_nr_cfg_, phy_cfg_t*
}
// Create NR dedicated cell configuration from RRC configuration
for (auto it = rrc_nr_cfg_->cell_list.begin(); it != rrc_nr_cfg_->cell_list.end(); ++it) {
auto& cfg = *it;
for (auto& cfg : rrc_nr_cfg_->cell_list) {
cfg.phy_cell.carrier.max_mimo_layers = args_->enb.nof_ports;
// NR cells have the same bandwidth as EUTRA cells, adjust PRB sizes
@ -1507,12 +1505,6 @@ int set_derived_args_nr(all_args_t* args_, rrc_nr_cfg_t* rrc_nr_cfg_, phy_cfg_t*
return SRSRAN_ERROR;
}
// Derive cross-dependent cell params
if (set_derived_nr_cell_params(rrc_nr_cfg_->is_standalone, cfg) != SRSRAN_SUCCESS) {
ERROR("Failed to derive NR cell params.");
return SRSRAN_ERROR;
}
// phy_cell_cfg.root_seq_idx = cfg.root_seq_idx;
// PRACH
@ -1525,6 +1517,12 @@ int set_derived_args_nr(all_args_t* args_, rrc_nr_cfg_t* rrc_nr_cfg_, phy_cfg_t*
phy_cfg_->phy_cell_cfg_nr.push_back(cfg.phy_cell);
}
// Derive cross-dependent cell params
if (set_derived_nr_rrc_params(*rrc_nr_cfg_) != SRSRAN_SUCCESS) {
ERROR("Failed to derive NR cell params.");
return SRSRAN_ERROR;
}
// MAC-NR PCAP options
args_->nr_stack.mac.pcap.enable = args_->stack.mac_pcap.enable;
args_->nr_stack.log = args_->stack.log;

@ -20,6 +20,7 @@ namespace srsenb {
void generate_default_nr_cell(rrc_cell_cfg_nr_t& cell);
int set_derived_nr_cell_params(bool is_sa, rrc_cell_cfg_nr_t& cell);
int set_derived_nr_rrc_params(rrc_nr_cfg_t& rrc_cfg);
// Tests to ensure validity of config

@ -326,6 +326,14 @@ int set_derived_nr_cell_params(bool is_sa, rrc_cell_cfg_nr_t& cell)
return check_nr_cell_cfg_valid(cell, is_sa);
}
int set_derived_nr_rrc_params(rrc_nr_cfg_t& rrc_cfg)
{
for (rrc_cell_cfg_nr_t& cell : rrc_cfg.cell_list) {
HANDLE_ERROR(set_derived_nr_cell_params(rrc_cfg.is_standalone, cell));
}
return SRSRAN_SUCCESS;
}
int check_nr_cell_cfg_valid(const rrc_cell_cfg_nr_t& cell, bool is_sa)
{
// verify SSB params are consistent

Loading…
Cancel
Save