Skip to content

Commit 3c7b857

Browse files
author
Ismael
committed
Merge remote-tracking branch 'origin/fix_sched_ue_rem' into fix_sched_ue_rem
2 parents d7e21c3 + 933d507 commit 3c7b857

File tree

51 files changed

+723
-330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+723
-330
lines changed

include/srsran/ran/csi_rs/csi_meas_config.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ struct csi_aperiodic_trigger_state {
281281
bool operator!=(const csi_aperiodic_trigger_state& rhs) const { return !(rhs == *this); }
282282
};
283283

284-
/// Used to configure the UE with a list of aperiodic trigger states. Each codepoint of the DCI field "CSI request" is
285-
/// associated with one trigger state.
284+
/// \brief Used to configure the UE with a list of aperiodic trigger states. Each codepoint of the DCI field
285+
/// "CSI request" is associated with one trigger state. List size ranges from 0 to MAX_NOF_CSI_APERIODIC_TRIGGERS.
286286
/// \remark TS 38.331, \c CSI-AperiodicTriggerStateList.
287-
using csi_aperiodic_trigger_state_list = static_vector<csi_aperiodic_trigger_state, MAX_NOF_CSI_APERIODIC_TRIGGERS>;
287+
using csi_aperiodic_trigger_state_list = std::vector<csi_aperiodic_trigger_state>;
288288

