enb,rrc: derive ENDC configuration from cell config

* move ENDC config struct to main RRC config (same for all UEs)
* remove hard-coded measurement config for NR carrier
* now both TDD and FDD cells are correctly handled
master
Andre Puschmann 3 years ago
parent eb294fd4e3
commit 782aefa553

@ -43,6 +43,18 @@ struct srb_cfg_t {
asn1::rrc::srb_to_add_mod_s::rlc_cfg_c_ rlc_cfg;
};
// Parameter required for NR cell measurement handling
struct rrc_endc_cfg_t {
bool act_from_b1_event;
uint32_t nr_dl_arfcn;
uint32_t nr_band;
using ssb_nr_cfg = asn1::rrc::mtc_ssb_nr_r15_s;
using ssb_rs_cfg = asn1::rrc::rs_cfg_ssb_nr_r15_s;
ssb_nr_cfg::periodicity_and_offset_r15_c_ ssb_period_offset;
ssb_nr_cfg::ssb_dur_r15_e_ ssb_duration;
ssb_rs_cfg::subcarrier_spacing_ssb_r15_e_ ssb_ssc;
};
struct rrc_cfg_t {
uint32_t enb_id; ///< Required to pack SIB1
// Per eNB SIBs
@ -70,6 +82,7 @@ struct rrc_cfg_t {
uint32_t rlf_release_timer_ms;
srb_cfg_t srb1_cfg;
srb_cfg_t srb2_cfg;
rrc_endc_cfg_t endc_cfg;
};
constexpr uint32_t UE_PCELL_CC_IDX = 0;

@ -48,15 +48,6 @@ public:
uint16_t nr_rnti; /// RNTI assigned to UE on NR carrier
};
// Parameter of the (NR)-carrier required for NR cell measurement handling
struct rrc_endc_cfg_t {
bool act_from_b1_event = true; // ENDC will only be activated from B1 measurment
uint32_t nr_dl_arfcn = 634176;
uint32_t nr_band = 78;
asn1::rrc::rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_e_ ssb_ssc =
asn1::rrc::rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_opts::khz15;
};
rrc_endc(srsenb::rrc::ue* outer_ue, const rrc_endc_cfg_t& endc_cfg_);
bool fill_conn_recfg(asn1::rrc::rrc_conn_recfg_r8_ies_s* conn_recfg);

