From 96c1cadf2bf7b3a3757548b3b2ffa1c5f57ad9fc Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Wed, 15 Mar 2023 14:00:12 +0100 Subject: [PATCH 1/2] fix typo in idft() function In case of unaligned input array, a DFT of wrong size was executed instead of a correct IDFT. --- openair1/PHY/TOOLS/oai_dfts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/TOOLS/oai_dfts.c b/openair1/PHY/TOOLS/oai_dfts.c index 56787efd6f..51ddd336e3 100644 --- a/openair1/PHY/TOOLS/oai_dfts.c +++ b/openair1/PHY/TOOLS/oai_dfts.c @@ -9068,7 +9068,7 @@ void idft(uint8_t sizeidx, int16_t *input,int16_t *output,unsigned char scale_fl int sz=idft_ftab[sizeidx].size; int16_t tmp[sz*2] __attribute__ ((aligned(32))); // input and output are not in right type (int16_t instead of c16_t) memcpy(tmp, input, sizeof tmp); - dft_ftab[sizeidx].func(tmp,output,scale_flag); + idft_ftab[sizeidx].func(tmp,output,scale_flag); } else idft_ftab[sizeidx].func(input,output,scale_flag); }; From b3b53506a1be51a548dd44a226e870c3bebbf57d Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Wed, 15 Mar 2023 14:03:21 +0100 Subject: [PATCH 2/2] improve memory alignment of some arrays in nr_pusch_channel_estimation() --- openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index d10beb9807..55da0cf28b 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -120,7 +120,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, nfapi_nr_pusch_pdu_t *pusch_pdu, int *max_ch) { - c16_t pilot[3280] __attribute__((aligned(16))); + c16_t pilot[3280] __attribute__((aligned(32))); const int chest_freq = gNB->chest_freq; #ifdef DEBUG_CH @@ -183,7 +183,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, #endif - c16_t ul_ls_est[symbolSize]; + c16_t ul_ls_est[symbolSize] __attribute__((aligned(32))); memset(ul_ls_est, 0, sizeof(c16_t) * symbolSize); memset(&gNB->measurements.delay[ul_id], 0, sizeof(gNB->measurements.delay[ul_id]));