CMSIS-DSP: Improved build with MDK

Compilation flags to control code size can now be used with MDK build
and not only with the cmake one.
pull/19/head
Christophe Favergeon 5 years ago
parent 9a39198d7c
commit 3d1e329f33

@ -74,6 +74,7 @@ extern "C"
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_4096)
extern const float16_t twiddleCoefF16_4096[8192];
#define twiddleCoefF16 twiddleCoefF16_4096
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

@ -63,7 +63,7 @@ __STATIC_FORCEINLINE float32_t vecAddAcrossF32Mve(float32x4_t in)
return acc;
}
__STATIC_FORCEINLINE _Float16 vecAddAcrossF16Mve(float16x8_t in)
__STATIC_FORCEINLINE float16_t vecAddAcrossF16Mve(float16x8_t in)
{
float16x8_t tmpVec;
_Float16 acc;

@ -33,8 +33,20 @@
#include "arm_cmplx_dot_prod_q15.c"
#include "arm_cmplx_dot_prod_q31.c"
#include "arm_cmplx_mag_f32.c"
#include "arm_cmplx_mag_q15.c"
#include "arm_cmplx_mag_q31.c"
#if defined (ARM_MATH_HELIUM) || defined(ARM_MATH_MVEI)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_FAST_SQRT_Q15_MVE)
#include "arm_cmplx_mag_q15.c"
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_FAST_SQRT_Q31_MVE)
#include "arm_cmplx_mag_q31.c"
#endif
#else
#include "arm_cmplx_mag_q15.c"
#include "arm_cmplx_mag_q31.c"
#endif
#include "arm_cmplx_mag_squared_f32.c"
#include "arm_cmplx_mag_squared_q15.c"
#include "arm_cmplx_mag_squared_q31.c"

@ -32,6 +32,15 @@
#include "arm_pid_reset_f32.c"
#include "arm_pid_reset_q15.c"
#include "arm_pid_reset_q31.c"
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FAST_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_F32)
#include "arm_sin_cos_f32.c"
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_Q31)
#include "arm_sin_cos_q31.c"
#endif
#endif

@ -26,13 +26,36 @@
* limitations under the License.
*/
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FAST_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_F32)
#include "arm_cos_f32.c"
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_Q15)
#include "arm_cos_q15.c"
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_Q31)
#include "arm_cos_q31.c"
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_F32)
#include "arm_sin_f32.c"
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_Q15)
#include "arm_sin_q15.c"
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_SIN_Q31)
#include "arm_sin_q31.c"
#endif
#endif
#include "arm_sqrt_q15.c"
#include "arm_sqrt_q31.c"
#include "arm_vexp_f32.c"
#include "arm_vlog_f32.c"

@ -119,8 +119,14 @@
#include "arm_lms_init_q31.c"
#include "arm_lms_norm_f32.c"
#include "arm_lms_norm_init_f32.c"
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FAST_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_RECIP_Q15)
#include "arm_lms_norm_init_q15.c"
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_RECIP_Q31)
#include "arm_lms_norm_init_q31.c"
#endif
#endif
#include "arm_lms_norm_q15.c"
#include "arm_lms_norm_q31.c"
#include "arm_lms_q15.c"

