Skip to content

Commit

Permalink
sched: fix failing ue scheduler test
Browse files Browse the repository at this point in the history
  • Loading branch information
frankist committed Nov 20, 2024
1 parent 818544f commit a713130
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 125 deletions.
1 change: 0 additions & 1 deletion lib/scheduler/policy/ue_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "../ue_context/ue.h"
#include "../ue_scheduling/ue_repository.h"
#include "../ue_scheduling/ue_scheduler.h"
#include "srsran/ran/slot_point.h"

namespace srsran {

Expand Down
6 changes: 3 additions & 3 deletions lib/scheduler/ue_scheduling/ue_cell_grid_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,6 @@ ue_cell_grid_allocator::allocate_ul_grant(const ue_pusch_grant& grant, ran_slice
// Compute MCS and PRBs based on grant parameters.
mcs_prbs = ue_cc->required_ul_prbs(pusch_td_cfg, grant.recommended_nof_bytes.value(), dci_type);

// Apply minimum RB limit per grant.
mcs_prbs.n_prbs = std::max(mcs_prbs.n_prbs, expert_cfg.pusch_nof_rbs.start());

// Due to the pre-allocated UCI bits, MCS 0 and PRB 1 would not leave any space for the payload on the TBS, as
// all the space would be taken by the UCI bits. As a result of this, the effective code rate would be 0 and the
// allocation would fail and be postponed to the next slot.
Expand Down Expand Up @@ -722,6 +719,9 @@ ue_cell_grid_allocator::allocate_ul_grant(const ue_pusch_grant& grant, ran_slice
mcs_prbs.n_prbs += nof_rbs_left;
}

// Apply minimum RB limit per grant.
mcs_prbs.n_prbs = std::max(mcs_prbs.n_prbs, expert_cfg.pusch_nof_rbs.start());

// Re-apply nof. PUSCH RBs to allocate limits.
mcs_prbs.n_prbs = adjust_ue_max_ul_nof_rbs(expert_cfg, *ue_cc, dci_type, mcs_prbs.n_prbs);
}
Expand Down
Loading

0 comments on commit a713130

Please sign in to comment.