From 35840d6bc13fde39c09ccfe57ebfdbe54ff19882 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Wed, 7 Jul 2021 12:47:30 +0200 Subject: [PATCH] Removed all zero condition from LDPC decoding --- lib/src/phy/phch/sch_nr.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/src/phy/phch/sch_nr.c b/lib/src/phy/phch/sch_nr.c index b8a5390ba..57f4ff84f 100644 --- a/lib/src/phy/phch/sch_nr.c +++ b/lib/src/phy/phch/sch_nr.c @@ -646,19 +646,10 @@ static int sch_nr_decode(srsran_sch_nr_t* q, nof_iter_sum += n_iter_cb; // Check if CB is all zeros - uint32_t cb_len = cfg.Kp - cfg.L_cb; - bool all_zeros = true; - for (uint32_t i = 0; i < cb_len && all_zeros; i++) { - all_zeros = (q->temp_cb[i] == 0); - } + uint32_t cb_len = cfg.Kp - cfg.L_cb; - tb->softbuffer.rx->cb_crc[r] = (ret != 0) && (!all_zeros); - SCH_INFO_RX("CB %d/%d iter=%d CRC=%s all_zeros=%s", - r, - cfg.C, - n_iter_cb, - tb->softbuffer.rx->cb_crc[r] ? "OK" : "KO", - all_zeros ? "yes" : "no"); + tb->softbuffer.rx->cb_crc[r] = (ret != 0); + SCH_INFO_RX("CB %d/%d iter=%d CRC=%s", r, cfg.C, n_iter_cb, tb->softbuffer.rx->cb_crc[r] ? "OK" : "KO"); // CB Debug trace if (SRSRAN_DEBUG_ENABLED && srsran_verbose >= SRSRAN_VERBOSE_DEBUG && !handler_registered) {