@ -275,7 +275,7 @@ arm_status arm_cfft_init_q15(
/* Initializations of Instance structure depending on the FFT length */
switch (S->fftLen) {
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_4096) && defined(ARM_TABLE_BITREVIDX_FLT_4096))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_4096) && defined(ARM_TABLE_BITREVIDX_FXT_4096))
/* Initializations of structure parameters for 4096 point FFT */
case 4096U:
/* Initialise the bit reversal table modifier */
@ -283,7 +283,7 @@ arm_status arm_cfft_init_q15(
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_2048) && defined(ARM_TABLE_BITREVIDX_FLT_2048))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_2048) && defined(ARM_TABLE_BITREVIDX_FXT_2048))
/* Initializations of structure parameters for 2048 point FFT */
case 2048U:
/* Initialise the bit reversal table modifier */
@ -292,7 +292,7 @@ arm_status arm_cfft_init_q15(
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_1024) && defined(ARM_TABLE_BITREVIDX_FLT_1024))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_1024) && defined(ARM_TABLE_BITREVIDX_FXT_1024))
/* Initializations of structure parameters for 1024 point FFT */
case 1024U:
/* Initialise the bit reversal table modifier */
@ -301,7 +301,7 @@ arm_status arm_cfft_init_q15(
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_512) && defined(ARM_TABLE_BITREVIDX_FLT_512))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_512) && defined(ARM_TABLE_BITREVIDX_FXT_512))
/* Initializations of structure parameters for 512 point FFT */
case 512U:
/* Initialise the bit reversal table modifier */
@ -309,31 +309,31 @@ arm_status arm_cfft_init_q15(
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_256) && defined(ARM_TABLE_BITREVIDX_FLT_256))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_256) && defined(ARM_TABLE_BITREVIDX_FXT_256))
case 256U:
FFTINIT(q15,256);
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_128) && defined(ARM_TABLE_BITREVIDX_FLT_128))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_128) && defined(ARM_TABLE_BITREVIDX_FXT_128))
case 128U:
FFTINIT(q15,128);
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_64) && defined(ARM_TABLE_BITREVIDX_FLT_64))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_64) && defined(ARM_TABLE_BITREVIDX_FXT_64))
case 64U:
FFTINIT(q15,64);
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_32) && defined(ARM_TABLE_BITREVIDX_FLT_32))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_32) && defined(ARM_TABLE_BITREVIDX_FXT_32))
case 32U:
FFTINIT(q15,32);
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_16) && defined(ARM_TABLE_BITREVIDX_FLT_16))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_16) && defined(ARM_TABLE_BITREVIDX_FXT_16))
case 16U:
/* Initializations of structure parameters for 16 point FFT */
FFTINIT(q15,16);

@ -275,7 +275,7 @@ arm_status arm_cfft_init_q31(
/* Initializations of Instance structure depending on the FFT length */
switch (S->fftLen) {
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_4096) && defined(ARM_TABLE_BITREVIDX_FLT_4096))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_4096) && defined(ARM_TABLE_BITREVIDX_FXT_4096))
/* Initializations of structure parameters for 4096 point FFT */
case 4096U:
/* Initialise the bit reversal table modifier */
@ -283,7 +283,7 @@ arm_status arm_cfft_init_q31(
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_2048) && defined(ARM_TABLE_BITREVIDX_FLT_2048))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_2048) && defined(ARM_TABLE_BITREVIDX_FXT_2048))
/* Initializations of structure parameters for 2048 point FFT */
case 2048U:
/* Initialise the bit reversal table modifier */
@ -292,7 +292,7 @@ arm_status arm_cfft_init_q31(
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_1024) && defined(ARM_TABLE_BITREVIDX_FLT_1024))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_1024) && defined(ARM_TABLE_BITREVIDX_FXT_1024))
/* Initializations of structure parameters for 1024 point FFT */
case 1024U:
/* Initialise the bit reversal table modifier */
@ -301,7 +301,7 @@ arm_status arm_cfft_init_q31(
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_512) && defined(ARM_TABLE_BITREVIDX_FLT_512))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_512) && defined(ARM_TABLE_BITREVIDX_FXT_512))
/* Initializations of structure parameters for 512 point FFT */
case 512U:
/* Initialise the bit reversal table modifier */
@ -309,31 +309,31 @@ arm_status arm_cfft_init_q31(
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_256) && defined(ARM_TABLE_BITREVIDX_FLT_256))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_256) && defined(ARM_TABLE_BITREVIDX_FXT_256))
case 256U:
FFTINIT(q31,256);
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_128) && defined(ARM_TABLE_BITREVIDX_FLT_128))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_128) && defined(ARM_TABLE_BITREVIDX_FXT_128))
case 128U:
FFTINIT(q31,128);
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_64) && defined(ARM_TABLE_BITREVIDX_FLT_64))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_64) && defined(ARM_TABLE_BITREVIDX_FXT_64))
case 64U:
FFTINIT(q31,64);
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_32) && defined(ARM_TABLE_BITREVIDX_FLT_32))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_32) && defined(ARM_TABLE_BITREVIDX_FXT_32))
case 32U:
FFTINIT(q31,32);
break;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_16) && defined(ARM_TABLE_BITREVIDX_FLT_16))
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_Q31_16) && defined(ARM_TABLE_BITREVIDX_FXT_16))
case 16U:
/* Initializations of structure parameters for 16 point FFT */
FFTINIT(q31,16);