289289
/// See TS 38.331, \c CSI-SemiPersistentOnPUSCH-TriggerState.
290290
struct csi_semi_persistent_on_pusch_trigger_state {
@@ -322,7 +322,7 @@ struct csi_meas_config {
322322
std::vector<csi_report_config> csi_report_cfg_list;
323323
/// Size of CSI request field in DCI (bits). See TS 38.214, clause 5.2.1.5.1.
324324
std::optional<unsigned> report_trigger_size;
325-
std::optional<csi_aperiodic_trigger_state_list> aperiodic_trigger_state_list;
325+
csi_aperiodic_trigger_state_list aperiodic_trigger_state_list;
326326
std::optional<csi_semi_persistent_on_pusch_trigger_state_list> semi_persistent_on_pusch_trigger_state_list;
327327

328328
bool operator==(const csi_meas_config& rhs) const
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
*
3+
* Copyright 2021-2024 Software Radio Systems Limited
4+
*
5+
* By using this file, you agree to the terms and conditions set
6+
* forth in the LICENSE file which can be found at the top level of
7+
* the distribution.
8+
*
9+
*/
10+
11+
#pragma once
12+
13+
#include "srsran/ran/slot_point.h"
14+
#include "srsran/ran/subcarrier_spacing.h"
15+
16+
namespace srsran {
17+
18+
/// Measurement Gap Repetition Period (MGRP) in msec, as per TS 38.331.
19+
enum class meas_gap_repetition_period : uint8_t { ms20 = 20, ms40 = 40, ms80 = 80, ms160 = 160 };
20+
21+
/// Measurement Gap Length (MGL) in msec, as per TS 38.331.
22+
enum class meas_gap_length : uint8_t { ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6 };
23+
24+
/// Configuration of a Measurement Gap as per TS 38.331, GapConfig.
25+
struct meas_gap_config {
26+
/// Gap offset of the pattern in msec. Value must be between 0 and gap repetition period - 1.
27+
unsigned offset;
28+
/// Measurement Gap Length (MGL).
29+
meas_gap_length mgl;
30+
/// Measurement Gap Repetition Period (MGRP).
31+
meas_gap_repetition_period mgrp;
32+
};
33+
34+
/// Convert measurement gap length into a float in milliseconds.
35+
inline unsigned meas_gap_length_to_msec(meas_gap_length len)
36+
{
37+
constexpr static std::array<float, 6> vals{1.5, 3, 3.5, 4, 5.5, 6};
38+
return vals[static_cast<unsigned>(len)];
39+
}
40+
41+
/// Determines whether a slot is inside the measurement gap.
42+
inline bool is_inside_meas_gap(const meas_gap_config& gap, slot_point sl)
43+
{
44+
unsigned period_slots = static_cast<uint8_t>(gap.mgrp) * sl.nof_slots_per_subframe();
45+
unsigned length_slots = meas_gap_length_to_msec(gap.mgl) * sl.nof_slots_per_subframe();
46+
unsigned slot_mod = sl.to_uint() % period_slots;
47+
return slot_mod <= length_slots;
48+
}
49+
50+
} // namespace srsran

include/srsran/scheduler/config/serving_cell_config.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "srsran/mac/time_alignment_group_config.h"
1515
#include "srsran/ran/carrier_configuration.h"
1616
#include "srsran/ran/csi_rs/csi_meas_config.h"
17+
#include "srsran/ran/meas_gap_config.h"
1718
#include "srsran/ran/pdcch/downlink_preemption.h"
1819
#include "srsran/ran/pdsch/pdsch_mcs.h"
1920
#include "srsran/ran/pdsch/pdsch_prb_bundling.h"
@@ -250,10 +251,13 @@ struct serving_cell_config {
250251
tag_id_t tag_id;
251252
};
252253

253-
/// UE-dedicated configuration for serving cell, as per TS38.331.
254+
/// UE-dedicated configuration for serving cell.
254255
struct cell_config_dedicated {
255-
serv_cell_index_t serv_cell_idx;
256+
serv_cell_index_t serv_cell_idx;
257+
/// Serving Cell Configuration as per TS 38.331.
256258
serving_cell_config serv_cell_cfg;
259+
/// Measurement Gap Configuration for the cell.
260+
std::optional<meas_gap_config> meas_gap_cfg;
257261
};
258262

259263
} // namespace srsran

lib/du/du_high/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# the distribution.
77
#
88

9-
add_subdirectory(adapters)
109
add_subdirectory(du_manager)
10+
add_subdirectory(test_mode)
1111

1212
add_library(srsran_du_high STATIC
1313
du_high_impl.cpp

lib/du/du_high/adapters/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@
66
# the distribution.
77
#
88

9-
add_library(srsran_du_high_adapters
10-
mac_test_mode_adapter.cpp
11-
f1ap_test_mode_adapter.cpp)
12-
target_link_libraries(srsran_du_high_adapters srslog srsran_support srsran_du_manager srsran_mac srsran_f1ap_du srsran_e2)

lib/du/du_high/du_high_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "adapters/adapters.h"
1313
#include "adapters/du_high_adapter_factories.h"
1414
#include "adapters/f1ap_adapters.h"
15-
#include "adapters/f1ap_test_mode_adapter.h"
15+
#include "test_mode/f1ap_test_mode_adapter.h"
1616
#include "srsran/du/du_high/du_manager/du_manager_factory.h"
1717
#include "srsran/f1ap/du/f1ap_du_factory.h"
1818
#include "srsran/support/executors/task_redispatcher.h"

lib/du/du_high/du_manager/converters/asn1_csi_meas_config_helpers.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,15 +1273,15 @@ void srsran::srs_du::calculate_csi_meas_config_diff(asn1::rrc_nr::csi_meas_cfg_s
12731273
out.report_trigger_size = dest.report_trigger_size.value();
12741274
}
12751275

1276-
if ((dest.aperiodic_trigger_state_list.has_value() and not src.aperiodic_trigger_state_list.has_value()) or
1277-
(dest.aperiodic_trigger_state_list.has_value() and src.aperiodic_trigger_state_list.has_value() and
1276+
if ((not dest.aperiodic_trigger_state_list.empty() and src.aperiodic_trigger_state_list.empty()) or
1277+
(not dest.aperiodic_trigger_state_list.empty() and not src.aperiodic_trigger_state_list.empty() and
12781278
dest.aperiodic_trigger_state_list != src.aperiodic_trigger_state_list)) {
12791279
out.aperiodic_trigger_state_list_present = true;
12801280
auto& ap_trigger_state_list = out.aperiodic_trigger_state_list.set_setup();
1281-
for (const auto& trigger_state : dest.aperiodic_trigger_state_list.value()) {
1281+
for (const auto& trigger_state : dest.aperiodic_trigger_state_list) {
12821282
ap_trigger_state_list.push_back(make_asn1_aperiodic_trigger_state(trigger_state));
12831283
}
1284-
} else if (src.aperiodic_trigger_state_list.has_value() and not dest.aperiodic_trigger_state_list.has_value()) {
1284+
} else if (not src.aperiodic_trigger_state_list.empty() and dest.aperiodic_trigger_state_list.empty()) {
12851285
out.aperiodic_trigger_state_list_present = true;
12861286
out.aperiodic_trigger_state_list.set_release();
12871287
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright 2021-2024 Software Radio Systems Limited
3+
#
4+
# By using this file, you agree to the terms and conditions set
5+
# forth in the LICENSE file which can be found at the top level of
6+
# the distribution.
7+
#
8+
9+
add_library(srsran_du_high_adapters
10+
mac_test_mode_adapter.cpp
11+
f1ap_test_mode_adapter.cpp
12+
mac_test_mode_helpers.cpp)
13+
target_link_libraries(srsran_du_high_adapters srslog srsran_support srsran_du_manager srsran_mac srsran_f1ap_du srsran_e2)

0 commit comments

Comments
 (0)