Skip to content

Commit 3dcd8bc

Browse files
frankistcodebot
authored andcommitted
sched: mark guard pucch-pusch rbs for common PUCCHs
1 parent 28812d3 commit 3dcd8bc

File tree

3 files changed

+47
-23
lines changed

3 files changed

+47
-23
lines changed

apps/units/flexible_o_du/o_du_high/du_high/du_high_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ struct du_high_unit_ul_common_config {
117117
/// Maximum number of PUSCH + PUCCH grants per slot.
118118
unsigned max_ul_grants_per_slot = 32U;
119119
/// Minimum distance in PRBs between PUCCH and UE-dedicated PUSCH grants.
120-
unsigned min_pucch_pusch_prb_distance = 1U;
120+
unsigned min_pucch_pusch_prb_distance = 0U;
121121
};
122122

123123
/// PDSCH application configuration.

include/srsran/scheduler/config/scheduler_expert_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ struct scheduler_ue_expert_config {
185185
/// Boundaries in RB interval for resource allocation of UE PUSCHs.
186186
crb_interval pusch_crb_limits{0, MAX_NOF_PRBS};
187187
/// Minimum distance between PUCCH and PUSCH in number of PRBs.
188-
unsigned min_pucch_pusch_prb_distance = 1;
188+
unsigned min_pucch_pusch_prb_distance = 0;
189189
/// Expert parameters to be passed to the policy scheduler.
190190
policy_scheduler_expert_config strategy_cfg = time_qos_scheduler_expert_config{};
191191
/// \brief Size of the group of UEs that is considered for newTx DL allocation in a given slot. The groups of UEs

lib/scheduler/pucch_scheduling/pucch_allocator_impl.cpp

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,38 @@ static pucch_resource* get_sr_pucch_res_cfg(const pucch_config& pucch_cfg)
6060
return res_cfg != pucch_res_list.end() ? const_cast<pucch_resource*>(res_cfg) : nullptr;
6161
}
6262

63+
static void mark_pucch_in_resource_grid(cell_slot_resource_allocator& pucch_slot_alloc,
64+
const grant_info& first_hop_grant,
65+
const std::optional<grant_info>& second_hop_grant,
66+
const crb_interval& ul_bwp_crbs,
67+
const scheduler_expert_config& expert_cfg)
68+
{
69+
const unsigned guard_rbs = expert_cfg.ue.min_pucch_pusch_prb_distance;
70+
71+
if (guard_rbs == 0) {
72+
pucch_slot_alloc.ul_res_grid.fill(first_hop_grant);
73+
if (second_hop_grant.has_value()) {
74+
pucch_slot_alloc.ul_res_grid.fill(second_hop_grant.value());
75+
}
76+
return;
77+
}
78+
79+
// Add guard band to the allocated grid resources to minimize cross PUCCH-PUSCH interference.
80+
auto grant_extended = first_hop_grant;
81+
unsigned start = first_hop_grant.crbs.start() >= guard_rbs ? first_hop_grant.crbs.start() - guard_rbs : 0;
82+
grant_extended.crbs = {start, first_hop_grant.crbs.stop() + guard_rbs};
83+
grant_extended.crbs.intersect(ul_bwp_crbs);
84+
pucch_slot_alloc.ul_res_grid.fill(grant_extended);
85+
86+
if (second_hop_grant.has_value()) {
87+
start = second_hop_grant->crbs.start() >= guard_rbs ? second_hop_grant->crbs.start() - guard_rbs : 0;
88+
grant_extended = *second_hop_grant;
89+
grant_extended.crbs = {start, second_hop_grant->crbs.stop() + guard_rbs};
90+
grant_extended.crbs.intersect(ul_bwp_crbs);
91+
pucch_slot_alloc.ul_res_grid.fill(grant_extended);
92+
}
93+
}
94+
6395
static void mark_pucch_in_resource_grid(cell_slot_resource_allocator& pucch_slot_alloc,
6496
const pucch_resource& pucch_res,
6597
const ue_cell_configuration& ue_cell_cfg)
@@ -88,23 +120,9 @@ static void mark_pucch_in_resource_grid(cell_slot_resource_allocator& pucch_slot
88120
first_hop_grant = {init_ul_bwp.scs, symbols, crbs};
89121
}
90122

91-
// Add guard band to the allocated grid resources to minimize cross PUCCH-PUSCH interference.
92-
const unsigned guard_rbs = ue_cell_cfg.cell_cfg_common.expert_cfg.ue.min_pucch_pusch_prb_distance;
93-
if (guard_rbs > 0) {
94-
unsigned start = first_hop_grant.crbs.start() >= guard_rbs ? first_hop_grant.crbs.start() - guard_rbs : 0;
95-
first_hop_grant.crbs = {start, first_hop_grant.crbs.stop() + guard_rbs};
96-
first_hop_grant.crbs.intersect(init_ul_bwp.crbs);
97-
if (second_hop_grant.has_value()) {
98-
start = second_hop_grant->crbs.start() >= guard_rbs ? second_hop_grant->crbs.start() - guard_rbs : 0;
99-
second_hop_grant->crbs = {start, second_hop_grant->crbs.stop() + guard_rbs};
100-
second_hop_grant->crbs.intersect(init_ul_bwp.crbs);
101-
}
102-
}
103-
104-
pucch_slot_alloc.ul_res_grid.fill(first_hop_grant);
105-
if (second_hop_grant.has_value()) {
106-
pucch_slot_alloc.ul_res_grid.fill(second_hop_grant.value());
107-
}
123+
// Fill Slot grid.
124+
mark_pucch_in_resource_grid(
125+
pucch_slot_alloc, first_hop_grant, second_hop_grant, init_ul_bwp.crbs, ue_cell_cfg.cell_cfg_common.expert_cfg);
108126
}
109127

110128
////////////// Public functions //////////////
@@ -169,8 +187,11 @@ std::optional<unsigned> pucch_allocator_impl::alloc_common_pucch_harq_ack_ue(cel
169187
}
170188

171189
// Fill Slot grid.
172-
pucch_slot_alloc.ul_res_grid.fill(pucch_res.value().first_hop_res);
173-
pucch_slot_alloc.ul_res_grid.fill(pucch_res.value().second_hop_res);
190+
mark_pucch_in_resource_grid(pucch_slot_alloc,
191+
pucch_res->first_hop_res,
192+
pucch_res->second_hop_res,
193+
cell_cfg.ul_cfg_common.init_ul_bwp.generic_params.crbs,
194+
cell_cfg.expert_cfg);
174195

175196
// Fill scheduler output.
176197
pucch_info& pucch_info = pucch_slot_alloc.result.ul.pucchs.emplace_back();
@@ -1008,8 +1029,11 @@ void pucch_allocator_impl::compute_pucch_common_params_and_alloc(cell_slot_resou
10081029
.format = pucch_res.format});
10091030

10101031
// Allocate common HARQ-ACK resource.
1011-
pucch_alloc.ul_res_grid.fill(first_hop_grant);
1012-
pucch_alloc.ul_res_grid.fill(second_hop_grant);
1032+
mark_pucch_in_resource_grid(pucch_alloc,
1033+
first_hop_grant,
1034+
second_hop_grant,
1035+
cell_cfg.ul_cfg_common.init_ul_bwp.generic_params.crbs,
1036+
cell_cfg.expert_cfg);
10131037

10141038
// Update the PUCCH grants with the common resource.
10151039
auto& pucch_grants = pucch_grants_alloc_grid[pucch_alloc.slot.to_uint()];

0 commit comments

Comments
 (0)