From 8f688c0064caee9f06c00678379622a66442d453 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Fri, 8 Nov 2024 12:19:23 +0100 Subject: [PATCH] replace assert by error logging when we call DFT with impossible size to deal with existing LTE UE --- openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c | 5 +++++ openair1/PHY/TOOLS/tools_defs.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c b/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c index 9d555c62fe..9c4ccf0679 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c @@ -93,6 +93,11 @@ void dft_lte(int32_t *z,struct complex16 *input, int32_t Msc_PUSCH, uint8_t Nsym // printf("\n"); dft_size_idx_t dftsize = get_dft(Msc_PUSCH); + if (dftsize == DFT_SIZE_IDXTABLESIZE) { + LOG_E(PHY, "Internal error, not modulating the slot, Msc_PUSCH = %d\n", Msc_PUSCH); + return; + } + switch (Msc_PUSCH) { case 12: dft(dftsize, (int16_t *)dft_in0, (int16_t *)dft_out0, 0); diff --git a/openair1/PHY/TOOLS/tools_defs.h b/openair1/PHY/TOOLS/tools_defs.h index 8799188c99..41af6ba0a9 100644 --- a/openair1/PHY/TOOLS/tools_defs.h +++ b/openair1/PHY/TOOLS/tools_defs.h @@ -38,6 +38,7 @@ #include #include #include +#include "common/utils/LOG/log.h" #define simd_q15_t simde__m128i #define simdshort_q15_t simde__m64 @@ -623,7 +624,7 @@ static inline dft_size_idx_t get_dft(int size) switch (size) { FOREACH_DFTSZ(FIND_ENUM) default: - AssertFatal(false, "function get_dft : unsupported DFT size %d\n", size); + LOG_E(UTIL, "function get_dft : unsupported DFT size %d\n", size); break; } return DFT_SIZE_IDXTABLESIZE;