@ -69,8 +69,16 @@ arm_status arm_cfft_radix2_init_f16(
uint8_t ifftFlag,
uint8_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_4096)
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
status = ARM_MATH_SUCCESS;
/* Initialise the FFT length */
S->fftLen = fftLen;
@ -84,6 +92,8 @@ arm_status arm_cfft_radix2_init_f16(
/* Initialise the Flag for calculation Bit reversal or not */
S->bitReverseFlag = bitReverseFlag;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREV_1024)
/* Initializations of structure parameters depending on the FFT length */
switch (S->fftLen)
{
@ -187,6 +197,9 @@ arm_status arm_cfft_radix2_init_f16(
break;
}
#endif
#endif
#endif
return (status);
}

@ -71,8 +71,15 @@ arm_status arm_cfft_radix2_init_f32(
uint8_t ifftFlag,
uint8_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_4096)
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
status = ARM_MATH_SUCCESS;
/* Initialise the FFT length */
S->fftLen = fftLen;
@ -86,6 +93,8 @@ arm_status arm_cfft_radix2_init_f32(
/* Initialise the Flag for calculation Bit reversal or not */
S->bitReverseFlag = bitReverseFlag;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_4096)
/* Initializations of structure parameters depending on the FFT length */
switch (S->fftLen)
{
@ -189,6 +198,9 @@ arm_status arm_cfft_radix2_init_f32(
break;
}
#endif
#endif
#endif
return (status);
}

