allow specification of subset of valid measurement gap offsets in rr.conf

master
Francisco 3 years ago committed by Andre Puschmann
parent 0996e50dce
commit a587d20252

@ -42,6 +42,7 @@ struct rrc_meas_cfg_t {
std::vector<asn1::rrc::report_cfg_eutra_s> meas_reports; std::vector<asn1::rrc::report_cfg_eutra_s> meas_reports;
asn1::rrc::quant_cfg_eutra_s quant_cfg; asn1::rrc::quant_cfg_eutra_s quant_cfg;
uint32_t meas_gap_period; uint32_t meas_gap_period;
std::vector<uint32_t> meas_gap_offset_subframe;
uint32_t allowed_meas_bw; uint32_t allowed_meas_bw;
}; };

@ -73,10 +73,10 @@ public:
const static uint32_t N_PUCCH_MAX_PRB = 4; // Maximum number of PRB to use for PUCCH ACK/NACK in CS mode const static uint32_t N_PUCCH_MAX_PRB = 4; // Maximum number of PRB to use for PUCCH ACK/NACK in CS mode
const static uint32_t N_PUCCH_MAX_RES = 3 * SRSRAN_NRE * N_PUCCH_MAX_PRB; const static uint32_t N_PUCCH_MAX_RES = 3 * SRSRAN_NRE * N_PUCCH_MAX_PRB;
uint32_t next_measgap_offset = 0; pucch_idx_sched_t sr_sched = {};
pucch_idx_sched_t sr_sched = {}; pucch_idx_sched_t cqi_sched = {};
pucch_idx_sched_t cqi_sched = {}; std::array<bool, N_PUCCH_MAX_RES> n_pucch_cs_used = {};
std::array<bool, N_PUCCH_MAX_RES> n_pucch_cs_used = {}; std::array<uint32_t, 14> meas_gap_alloc_map = {};
}; };
/** Storage of CQI/SR/PUCCH CS resources across multiple frequencies and for multiple users */ /** Storage of CQI/SR/PUCCH CS resources across multiple frequencies and for multiple users */

@ -62,6 +62,7 @@ cell_list =
//ul_earfcn = 21400; //ul_earfcn = 21400;
ho_active = false; ho_active = false;
//meas_gap_period = 0; // 0 (inactive), 40 or 80 //meas_gap_period = 0; // 0 (inactive), 40 or 80
//meas_gap_offset_subframe = [6, 12, 18, 24, 30];
// target_pusch_sinr = -1; // target_pusch_sinr = -1;
// target_pucch_sinr = -1; // target_pucch_sinr = -1;
// allowed_meas_bw = 6; // allowed_meas_bw = 6;

@ -760,6 +760,14 @@ static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root)
cell_cfg.root_seq_idx, cellroot, "root_seq_idx", rrc_cfg->sibs[1].sib2().rr_cfg_common.prach_cfg.root_seq_idx); cell_cfg.root_seq_idx, cellroot, "root_seq_idx", rrc_cfg->sibs[1].sib2().rr_cfg_common.prach_cfg.root_seq_idx);
parse_default_field(cell_cfg.initial_dl_cqi, cellroot, "initial_dl_cqi", 5u); parse_default_field(cell_cfg.initial_dl_cqi, cellroot, "initial_dl_cqi", 5u);
parse_default_field(cell_cfg.meas_cfg.meas_gap_period, cellroot, "meas_gap_period", 0u); parse_default_field(cell_cfg.meas_cfg.meas_gap_period, cellroot, "meas_gap_period", 0u);
if (cellroot.exists("meas_gap_offset_subframe")) {
cell_cfg.meas_cfg.meas_gap_offset_subframe.resize(cellroot["meas_gap_offset_subframe"].getLength());
for (uint32_t j = 0; j < (uint32_t)cellroot["meas_gap_offset_subframe"].getLength(); ++j) {
cell_cfg.meas_cfg.meas_gap_offset_subframe[j] = (uint32_t)cellroot["meas_gap_offset_subframe"][j];
srsran_assert(cell_cfg.meas_cfg.meas_gap_offset_subframe[j] < cell_cfg.meas_cfg.meas_gap_period,
"meas gap offsets must be smaller than meas gap period");
}
}
HANDLEPARSERCODE(parse_default_field(cell_cfg.target_pusch_sinr_db, cellroot, "target_pusch_sinr", -1)); HANDLEPARSERCODE(parse_default_field(cell_cfg.target_pusch_sinr_db, cellroot, "target_pusch_sinr", -1));
HANDLEPARSERCODE(parse_default_field(cell_cfg.target_pucch_sinr_db, cellroot, "target_pucch_sinr", -1)); HANDLEPARSERCODE(parse_default_field(cell_cfg.target_pucch_sinr_db, cellroot, "target_pucch_sinr", -1));
HANDLEPARSERCODE(parse_default_field(cell_cfg.enable_phr_handling, cellroot, "enable_phr_handling", false)); HANDLEPARSERCODE(parse_default_field(cell_cfg.enable_phr_handling, cellroot, "enable_phr_handling", false));

