From 01390a73400e16d42c72a05167ddd994c8b1e3fa Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 20 Aug 2021 16:23:10 +0200 Subject: [PATCH] Better NR softbuffer size adjustment --- lib/include/srsran/phy/common/phy_common_nr.h | 6 +++++- lib/include/srsran/phy/fec/ldpc/base_graph.h | 8 +++----- lib/include/srsran/phy/phch/sch_nr.h | 6 +++++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/include/srsran/phy/common/phy_common_nr.h b/lib/include/srsran/phy/common/phy_common_nr.h index bf8270082..7cd174c82 100644 --- a/lib/include/srsran/phy/common/phy_common_nr.h +++ b/lib/include/srsran/phy/common/phy_common_nr.h @@ -36,7 +36,6 @@ extern "C" { #define SRSRAN_SF_LEN_PRB_NR(nof_prb) (srsran_min_symbol_sz_rb(nof_prb) * 15) #define SRSRAN_SLOT_MAX_LEN_RE_NR (SRSRAN_SLOT_LEN_RE_NR(SRSRAN_MAX_PRB_NR)) -#define SRSRAN_SLOT_MAX_NOF_BITS_NR (SRSRAN_SLOT_MAX_LEN_RE_NR * SRSRAN_MAX_QM) #define SRSRAN_MAX_LAYERS_NR 8 /** @@ -114,6 +113,11 @@ extern "C" { */ #define SRSRAN_PDSCH_MAX_RE_NR (SRSRAN_MAX_NRE_NR * SRSRAN_MAX_PRB_NR) +/** + * @brief defines the maximum number of bits that can be transmitted in a slot + */ +#define SRSRAN_SLOT_MAX_NOF_BITS_NR (SRSRAN_PDSCH_MAX_RE_NR * SRSRAN_MAX_QM) + /** * @brief Maximum number of PDSCH time domain resource allocations. This is defined by TS 38.331 v15.10.0 * as maxNrofDL-Allocations diff --git a/lib/include/srsran/phy/fec/ldpc/base_graph.h b/lib/include/srsran/phy/fec/ldpc/base_graph.h index 3c8699b97..594e84370 100644 --- a/lib/include/srsran/phy/fec/ldpc/base_graph.h +++ b/lib/include/srsran/phy/fec/ldpc/base_graph.h @@ -32,11 +32,9 @@ #include -#define SRSRAN_LDPC_BG1_MAX_LEN_CB 8448 /*!< \brief Maximum code block size for LDPC BG1 */ -#define SRSRAN_LDPC_BG2_MAX_LEN_CB 3840 /*!< \brief Maximum code block size for LDPC BG2 */ -#define SRSRAN_LDPC_MAX_LEN_CB \ - SRSRAN_MAX(SRSRAN_LDPC_BG1_MAX_LEN_CB, \ - SRSRAN_LDPC_BG2_MAX_LEN_CB) /*!< \brief Maximum code block size for LDPC BG1 or BG2 */ +#define SRSRAN_LDPC_BG1_MAX_LEN_CB 8448 /*!< \brief Maximum code block size for LDPC BG1 */ +#define SRSRAN_LDPC_BG2_MAX_LEN_CB 3840 /*!< \brief Maximum code block size for LDPC BG2 */ +#define SRSRAN_LDPC_MAX_LEN_CB SRSRAN_LDPC_BG1_MAX_LEN_CB /*!< \brief Maximum code block size for LDPC BG1 or BG2 */ #define BG1Nfull 68 /*!< \brief Number of variable nodes in BG1. */ #define BG1N 66 /*!< \brief Number of variable nodes in BG1 after puncturing. */ diff --git a/lib/include/srsran/phy/phch/sch_nr.h b/lib/include/srsran/phy/phch/sch_nr.h index 68819b863..87ff204b4 100644 --- a/lib/include/srsran/phy/phch/sch_nr.h +++ b/lib/include/srsran/phy/phch/sch_nr.h @@ -29,8 +29,12 @@ #include "srsran/phy/fec/ldpc/ldpc_rm.h" #include "srsran/phy/phch/phch_cfg_nr.h" +/** + * @brief Maximum number of codeblocks for a NR shared channel transmission. It assumes a rate of 1.0 for the maximum + * amount of bits a resource grid can fit + */ #define SRSRAN_SCH_NR_MAX_NOF_CB_LDPC \ - ((SRSRAN_SLOT_MAX_NOF_BITS_NR + (SRSRAN_LDPC_BG2_MAX_LEN_CB - 1)) / SRSRAN_LDPC_BG2_MAX_LEN_CB) + ((SRSRAN_SLOT_MAX_NOF_BITS_NR + (SRSRAN_LDPC_MAX_LEN_CB - 1)) / SRSRAN_LDPC_MAX_LEN_CB) /** * @brief Groups NR-PUSCH data for reception