sched,optimization - considering that cfi is static for sib/rar allocations, pick from the start of the tti, the optimal CFI in terms of largest number of CCE positions available

This commit is contained in:
Francisco 2021-03-15 20:08:22 +00:00 committed by Francisco Paisana
parent d0672d03fb
commit 544fe03db3
1 changed files with 15 additions and 0 deletions

View File

@ -66,6 +66,21 @@ 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) {
// 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) {
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();
current_cfix = cfix_tmp;
} else {
break;
}
}
}
// Try to allocate user in PDCCH for given CFI. If it fails, increment CFI.
uint32_t first_cfi = get_cfi();
bool success;