From 5a6b8f42f5982aa2d8c1d1d6f070efccadaab30d Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 2 Jul 2021 12:23:52 +0200 Subject: [PATCH] Add standard rate check for FFT minimum size function --- lib/src/phy/common/phy_common_nr.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/src/phy/common/phy_common_nr.c b/lib/src/phy/common/phy_common_nr.c index 21f0151fb..abf62866e 100644 --- a/lib/src/phy/common/phy_common_nr.c +++ b/lib/src/phy/common/phy_common_nr.c @@ -159,6 +159,9 @@ srsran_mcs_table_t srsran_mcs_table_from_str(const char* str) static const uint32_t phy_common_nr_valid_symbol_sz[PHY_COMMON_NR_NOF_VALID_SYMB_SZ] = {128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096}; +static const uint32_t phy_common_nr_valid_std_symbol_sz[PHY_COMMON_NR_NOF_VALID_SYMB_SZ] = + {128, 256, 512, 1024, 1536, 2048}; + uint32_t srsran_min_symbol_sz_rb(uint32_t nof_prb) { uint32_t nof_re = nof_prb * SRSRAN_NRE; @@ -167,9 +170,14 @@ uint32_t srsran_min_symbol_sz_rb(uint32_t nof_prb) return 0; } + const uint32_t* symbol_table = phy_common_nr_valid_symbol_sz; + if (srsran_symbol_size_is_standard()) { + symbol_table = phy_common_nr_valid_std_symbol_sz; + } + for (uint32_t i = 0; i < PHY_COMMON_NR_NOF_VALID_SYMB_SZ; i++) { - if (phy_common_nr_valid_symbol_sz[i] > nof_re) { - return phy_common_nr_valid_symbol_sz[i]; + if (symbol_table[i] > nof_re) { + return symbol_table[i]; } }