@ -72,8 +72,15 @@ arm_status arm_cfft_radix2_init_q15(
uint8_t ifftFlag,
uint8_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_4096)
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
status = ARM_MATH_SUCCESS;
/* Initialise the FFT length */
S->fftLen = fftLen;
@ -85,6 +92,8 @@ arm_status arm_cfft_radix2_init_q15(
/* Initialise the Flag for calculation Bit reversal or not */
S->bitReverseFlag = bitReverseFlag;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_4096)
/* Initializations of structure parameters depending on the FFT length */
switch (S->fftLen)
{
@ -96,7 +105,7 @@ arm_status arm_cfft_radix2_init_q15(
/* Initialise the bit reversal table modifier */
S->bitRevFactor = 1U;
/* Initialise the bit reversal table pointer */
S->pBitRevTable = (uint16_t *) armBitRevTable;
S->pBitRevTable = (uint16_t *) armBitRevIndexTable_fixed_4096;
break;
@ -108,7 +117,7 @@ arm_status arm_cfft_radix2_init_q15(
/* Initialise the bit reversal table modifier */
S->bitRevFactor = 2U;
/* Initialise the bit reversal table pointer */
S->pBitRevTable = (uint16_t *) & armBitRevTable[1];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[1];
break;
@ -116,7 +125,7 @@ arm_status arm_cfft_radix2_init_q15(
/* Initializations of structure parameters for 1024 point FFT */
S->twidCoefModifier = 4U;
S->bitRevFactor = 4U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[3];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[3];
break;
@ -124,7 +133,7 @@ arm_status arm_cfft_radix2_init_q15(
/* Initializations of structure parameters for 512 point FFT */
S->twidCoefModifier = 8U;
S->bitRevFactor = 8U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[7];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[7];
break;
@ -132,7 +141,7 @@ arm_status arm_cfft_radix2_init_q15(
/* Initializations of structure parameters for 256 point FFT */
S->twidCoefModifier = 16U;
S->bitRevFactor = 16U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[15];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[15];
break;
@ -140,7 +149,7 @@ arm_status arm_cfft_radix2_init_q15(
/* Initializations of structure parameters for 128 point FFT */
S->twidCoefModifier = 32U;
S->bitRevFactor = 32U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[31];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[31];
break;
@ -148,7 +157,7 @@ arm_status arm_cfft_radix2_init_q15(
/* Initializations of structure parameters for 64 point FFT */
S->twidCoefModifier = 64U;
S->bitRevFactor = 64U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[63];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[63];
break;
@ -156,7 +165,7 @@ arm_status arm_cfft_radix2_init_q15(
/* Initializations of structure parameters for 32 point FFT */
S->twidCoefModifier = 128U;
S->bitRevFactor = 128U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[127];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[127];
break;
@ -164,7 +173,7 @@ arm_status arm_cfft_radix2_init_q15(
/* Initializations of structure parameters for 16 point FFT */
S->twidCoefModifier = 256U;
S->bitRevFactor = 256U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[255];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[255];
break;
@ -174,6 +183,9 @@ arm_status arm_cfft_radix2_init_q15(
break;
}
#endif
#endif
#endif
return (status);
}

@ -72,7 +72,14 @@ arm_status arm_cfft_radix2_init_q31(
uint8_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q31_4096)
/* Initialise the default arm status */
status = ARM_MATH_SUCCESS;
/* Initialise the FFT length */
S->fftLen = fftLen;
@ -86,6 +93,8 @@ arm_status arm_cfft_radix2_init_q31(
/* Initialise the Flag for calculation Bit reversal or not */
S->bitReverseFlag = bitReverseFlag;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_4096)
/* Initializations of Instance structure depending on the FFT length */
switch (S->fftLen)
{
@ -96,7 +105,7 @@ arm_status arm_cfft_radix2_init_q31(
/* Initialise the bit reversal table modifier */
S->bitRevFactor = 1U;
/* Initialise the bit reversal table pointer */
S->pBitRevTable = (uint16_t *) armBitRevTable;
S->pBitRevTable = (uint16_t *) armBitRevIndexTable_fixed_4096;
break;
/* Initializations of structure parameters for 2048 point FFT */
@ -106,7 +115,7 @@ arm_status arm_cfft_radix2_init_q31(
/* Initialise the bit reversal table modifier */
S->bitRevFactor = 2U;
/* Initialise the bit reversal table pointer */
S->pBitRevTable = (uint16_t *) & armBitRevTable[1];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[1];
break;
/* Initializations of structure parameters for 1024 point FFT */
@ -116,7 +125,7 @@ arm_status arm_cfft_radix2_init_q31(
/* Initialise the bit reversal table modifier */
S->bitRevFactor = 4U;
/* Initialise the bit reversal table pointer */
S->pBitRevTable = (uint16_t *) & armBitRevTable[3];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[3];
break;
/* Initializations of structure parameters for 512 point FFT */
@ -126,42 +135,42 @@ arm_status arm_cfft_radix2_init_q31(
/* Initialise the bit reversal table modifier */
S->bitRevFactor = 8U;
/* Initialise the bit reversal table pointer */
S->pBitRevTable = (uint16_t *) & armBitRevTable[7];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[7];
break;
case 256U:
/* Initializations of structure parameters for 256 point FFT */
S->twidCoefModifier = 16U;
S->bitRevFactor = 16U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[15];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[15];
break;
case 128U:
/* Initializations of structure parameters for 128 point FFT */
S->twidCoefModifier = 32U;
S->bitRevFactor = 32U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[31];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[31];
break;
case 64U:
/* Initializations of structure parameters for 64 point FFT */
S->twidCoefModifier = 64U;
S->bitRevFactor = 64U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[63];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[63];
break;
case 32U:
/* Initializations of structure parameters for 32 point FFT */
S->twidCoefModifier = 128U;
S->bitRevFactor = 128U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[127];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[127];
break;
case 16U:
/* Initializations of structure parameters for 16 point FFT */
S->twidCoefModifier = 256U;
S->bitRevFactor = 256U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[255];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[255];
break;
@ -171,6 +180,9 @@ arm_status arm_cfft_radix2_init_q31(
break;
}
#endif
#endif
#endif
return (status);
}

@ -72,14 +72,21 @@ arm_status arm_cfft_radix4_init_f16(
uint8_t ifftFlag,
uint8_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_4096)
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
status = ARM_MATH_SUCCESS;
/* Initialise the FFT length */
S->fftLen = fftLen;
/* Initialise the Twiddle coefficient pointer */
S->pTwiddle = (float16_t *) twiddleCoef;
S->pTwiddle = (float16_t *) twiddleCoefF16;
/* Initialise the Flag for selection of CFFT or CIFFT */
S->ifftFlag = ifftFlag;
@ -87,6 +94,8 @@ arm_status arm_cfft_radix4_init_f16(
/* Initialise the Flag for calculation Bit reversal or not */
S->bitReverseFlag = bitReverseFlag;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREV_1024)
/* Initializations of structure parameters depending on the FFT length */
switch (S->fftLen)
{
@ -149,6 +158,9 @@ arm_status arm_cfft_radix4_init_f16(
break;
}
#endif
#endif
#endif
return (status);
}

@ -71,8 +71,15 @@ arm_status arm_cfft_radix4_init_f32(
uint8_t ifftFlag,
uint8_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_4096)
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
status = ARM_MATH_SUCCESS;
/* Initialise the FFT length */
S->fftLen = fftLen;
@ -86,6 +93,8 @@ arm_status arm_cfft_radix4_init_f32(
/* Initialise the Flag for calculation Bit reversal or not */
S->bitReverseFlag = bitReverseFlag;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F32_4096)
/* Initializations of structure parameters depending on the FFT length */
switch (S->fftLen)
{
@ -147,7 +156,10 @@ arm_status arm_cfft_radix4_init_f32(
status = ARM_MATH_ARGUMENT_ERROR;
break;
}
#endif
#endif
#endif
return (status);
}

@ -74,7 +74,14 @@ arm_status arm_cfft_radix4_init_q15(
uint8_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_4096)
/* Initialise the default arm status */
status = ARM_MATH_SUCCESS;
/* Initialise the FFT length */
S->fftLen = fftLen;
/* Initialise the Twiddle coefficient pointer */
@ -84,6 +91,8 @@ arm_status arm_cfft_radix4_init_q15(
/* Initialise the Flag for calculation Bit reversal or not */
S->bitReverseFlag = bitReverseFlag;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_4096)
/* Initializations of structure parameters depending on the FFT length */
switch (S->fftLen)
{
@ -95,7 +104,7 @@ arm_status arm_cfft_radix4_init_q15(
/* Initialise the bit reversal table modifier */
S->bitRevFactor = 1U;
/* Initialise the bit reversal table pointer */
S->pBitRevTable = (uint16_t *) armBitRevTable;
S->pBitRevTable = (uint16_t *) armBitRevIndexTable_fixed_4096;
break;
@ -103,7 +112,7 @@ arm_status arm_cfft_radix4_init_q15(
/* Initializations of structure parameters for 1024 point FFT */
S->twidCoefModifier = 4U;
S->bitRevFactor = 4U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[3];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[3];
break;
@ -111,7 +120,7 @@ arm_status arm_cfft_radix4_init_q15(
/* Initializations of structure parameters for 256 point FFT */
S->twidCoefModifier = 16U;
S->bitRevFactor = 16U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[15];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[15];
break;
@ -119,7 +128,7 @@ arm_status arm_cfft_radix4_init_q15(
/* Initializations of structure parameters for 64 point FFT */
S->twidCoefModifier = 64U;
S->bitRevFactor = 64U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[63];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[63];
break;
@ -127,7 +136,7 @@ arm_status arm_cfft_radix4_init_q15(
/* Initializations of structure parameters for 16 point FFT */
S->twidCoefModifier = 256U;
S->bitRevFactor = 256U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[255];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[255];
break;
@ -137,6 +146,9 @@ arm_status arm_cfft_radix4_init_q15(
break;
}
#endif
#endif
#endif
return (status);
}

@ -72,8 +72,16 @@ arm_status arm_cfft_radix4_init_q31(
uint8_t ifftFlag,
uint8_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_Q15_4096)
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
status = ARM_MATH_SUCCESS;
/* Initialise the FFT length */
S->fftLen = fftLen;
/* Initialise the Twiddle coefficient pointer */
@ -83,6 +91,8 @@ arm_status arm_cfft_radix4_init_q31(
/* Initialise the Flag for calculation Bit reversal or not */
S->bitReverseFlag = bitReverseFlag;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_BITREVIDX_FXT_4096)
/* Initializations of Instance structure depending on the FFT length */
switch (S->fftLen)
{
@ -93,7 +103,7 @@ arm_status arm_cfft_radix4_init_q31(
/* Initialise the bit reversal table modifier */
S->bitRevFactor = 1U;
/* Initialise the bit reversal table pointer */
S->pBitRevTable = (uint16_t *) armBitRevTable;
S->pBitRevTable = (uint16_t *) armBitRevIndexTable_fixed_4096;
break;
/* Initializations of structure parameters for 1024 point FFT */
@ -103,28 +113,28 @@ arm_status arm_cfft_radix4_init_q31(
/* Initialise the bit reversal table modifier */
S->bitRevFactor = 4U;
/* Initialise the bit reversal table pointer */
S->pBitRevTable = (uint16_t *) & armBitRevTable[3];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[3];
break;
case 256U:
/* Initializations of structure parameters for 256 point FFT */
S->twidCoefModifier = 16U;
S->bitRevFactor = 16U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[15];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[15];
break;
case 64U:
/* Initializations of structure parameters for 64 point FFT */
S->twidCoefModifier = 64U;
S->bitRevFactor = 64U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[63];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[63];
break;
case 16U:
/* Initializations of structure parameters for 16 point FFT */
S->twidCoefModifier = 256U;
S->bitRevFactor = 256U;
S->pBitRevTable = (uint16_t *) & armBitRevTable[255];
S->pBitRevTable = (uint16_t *) & armBitRevIndexTable_fixed_4096[255];
break;
default:
@ -133,6 +143,9 @@ arm_status arm_cfft_radix4_init_q31(
break;
}
#endif
#endif
#endif
return (status);
}

@ -71,9 +71,15 @@ arm_status arm_rfft_init_f32(
uint32_t ifftFlagR,
uint32_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_REALCOEF_F32)
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
status = ARM_MATH_SUCCESS;
/* Initialize the Real FFT length */
S->fftLenReal = (uint16_t) fftLenReal;
@ -129,6 +135,8 @@ arm_status arm_rfft_init_f32(
arm_cfft_radix4_init_f32(S->pCfft, S->fftLenBy2, 0U, 0U);
}
#endif
#endif
/* return the status of RFFT Init function */
return (status);

@ -68,8 +68,15 @@ arm_status arm_rfft_init_q15(
uint32_t ifftFlagR,
uint32_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_REALCOEF_Q15)
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
status = ARM_MATH_SUCCESS;
/* Initialize the Real FFT length */
S->fftLenReal = (uint16_t) fftLenReal;
@ -230,6 +237,8 @@ arm_status arm_rfft_init_q15(
break;
}
#endif
#endif
/* return the status of RFFT Init function */
return (status);
}

@ -70,8 +70,15 @@ arm_status arm_rfft_init_q31(
uint32_t ifftFlagR,
uint32_t bitReverseFlag)
{
/* Initialise the default arm status */
arm_status status = ARM_MATH_ARGUMENT_ERROR;
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_REALCOEF_Q31)
/* Initialise the default arm status */
arm_status status = ARM_MATH_SUCCESS;
status = ARM_MATH_SUCCESS;
/* Initialize the Real FFT length */
S->fftLenReal = (uint16_t) fftLenReal;
@ -228,6 +235,8 @@ arm_status arm_rfft_init_q31(
break;
}
#endif
#endif
/* return the status of RFFT Init function */
return (status);
}

Loading…
Cancel
Save