rrc,nr: reenable CSI reporting in gNB

master
Francisco Paisana 3 years ago
parent e5d48d1d21
commit b7f40b2baf

@ -115,6 +115,7 @@ bool make_phy_ssb_cfg(const srsran_carrier_nr_t& carrier,
const asn1::rrc_nr::serving_cell_cfg_common_s& serv_cell_cfg,
phy_cfg_nr_t::ssb_cfg_t* ssb);
bool make_pdsch_cfg_from_serv_cell(asn1::rrc_nr::serving_cell_cfg_s& serv_cell, srsran_sch_hl_cfg_nr_t* sch_hl);
bool make_csi_cfg_from_serv_cell(asn1::rrc_nr::serving_cell_cfg_s& serv_cell, srsran_csi_hl_cfg_t* csi_hl);
/***************************
* MAC Config

@ -1481,6 +1481,8 @@ bool make_pdsch_cfg_from_serv_cell(asn1::rrc_nr::serving_cell_cfg_s& serv_cell,
serv_cell.csi_meas_cfg.type().value ==
setup_release_c< ::asn1::rrc_nr::csi_meas_cfg_s>::types_opts::options::setup) {
auto& setup = serv_cell.csi_meas_cfg.setup();
// Configure NZP-CSI
if (setup.nzp_csi_rs_res_set_to_add_mod_list_present) {
for (auto& nzp_set : setup.nzp_csi_rs_res_set_to_add_mod_list) {
auto& uecfg_set = sch_hl->nzp_csi_rs_sets[nzp_set.nzp_csi_res_set_id];
@ -1515,6 +1517,27 @@ bool make_pdsch_cfg_from_serv_cell(asn1::rrc_nr::serving_cell_cfg_s& serv_cell,
return true;
}
bool make_csi_cfg_from_serv_cell(asn1::rrc_nr::serving_cell_cfg_s& serv_cell, srsran_csi_hl_cfg_t* csi_hl)
{
if (serv_cell.csi_meas_cfg_present and
serv_cell.csi_meas_cfg.type().value ==
setup_release_c< ::asn1::rrc_nr::csi_meas_cfg_s>::types_opts::options::setup) {
auto& setup = serv_cell.csi_meas_cfg.setup();
// Configure CSI-Report
if (setup.csi_report_cfg_to_add_mod_list_present) {
for (uint32_t i = 0; i < setup.csi_report_cfg_to_add_mod_list.size(); ++i) {
const auto& csi_rep = setup.csi_report_cfg_to_add_mod_list[i];
if (not make_phy_csi_report(csi_rep, &csi_hl->reports[i])) {
return false;
}
}
}
}
return true;
}
} // namespace srsran
namespace srsenb {

@ -56,6 +56,7 @@ public:
srsran_pdcch_cfg_nr_t pdcch = {};
srsran_sch_hl_cfg_nr_t pdsch = {};
srsran_sch_hl_cfg_nr_t pusch = {};
srsran_csi_hl_cfg_t csi = {};
uint32_t rar_window_size = 10; // See TS 38.331, ra-ResponseWindow: {1, 2, 4, 8, 10, 20, 40, 80}
uint32_t numerology_idx = 0;
};

@ -38,6 +38,7 @@ struct rrc_nr_cfg_t {
rrc_cfg_cqi_t cqi_cfg;
rrc_cell_list_nr_t cell_list;
std::string log_name = "RRC-NR";
std::string log_level;
uint32_t log_hex_limit;
};

@ -16,8 +16,59 @@ using namespace asn1::rrc_nr;
namespace srsenb {
srslog::basic_logger& get_logger(const rrc_nr_cfg_t& cfg)
{
static srslog::basic_logger& log_obj = srslog::fetch_basic_logger(cfg.log_name);
return log_obj;
}
int fill_csi_report_from_enb_cfg(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_meas_cfg)
{
csi_meas_cfg.csi_report_cfg_to_add_mod_list_present = true;
csi_meas_cfg.csi_report_cfg_to_add_mod_list.resize(1);
auto& csi_report = csi_meas_cfg.csi_report_cfg_to_add_mod_list[0];
csi_report.report_cfg_id = 0;
csi_report.res_for_ch_meas = 0;
csi_report.csi_im_res_for_interference_present = true;
csi_report.csi_im_res_for_interference = 1;
csi_report.report_cfg_type.set_periodic();
csi_report.report_cfg_type.periodic().report_slot_cfg.set_slots80();
csi_report.report_cfg_type.periodic().pucch_csi_res_list.resize(1);
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].ul_bw_part_id = 0;
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].pucch_res = 1; // was 17 in orig PCAP
csi_report.report_quant.set_cri_ri_pmi_cqi();
// Report freq config (optional)
csi_report.report_freq_cfg_present = true;
csi_report.report_freq_cfg.cqi_format_ind_present = true;
csi_report.report_freq_cfg.cqi_format_ind =
asn1::rrc_nr::csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_opts::wideband_cqi;
csi_report.time_restrict_for_ch_meass = asn1::rrc_nr::csi_report_cfg_s::time_restrict_for_ch_meass_opts::not_cfgured;
csi_report.time_restrict_for_interference_meass =
asn1::rrc_nr::csi_report_cfg_s::time_restrict_for_interference_meass_opts::not_cfgured;
csi_report.group_based_beam_report.set_disabled();
// Skip CQI table (optional)
csi_report.cqi_table_present = true;
csi_report.cqi_table = asn1::rrc_nr::csi_report_cfg_s::cqi_table_opts::table2;
csi_report.subband_size = asn1::rrc_nr::csi_report_cfg_s::subband_size_opts::value1;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 5;
} else {
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 7;
}
return SRSRAN_SUCCESS;
}
int fill_csi_meas_from_enb_cfg(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_meas_cfg)
{
// Fill CSI Report
if (fill_csi_report_from_enb_cfg(cfg, csi_meas_cfg) != SRSRAN_SUCCESS) {
get_logger(cfg).error("Failed to configure eNB CSI Report");
return SRSRAN_ERROR;
}
// Fill NZP-CSI Resources
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list_present = true;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {

@ -247,7 +247,9 @@ void rrc_nr::config_mac()
int ret = fill_serv_cell_from_enb_cfg(cfg, serv_cell);
srsran_assert(ret == SRSRAN_SUCCESS, "Failed to configure cell");
bool ret2 = srsran::make_pdsch_cfg_from_serv_cell(serv_cell, &cell.bwps[0].pdsch);
srsran_assert(ret2, "Failed to configure cell");
srsran_assert(ret2, "Invalid NR cell configuration.");
ret2 = srsran::make_csi_cfg_from_serv_cell(serv_cell, &cell.bwps[0].csi);
srsran_assert(ret2, "Invalid NR cell configuration.");
// FIXME: entire SI configuration, etc needs to be ported to NR
sched_interface::cell_cfg_t cell_cfg;
@ -929,9 +931,6 @@ int rrc_nr::ue::pack_sp_cell_cfg_ded_csi_meas_cfg(asn1::rrc_nr::cell_group_cfg_s
cell_group_cfg_pack.sp_cell_cfg.sp_cell_cfg_ded.csi_meas_cfg_present = true;
cell_group_cfg_pack.sp_cell_cfg.sp_cell_cfg_ded.csi_meas_cfg.set_setup();
// NOTE: Disable CQI configuration until srsENB NR PHY supports it
// pack_sp_cell_cfg_ded_csi_meas_cfg_csi_report_cfg(cell_group_cfg_pack);
// nzp-CSI-RS Resource and ResourceSet
fill_serv_cell_from_enb_cfg(parent->cfg, cell_group_cfg_pack.sp_cell_cfg.sp_cell_cfg_ded);
@ -1437,6 +1436,7 @@ void rrc_nr::ue::crnti_ce_received()
}
srsran::make_pdsch_cfg_from_serv_cell(cell_group_cfg.sp_cell_cfg.sp_cell_cfg_ded, &uecfg.phy_cfg.pdsch);
srsran::make_csi_cfg_from_serv_cell(cell_group_cfg.sp_cell_cfg.sp_cell_cfg_ded, &uecfg.phy_cfg.csi);
parent->mac->ue_cfg(rnti, uecfg);
}

Loading…
Cancel
Save