sched,bugfix - fix optimal cfi computation for sib/rar allocations

master
Francisco 4 years ago committed by Francisco Paisana
parent 19a043683c
commit 248f05bf08

@ -66,11 +66,11 @@ bool sf_cch_allocator::alloc_dci(alloc_type_t alloc_type, uint32_t aggr_idx, sch
// TODO: Make the alloc tree update lazy
alloc_record_t record{.user = user, .aggr_idx = aggr_idx, .alloc_type = alloc_type, .pusch_uci = has_pusch_grant};
if (is_dl_ctrl_alloc(alloc_type) and current_max_cfix > current_cfix) {
if (is_dl_ctrl_alloc(alloc_type) and nof_allocs() == 0 and current_max_cfix > current_cfix) {
// Given that CFI is not currently dynamic for ctrl allocs, in case of SIB/RAR alloc, start with optimal CFI
// in terms of nof CCE locs
uint32_t nof_locs = 0;
for (uint32_t cfix_tmp = current_max_cfix; cfix_tmp > current_cfix; ++cfix_tmp) {
for (uint32_t cfix_tmp = current_max_cfix; cfix_tmp > current_cfix; --cfix_tmp) {
const cce_cfi_position_table* dci_locs = get_cce_loc_table(record.alloc_type, record.user, cfix_tmp);
if ((*dci_locs)[record.aggr_idx].size() >= nof_locs) {
nof_locs = (*dci_locs)[record.aggr_idx].size();

@ -162,7 +162,7 @@ int test_pdcch_ue_and_sibs()
TESTASSERT(pdcch.alloc_dci(alloc_type_t::DL_RAR, 2));
TESTASSERT(pdcch.nof_allocs() == 2 and pdcch.nof_alloc_combinations() == 6);
TESTASSERT(pdcch.alloc_dci(alloc_type_t::DL_DATA, 2, &sched_ue, false));
TESTASSERT(pdcch.nof_allocs() == 3 and pdcch.nof_alloc_combinations() == 4);
TESTASSERT(pdcch.nof_allocs() == 3 and pdcch.nof_alloc_combinations() == 9);
// TEST: Ability to revert last allocation
pdcch.rem_last_dci();

@ -128,9 +128,8 @@ const sched::ue_cfg_t* common_sched_tester::get_current_ue_cfg(uint16_t rnti) co
int common_sched_tester::sim_cfg(sim_sched_args args)
{
sim_args0 = std::move(args);
rrc_ptr.reset(new rrc_dummy());
sched::init(rrc_ptr.get(), sim_args0.sched_args);
sched::init(&rrc_ptr, sim_args0.sched_args);
sched_sim.reset(new sched_sim_random{this, sim_args0.cell_cfg});
sched_stats.reset(new sched_result_stats{sim_args0.cell_cfg});

@ -125,7 +125,7 @@ protected:
virtual void new_test_tti();
virtual void before_sched() {}
std::unique_ptr<rrc_dummy> rrc_ptr;
rrc_dummy rrc_ptr;
};
} // namespace srsenb

Loading…
Cancel
Save