|
|
@ -758,19 +758,23 @@ alloc_outcome_t sf_sched::alloc_dl_user(sched_ue* user, const rbgmask_t& user_ma
|
|
|
|
const srslte_cqi_report_cfg_t& cqi_report = ue_cfg.dl_cfg.cqi_report;
|
|
|
|
const srslte_cqi_report_cfg_t& cqi_report = ue_cfg.dl_cfg.cqi_report;
|
|
|
|
if (has_scells and srslte_cqi_periodic_send(&cqi_report, get_tti_tx_ul(), SRSLTE_FDD)) {
|
|
|
|
if (has_scells and srslte_cqi_periodic_send(&cqi_report, get_tti_tx_ul(), SRSLTE_FDD)) {
|
|
|
|
bool has_pusch_grant = is_ul_alloc(user) or cc_results->is_ul_alloc(user->get_rnti());
|
|
|
|
bool has_pusch_grant = is_ul_alloc(user) or cc_results->is_ul_alloc(user->get_rnti());
|
|
|
|
bool has_dl_allocs = cc_results->is_dl_alloc(user->get_rnti());
|
|
|
|
if (not has_pusch_grant) {
|
|
|
|
if (not has_pusch_grant and has_dl_allocs) {
|
|
|
|
// Try to allocate small PUSCH grant, if there are no pending UL retxs for this TTI
|
|
|
|
// Try to allocate small PUSCH grant, if there are no pending UL retxs
|
|
|
|
alloc_outcome_t pusch_alloc_outcome = alloc_outcome_t::PUCCH_COLLISION;
|
|
|
|
ul_harq_proc* hul = user->get_ul_harq(get_tti_tx_ul(), ue_cc_idx);
|
|
|
|
ul_harq_proc* hul = user->get_ul_harq(get_tti_tx_ul(), ue_cc_idx);
|
|
|
|
bool has_retx = hul->has_pending_retx();
|
|
|
|
bool has_retx = hul->has_pending_retx();
|
|
|
|
if (not has_retx) {
|
|
|
|
if (not has_retx) {
|
|
|
|
ul_harq_proc::ul_alloc_t alloc = {};
|
|
|
|
ul_harq_proc::ul_alloc_t alloc = {};
|
|
|
|
uint32_t L = user->get_required_prb_ul(ue_cc_idx, srslte::ceil_div(SRSLTE_UCI_CQI_CODED_PUCCH_B + 2, 8));
|
|
|
|
uint32_t L = user->get_required_prb_ul(ue_cc_idx, srslte::ceil_div(SRSLTE_UCI_CQI_CODED_PUCCH_B + 2, 8));
|
|
|
|
tti_alloc.find_ul_alloc(L, &alloc);
|
|
|
|
tti_alloc.find_ul_alloc(L, &alloc);
|
|
|
|
if (alloc.L == 0 or not alloc_ul_user(user, alloc)) {
|
|
|
|
if (alloc.L > 0 and alloc_ul_user(user, alloc)) {
|
|
|
|
return alloc_outcome_t::PUCCH_COLLISION;
|
|
|
|
pusch_alloc_outcome = alloc_outcome_t::SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// For SCells, if we can't allocate small PUSCH grant, abort DL allocation
|
|
|
|
|
|
|
|
if (ue_cc_idx != 0 and pusch_alloc_outcome != alloc_outcome_t::SUCCESS) {
|
|
|
|
|
|
|
|
return pusch_alloc_outcome;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|