diff --git a/srsenb/src/phy/cc_worker.cc b/srsenb/src/phy/cc_worker.cc index 252c6e5f7..5388b8441 100644 --- a/srsenb/src/phy/cc_worker.cc +++ b/srsenb/src/phy/cc_worker.cc @@ -301,7 +301,7 @@ int cc_worker::decode_pusch(stack_interface_phy_lte::ul_sched_grant_t* grants, u auto& ul_grant = grants[i]; uint16_t rnti = ul_grant.dci.rnti; - if (rnti) { + if (rnti && ue_db.count(rnti)) { // Get UE configuration srslte::phy_cfg_t phy_cfg = phy->ue_db.get_config(rnti, cc_idx); srslte_ul_cfg_t& ul_cfg = phy_cfg.ul_cfg; @@ -373,7 +373,7 @@ int cc_worker::decode_pusch(stack_interface_phy_lte::ul_sched_grant_t* grants, u // Logging char str[512]; srslte_pusch_rx_info(&ul_cfg.pusch, &pusch_res, str, 512); - Info("PUSCH: %s, snr=%.1f dB\n", str, snr_db); + Info("PUSCH: cc=%d, %s, snr=%.1f dB\n", cc_idx, str, snr_db); } } } @@ -451,7 +451,7 @@ int cc_worker::encode_pdcch_ul(stack_interface_phy_lte::ul_sched_grant_t* grants // Logging char str[512]; srslte_dci_ul_info(&grants[i].dci, str, 512); - Info("PDCCH: %s, tti_tx_dl=%d\n", str, tti_tx_dl); + Info("PDCCH: cc=%d, %s, tti_tx_dl=%d\n", cc_idx, str, tti_tx_dl); } } return SRSLTE_SUCCESS; @@ -471,7 +471,7 @@ int cc_worker::encode_pdcch_dl(stack_interface_phy_lte::dl_sched_grant_t* grants // Logging char str[512]; srslte_dci_dl_info(&grants[i].dci, str, 512); - Info("PDCCH: %s, tti_tx_dl=%d\n", str, tti_tx_dl); + Info("PDCCH: cc=%d, %s, tti_tx_dl=%d\n", cc_idx, str, tti_tx_dl); } } } diff --git a/srsenb/src/phy/txrx.cc b/srsenb/src/phy/txrx.cc index ff99b869b..de3710bb7 100644 --- a/srsenb/src/phy/txrx.cc +++ b/srsenb/src/phy/txrx.cc @@ -86,13 +86,13 @@ void txrx::stop() void txrx::run_thread() { sf_worker* worker = nullptr; - cf_t* buffer[SRSLTE_MAX_PORTS] = {}; + cf_t* buffer[worker_com->get_nof_carriers() * worker_com->get_nof_ports(0)] = {}; srslte_timestamp_t rx_time = {}; srslte_timestamp_t tx_time = {}; 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", (float)samp_rate / 1000000); + log_h->console("Setting Sampling frequency %.2f MHz\n", samp_rate / 1000000.0f); // Configure radio radio_h->set_rx_srate(0, samp_rate); @@ -122,7 +122,7 @@ void txrx::run_thread() // Main loop while (running) { - tti = (tti + 1) % 10240; + tti = TTI_ADD(tti, 1); worker = (sf_worker*)workers_pool->wait_worker(tti); if (worker) { // Multiple cell buffer mapping