@@ -857,9 +857,7 @@ pucch_allocator_impl::find_common_and_ded_harq_res_available(cell_slot_resource_
857857 // In the case of Formats 0 and 2, the PUCCH (dedicated) resources that can be used when there are SR/CSI
858858 // pre-allocated are constrained in the PUCCH resource indicator. Therefore, the \ref multiplex_and_allocate_pucch
859859 // function might not preserve the requested PUCCH resource indicator \ref d_pri.
860- const bool is_f0_and_f2 = pucch_cfg.pucch_res_list .front ().format == pucch_format::FORMAT_0 and
861- pucch_cfg.pucch_res_list .back ().format == pucch_format::FORMAT_2;
862- if (not d_pri_ded.has_value () or (is_f0_and_f2 and d_pri_ded.value () != d_pri)) {
860+ if (not d_pri_ded.has_value () or (cell_cfg.is_pucch_f0_and_f2 () and d_pri_ded.value () != d_pri)) {
863861 resource_manager.cancel_last_ue_res_reservations (pucch_alloc.slot , rnti, ue_cell_cfg);
864862 continue ;
865863 }
@@ -1441,20 +1439,15 @@ pucch_allocator_impl::get_pucch_res_pre_multiplexing(slot_point
14411439 // set 1.
14421440 const pucch_res_set_idx pucch_set_idx =
14431441 new_bits.harq_ack_nof_bits <= 2U ? pucch_res_set_idx::set_0 : pucch_res_set_idx::set_1;
1444- // NOTE: Not all UEs are capable of transmitting more than 1 PUCCH; this would be the case in which the UE has
1445- // Format 0 resources, and it needs to transmit HARQ-ACK bits + SR or CSI in the same slot, and the resource symbols
1446- // for HARQ and SR/CSI do not overlap. In these slots, we force, the UE to use a PUCCH resource for HARQ-ACK that is
1447- // guaranteed to overlap (in symbols) with the SR or CSI resource.
1448- const bool has_format_0 =
1449- std::find_if (pucch_cfg.pucch_res_list .begin (), pucch_cfg.pucch_res_list .end (), [](const auto & pucch_res) {
1450- return pucch_res.format == pucch_format::FORMAT_0;
1451- }) != pucch_cfg.pucch_res_list .end ();
1452- const bool has_format_2 =
1453- std::find_if (pucch_cfg.pucch_res_list .begin (), pucch_cfg.pucch_res_list .end (), [](const auto & pucch_res) {
1454- return pucch_res.format == pucch_format::FORMAT_2;
1455- }) != pucch_cfg.pucch_res_list .end ();
1456- const bool ue_with_f0_sr_csi_allocation =
1457- has_format_0 and has_format_2 and (new_bits.sr_bits != sr_nof_bits::no_sr or new_bits.csi_part1_nof_bits != 0U );
1442+
1443+ // Not all UEs support transmission of more than 1 PUCCHs per slot. This would be the case if:
1444+ // - UE configured with F0 and F2 resources
1445+ // - UE needs to transmit HARQ-ACK + SR or CSI in the same slot
1446+ // - The resource for HARQ-ACK and the resource for SR/CSI do not overlap in symbols
1447+ // [Implementation-defined] In this case, we force the UE to use a PUCCH resource for HARQ-ACK that is guaranteed
1448+ // to overlap (in symbols) with the SR or CSI resource.
1449+ const bool ue_with_f0_sr_and_f2_csi_alloc =
1450+ cell_cfg.is_pucch_f0_and_f2 () and (new_bits.sr_bits != sr_nof_bits::no_sr or new_bits.csi_part1_nof_bits != 0U );
14581451
14591452 candidate_resources.harq_resource .emplace (pucch_grant{.type = pucch_grant_type::harq_ack});
14601453 pucch_grant& harq_candidate_grant = candidate_resources.harq_resource .value ();
@@ -1464,11 +1457,11 @@ pucch_allocator_impl::get_pucch_res_pre_multiplexing(slot_point
14641457 // or CSI in the same slot.
14651458 if ((ue_current_grants.pucch_grants .harq_resource .has_value () and
14661459 ue_current_grants.pucch_grants .harq_resource .value ().harq_id .pucch_set_idx == pucch_set_idx) or
1467- ue_with_f0_sr_csi_allocation ) {
1460+ ue_with_f0_sr_and_f2_csi_alloc ) {
14681461 // NOTE: If the UE has Format 0 resources, and it needs to transmit HARQ-ACK bits + SR or CSI in the same slot,
14691462 // use the HARQ-ACK resource that has highest PUCCH resource indicator; the UE's dedicated PUCCH config has been
14701463 // constructed in such a way that this resource overlaps with the SR or CSI resource.
1471- const unsigned pucch_res_ind = ue_with_f0_sr_csi_allocation
1464+ const unsigned pucch_res_ind = ue_with_f0_sr_and_f2_csi_alloc
14721465 ? get_pucch_resource_ind_f0_sr_csi (new_bits, pucch_cfg)
14731466 : ue_current_grants.pucch_grants .harq_resource .value ().harq_id .pucch_res_ind ;
14741467
@@ -1478,7 +1471,7 @@ pucch_allocator_impl::get_pucch_res_pre_multiplexing(slot_point
14781471 : resource_manager.reserve_harq_set_1_resource_by_res_indicator (
14791472 sl_tx, ue_current_grants.rnti , pucch_res_ind, pucch_cfg);
14801473 if (pucch_res == nullptr ) {
1481- if (ue_with_f0_sr_csi_allocation ) {
1474+ if (ue_with_f0_sr_and_f2_csi_alloc ) {
14821475 srsran_assertion_failure (" rnti={}: PUCCH HARQ-ACK that should be reserved for this UE is not available" ,
14831476 ue_current_grants.rnti );
14841477 } else {
0 commit comments