Skip to content

Commit a7c56f9

Browse files
committed
phy_adaptor: propagate undetected SRs carried in format2 in the UCI.indication
1 parent fc61787 commit a7c56f9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/fapi_adaptor/phy/phy_to_fapi_results_event_translator.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,18 @@ static void fill_format_2_3_4_harq(fapi::uci_pucch_pdu_format_2_3_4_builder& bui
384384
/// Fills the SR parameters for PUCCH Format 2/3/4 using the given builder and message.
385385
static void fill_format_2_3_4_sr(fapi::uci_pucch_pdu_format_2_3_4_builder& builder, const pucch_uci_message& message)
386386
{
387-
if (message.get_status() != uci_status::valid) {
387+
units::bits sr_len = units::bits(message.get_expected_nof_sr_bits());
388+
if (sr_len.value() == 0) {
388389
return;
389390
}
390391

391-
units::bits sr_len = units::bits(message.get_expected_nof_sr_bits());
392+
uci_pusch_or_pucch_f2_3_4_detection_status status =
393+
to_fapi_uci_detection_status(message.get_status(), message.get_expected_nof_bits_full_payload());
392394

393-
if (sr_len.value() == 0) {
395+
// Set the payload to 0s on detection failure.
396+
if (!is_fapi_uci_payload_valid(status)) {
397+
builder.set_sr_parameters(sr_len.value(),
398+
bounded_bitset<fapi::sr_pdu_format_2_3_4::MAX_SR_PAYLOAD_SIZE_BITS>(sr_len.value()));
394399
return;
395400
}
396401

0 commit comments

Comments
 (0)