@ -218,6 +218,7 @@ bool ue_cell_ded_list::rem_last_cell()
bool ue_cell_ded_list::alloc_cell_resources(uint32_t ue_cc_idx) bool ue_cell_ded_list::alloc_cell_resources(uint32_t ue_cc_idx)
{ {
const uint32_t meas_gap_duration = 6;
// Allocate CQI, SR, and PUCCH CS resources. If failure, do not add new cell // Allocate CQI, SR, and PUCCH CS resources. If failure, do not add new cell
if (ue_cc_idx == UE_PCELL_CC_IDX) { if (ue_cc_idx == UE_PCELL_CC_IDX) {
if (not alloc_sr_resources(cfg.sr_cfg.period)) { if (not alloc_sr_resources(cfg.sr_cfg.period)) {
@ -226,9 +227,30 @@ bool ue_cell_ded_list::alloc_cell_resources(uint32_t ue_cc_idx)
} }
ue_cell_ded* cell = get_ue_cc_idx(UE_PCELL_CC_IDX); ue_cell_ded* cell = get_ue_cc_idx(UE_PCELL_CC_IDX);
cell->meas_gap_offset = 0;
cell->meas_gap_period = cell->cell_common->cell_cfg.meas_cfg.meas_gap_period; cell->meas_gap_period = cell->cell_common->cell_cfg.meas_cfg.meas_gap_period;
cell->meas_gap_offset = pucch_res->next_measgap_offset; if (cell->meas_gap_period > 0) {
pucch_res->next_measgap_offset += 6; if (not cell->cell_common->cell_cfg.meas_cfg.meas_gap_offset_subframe.empty()) {
// subframes specified
uint32_t min_users = std::numeric_limits<uint32_t>::max();
for (uint32_t i = 0; i < cell->cell_common->cell_cfg.meas_cfg.meas_gap_offset_subframe.size(); ++i) {
uint32_t idx_offset = cell->cell_common->cell_cfg.meas_cfg.meas_gap_offset_subframe[i] / meas_gap_duration;
if (pucch_res->meas_gap_alloc_map[idx_offset] < min_users) {
min_users = pucch_res->meas_gap_alloc_map[idx_offset];
cell->meas_gap_offset = cell->cell_common->cell_cfg.meas_cfg.meas_gap_offset_subframe[i];
}
}
} else {
uint32_t min_users = std::numeric_limits<uint32_t>::max();
for (uint32_t meas_offset = 0; meas_offset < cell->cell_common->cell_cfg.meas_cfg.meas_gap_period;
meas_offset += meas_gap_duration) {
if (pucch_res->meas_gap_alloc_map[meas_offset / meas_gap_duration] < min_users) {
min_users = pucch_res->meas_gap_alloc_map[meas_offset / meas_gap_duration];
cell->meas_gap_offset = meas_offset;
}
}
}
}
} else { } else {
if (ue_cc_idx == 1 and not n_pucch_cs_present) { if (ue_cc_idx == 1 and not n_pucch_cs_present) {
// Allocate resources for Format1b CS (will be optional PUCCH3/CS) // Allocate resources for Format1b CS (will be optional PUCCH3/CS)

Loading…
Cancel
Save