SRSENB: fix channel emulator for multiple channels

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent f69aad3aac
commit b11ffaee7e

@ -89,9 +89,19 @@ public:
return ret;
};
uint32_t get_nof_rf_channels()
{
uint32_t count = 0;
for (auto& cell : cell_list) {
count += cell.cell.nof_ports;
}
return count;
}
double get_ul_freq_hz(uint32_t cc_idx)
{
double ret = 0.0f;
double ret = 0.0;
if (cc_idx < cell_list.size()) {
ret = cell_list[cc_idx].ul_freq_hz;

@ -68,7 +68,7 @@ bool phy_common::init(const phy_cell_cfg_list_t& cell_list_,
// Instantiate DL channel emulator
if (params.dl_channel_args.enable) {
dl_channel = srslte::channel_ptr(new srslte::channel(params.dl_channel_args, 1));
dl_channel = srslte::channel_ptr(new srslte::channel(params.dl_channel_args, get_nof_rf_channels()));
dl_channel->set_srate((uint32_t)srslte_sampling_freq_hz(cell_list[0].cell.nof_prb));
}

@ -69,7 +69,8 @@ bool txrx::init(srslte::radio_interface_phy* radio_h_,
// Instantiate UL channel emulator
if (worker_com->params.ul_channel_args.enable) {
ul_channel = srslte::channel_ptr(new srslte::channel(worker_com->params.ul_channel_args, 1));
ul_channel =
srslte::channel_ptr(new srslte::channel(worker_com->params.ul_channel_args, worker_com->get_nof_rf_channels()));
}
start(prio_);

Loading…
Cancel
Save