NR UE PHY: interfaced fix wideband CQI reporting in nr_phy_test

master
Xavier Arteaga 3 years ago committed by Xavier Arteaga
parent 8619382b45
commit 6c4c1ea155

@ -34,7 +34,7 @@ public:
*/ */
struct cell_search_result_t { struct cell_search_result_t {
bool cell_found = false; bool cell_found = false;
uint32_t pci = 0; ///< Physical Cell Identifier uint32_t pci = 0; ///< Physical Cell Identifier
srsran_pbch_msg_nr_t pbch_msg; ///< Packed PBCH message for the upper layers srsran_pbch_msg_nr_t pbch_msg; ///< Packed PBCH message for the upper layers
srsran_csi_trs_measurements_t measurements = {}; ///< Measurements from SSB block srsran_csi_trs_measurements_t measurements = {}; ///< Measurements from SSB block
}; };
@ -191,7 +191,7 @@ struct phy_args_nr_t {
srsran_ue_dl_nr_args_t dl = {}; srsran_ue_dl_nr_args_t dl = {};
srsran_ue_ul_nr_args_t ul = {}; srsran_ue_ul_nr_args_t ul = {};
std::set<uint32_t> fixed_sr = {1}; std::set<uint32_t> fixed_sr = {1};
uint32_t fix_wideband_cqi = 15; // Set to a non-zero value for fixing the wide-band CQI report uint32_t fix_wideband_cqi = 15; ///< Set to a non-zero value for fixing the wide-band CQI report
bool store_pdsch_ko = false; bool store_pdsch_ko = false;
float trs_epre_ema_alpha = 0.1f; ///< EPRE measurement exponential average alpha float trs_epre_ema_alpha = 0.1f; ///< EPRE measurement exponential average alpha
float trs_rsrp_ema_alpha = 0.1f; ///< RSRP measurement exponential average alpha float trs_rsrp_ema_alpha = 0.1f; ///< RSRP measurement exponential average alpha
@ -222,7 +222,6 @@ struct phy_args_nr_t {
class phy_interface_mac_nr class phy_interface_mac_nr
{ {
public: public:
// MAC informs PHY about UL grant included in RAR PDU // MAC informs PHY about UL grant included in RAR PDU
virtual int set_rar_grant(uint32_t rar_slot_idx, virtual int set_rar_grant(uint32_t rar_slot_idx,
std::array<uint8_t, SRSRAN_RAR_UL_GRANT_NBITS> packed_ul_grant, std::array<uint8_t, SRSRAN_RAR_UL_GRANT_NBITS> packed_ul_grant,

@ -361,6 +361,16 @@ public:
uci_data.cfg.nof_csi = n; uci_data.cfg.nof_csi = n;
} }
// Set fix wideband CQI if it is not zero nor greater than 15
if (args.fix_wideband_cqi != 0 && args.fix_wideband_cqi < 15) {
for (uint32_t i = 0; i < uci_data.cfg.nof_csi; i++) {
if (uci_data.cfg.csi[i].cfg.quantity == SRSRAN_CSI_REPORT_QUANTITY_CRI_RI_PMI_CQI &&
uci_data.cfg.csi[i].cfg.freq_cfg == SRSRAN_CSI_REPORT_FREQ_WIDEBAND) {
uci_data.value.csi[i].wideband_cri_ri_pmi_cqi.cqi = args.fix_wideband_cqi;
}
}
}
uci_data.cfg.pucch.rnti = stack->get_ul_sched_rnti_nr(slot_cfg.idx).id; uci_data.cfg.pucch.rnti = stack->get_ul_sched_rnti_nr(slot_cfg.idx).id;
} }

@ -87,10 +87,11 @@ test_bench::args_t::args_t(int argc, char** argv)
; ;
options_ue_phy.add_options() options_ue_phy.add_options()
("ue.phy.nof_threads", bpo::value<uint32_t>(&ue_phy.nof_phy_threads)->default_value(1), "Number of threads") ("ue.phy.fix_wideband_cqi", bpo::value<uint32_t>(&ue_phy.fix_wideband_cqi)->default_value(15), "Fix wideband CQI value, set to 0 or greater than 15 to disable")
("ue.phy.log.level", bpo::value<std::string>(&ue_phy.log.phy_level)->default_value("warning"), "UE PHY log level") ("ue.phy.nof_threads", bpo::value<uint32_t>(&ue_phy.nof_phy_threads)->default_value(1), "Number of threads")
("ue.phy.log.hex_limit", bpo::value<int>(&ue_phy.log.phy_hex_limit)->default_value(0), "UE PHY log hex limit") ("ue.phy.log.level", bpo::value<std::string>(&ue_phy.log.phy_level)->default_value("warning"), "UE PHY log level")
("ue.phy.log.id_preamble", bpo::value<std::string>(&ue_phy.log.id_preamble)->default_value(" UE/"), "UE PHY log ID preamble") ("ue.phy.log.hex_limit", bpo::value<int>(&ue_phy.log.phy_hex_limit)->default_value(0), "UE PHY log hex limit")
("ue.phy.log.id_preamble", bpo::value<std::string>(&ue_phy.log.id_preamble)->default_value(" UE/"), "UE PHY log ID preamble")
; ;
options_ue_stack.add_options() options_ue_stack.add_options()

Loading…
Cancel
Save