sched,nr: fix default ue configuration when prach arrives

master
Francisco 3 years ago committed by Andre Puschmann
parent d5b34696b4
commit 3b79393974

@ -477,7 +477,7 @@ phy_cfg_nr_default_t::phy_cfg_nr_default_t(const reference_cfg_t& reference_cfg)
csi.reports[0].channel_meas_id = 0;
csi.reports[0].type = SRSRAN_CSI_REPORT_TYPE_PERIODIC;
csi.reports[0].periodic.period = 20;
csi.reports[0].periodic.offset = 9;
csi.reports[0].periodic.offset = 10;
csi.reports[0].periodic.resource.format = SRSRAN_PUCCH_NR_FORMAT_2;
csi.reports[0].periodic.resource.starting_prb = 51;
csi.reports[0].periodic.resource.format = SRSRAN_PUCCH_NR_FORMAT_2;

@ -135,7 +135,7 @@ uint16_t mac_nr::reserve_rnti(uint32_t enb_cc_idx)
}
// Add new user to the scheduler so that it can RX/TX SRB0
srsenb::sched_nr_interface::ue_cfg_t ue_cfg = srsenb::get_default_ue_cfg(1);
srsenb::sched_nr_interface::ue_cfg_t ue_cfg = srsenb::get_rach_ue_cfg(enb_cc_idx);
sched.ue_cfg(rnti, ue_cfg);
return rnti;

@ -504,7 +504,7 @@ int rrc_nr::sgnb_reconfiguration_complete(uint16_t eutra_rnti, asn1::dyn_octstri
Every function in UE class is called from a mutex environment thus does not
need extra protection.
*******************************************************************************/
rrc_nr::ue::ue(rrc_nr* parent_, uint16_t rnti_) : parent(parent_), rnti(rnti_), uecfg(srsenb::get_default_ue_cfg(1)) {}
rrc_nr::ue::ue(rrc_nr* parent_, uint16_t rnti_) : parent(parent_), rnti(rnti_), uecfg(srsenb::get_rach_ue_cfg(0)) {}
void rrc_nr::ue::send_connection_setup()
{

@ -78,6 +78,29 @@ inline std::vector<sched_nr_interface::cell_cfg_t> get_default_cells_cfg(
return cells;
}
inline sched_nr_interface::ue_cfg_t get_rach_ue_cfg(uint32_t cc)
{
sched_nr_interface::ue_cfg_t uecfg{};
// set Pcell
uecfg.carriers.resize(1);
uecfg.carriers[0].active = true;
uecfg.carriers[0].cc = cc;
// set SRB0 as active
uecfg.ue_bearers[0].direction = mac_lc_ch_cfg_t::BOTH;
// set basic PHY config
uecfg.phy_cfg = srsran::phy_cfg_nr_default_t{srsran::phy_cfg_nr_default_t::reference_cfg_t{}};
uecfg.phy_cfg.csi = {};
// Note: dynamic MCS not yet supported
uecfg.fixed_dl_mcs = 28;
uecfg.fixed_ul_mcs = 28;
return uecfg;
}
inline sched_nr_interface::ue_cfg_t get_default_ue_cfg(
uint32_t nof_cc,
const srsran::phy_cfg_nr_t& phy_cfg = srsran::phy_cfg_nr_default_t{srsran::phy_cfg_nr_default_t::reference_cfg_t{}})

Loading…
Cancel
Save