SRSUE: add PRACH config present field in PHY configuration structure

This commit is contained in:
Xavier Arteaga 2020-09-30 16:20:03 +02:00 committed by Xavier Arteaga
parent 51b27fc255
commit ef9d77c966
3 changed files with 10 additions and 1 deletions

View File

@ -177,6 +177,8 @@ struct phy_cfg_t {
{
ul_cfg = {};
dl_cfg = {};
prach_cfg_present = false;
prach_cfg = {};
// CommonConfig defaults for non-zero values
@ -221,6 +223,8 @@ struct phy_cfg_t {
srslte_dl_cfg_t dl_cfg = {};
srslte_ul_cfg_t ul_cfg = {};
bool prach_cfg_present = false;
srslte_prach_cfg_t prach_cfg = {};
};

View File

@ -607,6 +607,7 @@ void set_phy_cfg_t_common_prach(phy_cfg_t* cfg, const asn1::rrc::prach_cfg_info_
cfg->prach_cfg.hs_flag = asn1_type->high_speed_flag;
}
cfg->prach_cfg.root_seq_idx = root_seq_idx;
cfg->prach_cfg_present = true;
}
void set_phy_cfg_t_common_pdsch(phy_cfg_t* cfg, const asn1::rrc::pdsch_cfg_common_s& asn1_type)

View File

@ -466,7 +466,11 @@ bool phy::set_config(srslte::phy_cfg_t config_, uint32_t cc_idx)
Info("Setting configuration\n");
bool reconfigure_prach = !cc_idx && (prach_cfg != config_.prach_cfg);
// The PRACH shall be re-configured only if:
// - The new configuration belongs to the primary cell
// - The PRACH configuration is present
// - The PRACH configuration has changed
bool reconfigure_prach = !cc_idx && config_.prach_cfg_present && (prach_cfg != config_.prach_cfg);
if (reconfigure_prach) {
prach_buffer.reset_cfg();