diff --git a/srsue/hdr/phy/phy_common.h b/srsue/hdr/phy/phy_common.h index 2a635912e..3acbd80df 100644 --- a/srsue/hdr/phy/phy_common.h +++ b/srsue/hdr/phy/phy_common.h @@ -69,6 +69,9 @@ public: // Time Aligment Controller, internal thread safe ta_control ta; + // Last reported RI + std::atomic last_ri = {0}; + phy_common(srslog::basic_logger& logger); ~phy_common(); diff --git a/srsue/src/phy/lte/cc_worker.cc b/srsue/src/phy/lte/cc_worker.cc index e25ec70e2..913e5beae 100644 --- a/srsue/src/phy/lte/cc_worker.cc +++ b/srsue/src/phy/lte/cc_worker.cc @@ -807,10 +807,16 @@ uint32_t cc_worker::get_wideband_cqi() void cc_worker::set_uci_periodic_cqi(srsran_uci_data_t* uci_data) { + // Load last reported RI + ue_dl_cfg.last_ri = phy->last_ri; + srsran_ue_dl_gen_cqi_periodic(&ue_dl, &ue_dl_cfg, get_wideband_cqi(), CURRENT_TTI_TX, uci_data); // Store serving cell index for logging purposes uci_data->cfg.cqi.scell_index = cc_idx; + + // Store the reported RI + phy->last_ri = ue_dl_cfg.last_ri; } void cc_worker::set_uci_aperiodic_cqi(srsran_uci_data_t* uci_data) diff --git a/srsue/src/phy/phy_common.cc b/srsue/src/phy/phy_common.cc index 836c7859d..062abd5a8 100644 --- a/srsue/src/phy/phy_common.cc +++ b/srsue/src/phy/phy_common.cc @@ -871,6 +871,7 @@ void phy_common::reset() cur_pusch_power = 0; sr_last_tx_tti = -1; pcell_report_period = 20; + last_ri = 0; ZERO_OBJECT(pathloss); ZERO_OBJECT(avg_sinr_db);