Skip to content

Commit 92001e9

Browse files
herlesupreethcodebot
authored andcommitted
sched: compute k1 taking into account nof. DL symbols in special slot
1 parent 2fb9fc4 commit 92001e9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/scheduler/config/serving_cell_config_factory.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ static_vector<uint8_t, 8> srsran::config_helpers::generate_k1_candidates(const t
6767
static_vector<uint8_t, 8> result;
6868
for (unsigned idx = 0; idx < nof_slots_per_tdd_period(tdd_cfg); ++idx) {
6969
// For every slot containing DL symbols check for corresponding k1 value.
70-
// TODO: Consider partial DL slots when scheduler supports it.
71-
if (get_active_tdd_dl_symbols(tdd_cfg, idx, cp).length() == get_nsymb_per_slot(cp)) {
70+
if (get_active_tdd_dl_symbols(tdd_cfg, idx, cp).length() > 0) {
7271
for (const auto k1 : valid_k1_values) {
7372
// TODO: Consider partial UL slots when scheduler supports it.
7473
if (not result.full() and get_active_tdd_ul_symbols(tdd_cfg, idx + k1, cp).length() == get_nsymb_per_slot(cp)) {

tests/unittests/scheduler/scheduler_tdd_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ TEST_P(scheduler_dl_tdd_tester, all_dl_slots_are_scheduled)
122122
this->run_slot();
123123

124124
// For every DL slot.
125-
// Note: Skip special slots in test for now.
126125
if (cell_cfg_list[0].is_dl_enabled(this->last_result_slot())) {
127126
// Ensure UE PDSCH allocations are made.
128127
ASSERT_FALSE(this->last_sched_res->dl.ue_grants.empty())
@@ -193,7 +192,8 @@ INSTANTIATE_TEST_SUITE_P(
193192
// clang-format off
194193
// csi_enabled, {ref_scs, pattern1={slot_period, DL_slots, DL_symbols, UL_slots, UL_symbols}, pattern2={...}}
195194
tdd_test_params{true, {subcarrier_spacing::kHz30, {10, 6, 5, 3, 4}, nullopt}},
196-
tdd_test_params{true, {subcarrier_spacing::kHz30, {10, 7, 5, 2, 4}, nullopt}},
195+
tdd_test_params{false, {subcarrier_spacing::kHz30, {10, 7, 5, 2, 4}, nullopt}},
196+
// tdd_test_params{true, {subcarrier_spacing::kHz30, {10, 7, 5, 2, 4}, nullopt}}, // Not enough space in PUCCH.
197197
// tdd_test_params{false, {subcarrier_spacing::kHz30, {10, 8, 5, 1, 4}, nullopt}}, // Not enough space in PUCCH.
198198
tdd_test_params{false, {subcarrier_spacing::kHz30, {6, 3, 5, 2, 0}, tdd_ul_dl_pattern{4, 4, 0, 0, 0}}}));
199199
// TODO: Support more TDD patterns.

tests/unittests/scheduler/test_utils/scheduler_test_bench.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class scheduler_test_bench
3737
next_slot(to_numerology_value(max_scs), test_rgen::uniform_int<unsigned>(0, 10239))
3838
{
3939
logger.set_context(next_slot.sfn(), next_slot.slot_index());
40+
srslog::flush();
4041
}
4142

4243
slot_point next_slot_rx() const { return next_slot - tx_rx_delay; }

0 commit comments

Comments
 (0)