phy: pass number PRBs from the correct cell config into the channel emulator when running NR standalone mode

This commit is contained in:
yagoda 2022-05-30 19:04:06 +02:00 committed by Justin Tallon
parent d5909a306f
commit 66b5b6c236
1 changed files with 6 additions and 3 deletions

View File

@ -46,10 +46,11 @@ bool phy_common::init(const phy_cell_cfg_list_t& cell_list_,
// Instantiate DL channel emulator
if (params.dl_channel_args.enable) {
int channel_prbs = (cell_list_lte.empty()) ? cell_list_nr[0].carrier.nof_prb : cell_list_lte[0].cell.nof_prb;
dl_channel = srsran::channel_ptr(
new srsran::channel(params.dl_channel_args, get_nof_rf_channels(), srslog::fetch_basic_logger("PHY")));
dl_channel->set_srate((uint32_t)srsran_sampling_freq_hz(cell_list_lte[0].cell.nof_prb));
dl_channel->set_signal_power_dBfs(srsran_enb_dl_get_maximum_signal_power_dBfs(cell_list_lte[0].cell.nof_prb));
dl_channel->set_srate((uint32_t)srsran_sampling_freq_hz(channel_prbs));
dl_channel->set_signal_power_dBfs(srsran_enb_dl_get_maximum_signal_power_dBfs(channel_prbs));
}
// Create grants
@ -58,7 +59,9 @@ bool phy_common::init(const phy_cell_cfg_list_t& cell_list_,
}
// Set UE PHY data-base stack and configuration
ue_db.init(stack, params, cell_list_lte);
if (!cell_list_lte.empty()) {
ue_db.init(stack, params, cell_list_lte);
}
if (mcch_configured) {
build_mch_table();
build_mcch_table();