Skip to content

Commit

Permalink
increase ring size for test mode internal storage
Browse files Browse the repository at this point in the history
  • Loading branch information
frankist authored and codebot committed Dec 19, 2024
1 parent 213ca4c commit 0b400a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/srsran/scheduler/resource_grid_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ namespace srsran {
/// the numerology mu=0 (SCS=15kHz), it will be also satisfied for the same RING_ALLOCATOR_SIZE and larger numerologies.
/// This means that in contexts where mu is not known (e.g. compile time), mu=0 can be used for generality sake,
/// at the expense of more memory overhead.
constexpr inline unsigned get_allocator_ring_size_gt_min(unsigned minimum_value,
subcarrier_spacing scs = subcarrier_spacing::kHz15)
constexpr unsigned get_allocator_ring_size_gt_min(unsigned minimum_value,
subcarrier_spacing scs = subcarrier_spacing::kHz15)
{
auto power2_ceil = [](unsigned x) {
if (x <= 1)
Expand All @@ -44,7 +44,7 @@ constexpr inline unsigned get_allocator_ring_size_gt_min(unsigned mini
}

/// \brief Retrieves how far in advance the scheduler can allocate resources in the UL resource grid.
constexpr inline unsigned get_max_slot_ul_alloc_delay(unsigned ntn_cs_koffset)
constexpr unsigned get_max_slot_ul_alloc_delay(unsigned ntn_cs_koffset)
{
return SCHEDULER_MAX_K0 + std::max(SCHEDULER_MAX_K1, SCHEDULER_MAX_K2 + MAX_MSG3_DELTA) + ntn_cs_koffset;
}
Expand Down
5 changes: 4 additions & 1 deletion lib/du/du_high/test_mode/mac_test_mode_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ class test_ue_mac_sdu_tx_builder_adapter : public mac_sdu_tx_builder

size_t get_ring_size(const mac_cell_creation_request& cell_cfg)
{
// Estimation of the time it takes the UL lower-layers to process and forward CRC/UCI indications.
constexpr static unsigned MAX_UL_PHY_DELAY = 40;
// Note: The history ring size has to be a multiple of the TDD frame size in slots.
// Number of slots managed by this container.
return get_allocator_ring_size_gt_min(get_max_slot_ul_alloc_delay(cell_cfg.sched_req.ntn_cs_koffset));
return get_allocator_ring_size_gt_min(get_max_slot_ul_alloc_delay(cell_cfg.sched_req.ntn_cs_koffset) +
MAX_UL_PHY_DELAY);
}

} // namespace
Expand Down

0 comments on commit 0b400a0

Please sign in to comment.