@@ -263,7 +263,11 @@ std::optional<unsigned> pucch_allocator_impl::alloc_ded_pucch_harq_ack_ue(cell_r
263263 // Get the slot allocation grid considering the PDSCH delay (k0) and the PUCCH delay wrt PDSCH (k1).
264264 cell_slot_resource_allocator& pucch_slot_alloc = res_alloc[k0 + k1 + res_alloc.cfg .ntn_cs_koffset ];
265265
266- resource_manager.reset_last_ue_allocation ();
266+ // The PUCCH allocation may result in a temporary reservation of PUCCH resources, which need to be released in case of
267+ // failure or in case the multiplexing results in a different final PUCCH resource. If we don't reset the previous
268+ // record, we could release the resources that have been allocated for other UEs of allocated for this UE in a
269+ // different slot.
270+ resource_manager.reset_latest_reserved_res_tracker ();
267271
268272 slot_point sl_ack = pucch_slot_alloc.slot ;
269273
@@ -280,7 +284,7 @@ std::optional<unsigned> pucch_allocator_impl::alloc_ded_pucch_harq_ack_ue(cell_r
280284 std::optional<unsigned > pucch_res_ind =
281285 multiplex_and_allocate_pucch (pucch_slot_alloc, new_bits, *existing_grant_it, ue_cell_cfg);
282286 if (not pucch_res_ind) {
283- resource_manager.cancel_last_ue_allocations (sl_ack, crnti, ue_cell_cfg);
287+ resource_manager.cancel_last_ue_res_reservations (sl_ack, crnti, ue_cell_cfg);
284288 }
285289 return pucch_res_ind;
286290 } else {
@@ -304,7 +308,7 @@ void pucch_allocator_impl::pucch_allocate_sr_opportunity(cell_slot_resource_allo
304308 }
305309
306310 if (pucch_grants_alloc_grid[sl_tx.to_uint ()].full ()) {
307- logger.info (" rnti={}: PUCCH HARQ-ACK allocation for slot={} skipped. Cause: scheduler cache full" ,
311+ logger.info (" rnti={}: PUCCH HARQ-ACK allocation for slot={} skipped. Cause: PUCCH allocator grant list is full" ,
308312 crnti,
309313 pucch_slot_alloc.slot );
310314 return ;
@@ -368,7 +372,11 @@ void pucch_allocator_impl::pucch_allocate_csi_opportunity(cell_slot_resource_all
368372{
369373 const slot_point sl_tx = pucch_slot_alloc.slot ;
370374
371- resource_manager.reset_last_ue_allocation ();
375+ // The PUCCH allocation may result in a temporary reservation of PUCCH resources, which need to be released in case of
376+ // failure or in case the multiplexing results in a different final PUCCH resource. If we don't reset the previous
377+ // record, we could release the resources that have been allocated for other UEs of allocated for this UE in a
378+ // different slot.
379+ resource_manager.reset_latest_reserved_res_tracker ();
372380
373381 // [Implementation-defined] We only allow a max number of PUCCH + PUSCH grants per slot.
374382 if (pucch_slot_alloc.result .ul .pucchs .size () >=
@@ -392,19 +400,20 @@ void pucch_allocator_impl::pucch_allocate_csi_opportunity(cell_slot_resource_all
392400 if (existing_grant_it != pucch_grants_alloc_grid[sl_tx.to_uint ()].end () and existing_grant_it->has_common_pucch ) {
393401 // Allocation of dedicated + common resources are handled by allocating PUCCH common on existing CSI, not the other
394402 // way around. If the function enters the path, it means it too early to start scheduling the CSI.
395- logger.info (" rnti={}: CSI occasion allocation for slot={} skipped. Cause: existing PUCCH common grant" ,
403+ logger.info (" rnti={}: CSI occasion allocation for slot={} skipped. Cause: There is a PUCCH common grant"
404+ " allocated at this slot" ,
396405 crnti,
397406 pucch_slot_alloc.slot );
398407 return ;
399408 }
400409
401410 // Handle case of existing PUCCHs with possible multiplexing.
402411 pucch_uci_bits bits_for_uci = existing_grant_it->pucch_grants .get_uci_bits ();
403- srsran_assert (bits_for_uci.csi_part1_nof_bits == 0 , " PUCCH grant for CSI already been allocated" );
412+ srsran_assert (bits_for_uci.csi_part1_nof_bits == 0 , " PUCCH grant for CSI has already been allocated" );
404413 bits_for_uci.csi_part1_nof_bits = csi_part1_nof_bits;
405414 auto alloc_outcome = multiplex_and_allocate_pucch (pucch_slot_alloc, bits_for_uci, *existing_grant_it, ue_cell_cfg);
406415 if (not alloc_outcome.has_value ()) {
407- resource_manager.cancel_last_ue_allocations (sl_tx, crnti, ue_cell_cfg);
416+ resource_manager.cancel_last_ue_res_reservations (sl_tx, crnti, ue_cell_cfg);
408417 }
409418}
410419
@@ -988,7 +997,12 @@ pucch_allocator_impl::find_common_and_ded_harq_res_available(cell_slot_resource_
988997 // As per Section 9.2.1, TS 38.213, this is the max value of \f$\Delta_{PRI}\f$, which is a 3-bit unsigned.
989998 const unsigned max_d_pri = 7 ;
990999 for (unsigned d_pri = 0 ; d_pri != max_d_pri + 1 ; ++d_pri) {
991- resource_manager.reset_last_ue_allocation ();
1000+ // The PUCCH allocation may result in a temporary reservation of PUCCH resources, which need to be released in case
1001+ // of failure or in case the multiplexing results in a different final PUCCH resource. If we don't reset the
1002+ // previous record, we could release the resources that have been allocated for other UEs of allocated for this UE
1003+ // in a different slot.
1004+ // Reset at each iteration, as a new iteration indicates that the previous allocation failed.
1005+ resource_manager.reset_latest_reserved_res_tracker ();
9921006
9931007 // r_PUCCH, as per Section 9.2.1, TS 38.213.
9941008 const unsigned r_pucch = get_pucch_default_resource_index (start_cce_idx, nof_coreset_cces, d_pri);
@@ -1030,7 +1044,7 @@ pucch_allocator_impl::find_common_and_ded_harq_res_available(cell_slot_resource_
10301044 pucch_res_ind = multiplex_and_allocate_pucch (pucch_alloc, bits_for_uci, existing_grants, ue_cell_cfg, true );
10311045
10321046 if (not pucch_res_ind.has_value ()) {
1033- resource_manager.cancel_last_ue_allocations (pucch_alloc.slot , rnti, ue_cell_cfg);
1047+ resource_manager.cancel_last_ue_res_reservations (pucch_alloc.slot , rnti, ue_cell_cfg);
10341048 continue ;
10351049 }
10361050
@@ -1057,7 +1071,7 @@ std::optional<unsigned> pucch_allocator_impl::allocate_harq_grant(cell_slot_reso
10571071 }
10581072
10591073 if (pucch_grants_alloc_grid[sl_tx.to_uint ()].full ()) {
1060- logger.info (" rnti={}: PUCCH HARQ-ACK allocation for slot={} skipped. Cause: scheduler cache full" ,
1074+ logger.info (" rnti={}: PUCCH HARQ-ACK allocation for slot={} skipped. Cause: PUCCH allocator grant list is full" ,
10611075 crnti,
10621076 pucch_slot_alloc.slot );
10631077 return std::nullopt ;
@@ -1108,7 +1122,7 @@ void pucch_allocator_impl::allocate_csi_grant(cell_slot_resource_allocator& pucc
11081122 }
11091123
11101124 if (pucch_grants_alloc_grid[sl_tx.to_uint ()].full ()) {
1111- logger.info (" rnti={}: PUCCH HARQ-ACK allocation for slot={} skipped. Cause: scheduler cache full" ,
1125+ logger.info (" rnti={}: PUCCH HARQ-ACK allocation for slot={} skipped. Cause: PUCCH allocator grant list is full" ,
11121126 crnti,
11131127 pucch_slot_alloc.slot );
11141128 return ;
0 commit comments