@ -1165,6 +1165,16 @@ int parse_cfg_files(all_args_t* args_, rrc_cfg_t* rrc_cfg_, rrc_nr_cfg_t* rrc_nr
rrc_cfg_->num_nr_cells = rrc_nr_cfg_->cell_list.size();
args_->rf.nof_carriers = rrc_cfg_->cell_list.size() + rrc_nr_cfg_->cell_list.size();
// update EUTRA RRC params for ENDC
if (rrc_nr_cfg_->cell_list.size() == 1) {
rrc_cfg_->endc_cfg.nr_dl_arfcn = rrc_nr_cfg_->cell_list.at(0).dl_arfcn;
rrc_cfg_->endc_cfg.nr_band = rrc_nr_cfg_->cell_list.at(0).band;
rrc_cfg_->endc_cfg.ssb_period_offset.set_sf5_r15();
rrc_cfg_->endc_cfg.ssb_duration = asn1::rrc::mtc_ssb_nr_r15_s::ssb_dur_r15_opts::sf1;
rrc_cfg_->endc_cfg.ssb_ssc = asn1::rrc::rs_cfg_ssb_nr_r15_s::subcarrier_spacing_ssb_r15_opts::khz15;
rrc_cfg_->endc_cfg.act_from_b1_event = true; // ENDC will only be activated from B1 measurment
}
return SRSRAN_SUCCESS;
}
@ -1424,6 +1434,12 @@ int set_derived_args_nr(all_args_t* args_, rrc_nr_cfg_t* rrc_cfg_, phy_cfg_t* ph
// Use helper class to derive NR carrier parameters
srsran::srsran_band_helper band_helper;
// we only support one NR cell
if (rrc_cfg_->cell_list.size() > 1) {
ERROR("Only a single NR cell supported.");
return SRSRAN_ERROR;
}
// Create NR dedicated cell configuration from RRC configuration
for (auto it = rrc_cfg_->cell_list.begin(); it != rrc_cfg_->cell_list.end(); ++it) {
auto& cfg = *it;

@ -51,7 +51,7 @@ bool rrc::ue::rrc_endc::fill_conn_recfg(asn1::rrc::rrc_conn_recfg_r8_ies_s* conn
}
if (not is_endc_activation_running() && endc_cfg.act_from_b1_event) {
// add hard-coded measConfig
// add measConfig
conn_recfg->meas_cfg_present = true;
meas_cfg_s& meas_cfg = conn_recfg->meas_cfg;
@ -60,14 +60,14 @@ bool rrc::ue::rrc_endc::fill_conn_recfg(asn1::rrc::rrc_conn_recfg_r8_ies_s* conn
meas_obj_to_add_mod_s meas_obj = {};
meas_obj.meas_obj_id = meas_cfg.meas_obj_to_add_mod_list.size() + 1;
meas_obj.meas_obj.set_meas_obj_nr_r15();
meas_obj.meas_obj.meas_obj_nr_r15().carrier_freq_r15 = endc_cfg.nr_dl_arfcn;
meas_obj.meas_obj.meas_obj_nr_r15().rs_cfg_ssb_r15.meas_timing_cfg_r15.periodicity_and_offset_r15.set_sf20_r15();
meas_obj.meas_obj.meas_obj_nr_r15().rs_cfg_ssb_r15.meas_timing_cfg_r15.ssb_dur_r15 =
asn1::rrc::mtc_ssb_nr_r15_s::ssb_dur_r15_opts::sf1;
meas_obj.meas_obj.meas_obj_nr_r15().rs_cfg_ssb_r15.subcarrier_spacing_ssb_r15 = endc_cfg.ssb_ssc;
meas_obj.meas_obj.meas_obj_nr_r15().ext = true;
meas_obj.meas_obj.meas_obj_nr_r15().band_nr_r15.set_present(true);
meas_obj.meas_obj.meas_obj_nr_r15().band_nr_r15.get()->set_setup() = endc_cfg.nr_band;
auto& meas_obj_nr = meas_obj.meas_obj.meas_obj_nr_r15();
meas_obj_nr.carrier_freq_r15 = endc_cfg.nr_dl_arfcn;
meas_obj_nr.rs_cfg_ssb_r15.meas_timing_cfg_r15.periodicity_and_offset_r15 = endc_cfg.ssb_period_offset;
meas_obj_nr.rs_cfg_ssb_r15.meas_timing_cfg_r15.ssb_dur_r15 = endc_cfg.ssb_duration;
meas_obj_nr.rs_cfg_ssb_r15.subcarrier_spacing_ssb_r15 = endc_cfg.ssb_ssc;
meas_obj_nr.ext = true;
meas_obj_nr.band_nr_r15.set_present(true);
meas_obj_nr.band_nr_r15.get()->set_setup() = endc_cfg.nr_band;
meas_cfg.meas_obj_to_add_mod_list.push_back(meas_obj);
// report config

@ -87,8 +87,7 @@ int rrc::ue::init()
mobility_handler = make_rnti_obj<rrc_mobility>(rnti, this);
if (parent->rrc_nr != nullptr) {
rrc::ue::rrc_endc::rrc_endc_cfg_t endc_cfg = {}; // TODO: set or derive parameter in eNB config
endc_handler = make_rnti_obj<rrc_endc>(rnti, this, endc_cfg);
endc_handler = make_rnti_obj<rrc_endc>(rnti, this, parent->cfg.endc_cfg);
}
return SRSRAN_SUCCESS;

Loading…
Cancel
Save