Functions | |
arm_status | arm_cfft_radix4_init_f32 (arm_cfft_radix4_instance_f32 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
void | arm_cfft_radix4_f32 (const arm_cfft_radix4_instance_f32 *S, float32_t *pSrc) |
arm_status | arm_cfft_radix4_init_q31 (arm_cfft_radix4_instance_q31 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
void | arm_cfft_radix4_q31 (const arm_cfft_radix4_instance_q31 *S, q31_t *pSrc) |
arm_status | arm_cfft_radix4_init_q15 (arm_cfft_radix4_instance_q15 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
void | arm_cfft_radix4_q15 (const arm_cfft_radix4_instance_q15 *S, q15_t *pSrc) |
Variables | |
static const float32_t | twiddleCoef [8192] |
static const q31_t | twiddleCoefQ31 [8192] |
static const q15_t | twiddleCoefQ15 [4096 *2] |
const uint16_t | armBitRevTable [1024] |
2*fftLen
samples through the transform. pSrc
points to In-place arrays containing 2*fftLen
values. pSrc
points to the array of in-place buffer of size 2*fftLen
and inputs and outputs are stored in an interleaved fashion as shown below. {real[0], imag[0], real[1], imag[1],..}
Complex Fast Fourier Transform:
x(n) = xa + j * ya x(n+N/4 ) = xb + j * yb x(n+N/2 ) = xc + j * yc x(n+3N 4) = xd + j * ydwhere N is length of FFT
X(4r) = xa'+ j * ya' X(4r+1) = xb'+ j * yb' X(4r+2) = xc'+ j * yc' X(4r+3) = xd'+ j * yd'
Wn = co1 + j * (- si1) W2n = co2 + j * (- si2) W3n = co3 + j * (- si3)
Radix-4 Decimation-in Frequency Complex Fast Fourier Transform
xa' = xa + xb + xc + xd ya' = ya + yb + yc + yd xc' = (xa+yb-xc-yd)* co1 + (ya-xb-yc+xd)* (si1) yc' = (ya-xb-yc+xd)* co1 - (xa+yb-xc-yd)* (si1) xb' = (xa-xb+xc-xd)* co2 + (ya-yb+yc-yd)* (si2) yb' = (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) xd' = (xa-yb-xc+yd)* co3 + (ya+xb-yc-xd)* (si3) yd' = (ya+xb-yc-xd)* co3 - (xa-yb-xc+yd)* (si3)
Complex Inverse Fast Fourier Transform:
xa' = xa + xb + xc + xd ya' = ya + yb + yc + yd xc' = (xa-yb-xc+yd)* co1 - (ya+xb-yc-xd)* (si1) yc' = (ya+xb-yc-xd)* co1 + (xa-yb-xc+yd)* (si1) xb' = (xa-xb+xc-xd)* co2 - (ya-yb+yc-yd)* (si2) yb' = (ya-yb+yc-yd)* co2 + (xa-xb+xc-xd)* (si2) xd' = (xa+yb-xc-yd)* co3 - (ya-xb-yc+xd)* (si3) yd' = (ya-xb-yc+xd)* co3 + (xa+yb-xc-yd)* (si3)
arm_cfft_radix4_instance_f32 S = {fftLen, ifftFlag, bitReverseFlag, pTwiddle, pBitRevTable, twidCoefModifier, bitRevFactor, onebyfftLen}; arm_cfft_radix4_instance_q31 S = {fftLen, ifftFlag, bitReverseFlag, pTwiddle, pBitRevTable, twidCoefModifier, bitRevFactor}; arm_cfft_radix4_instance_q15 S = {fftLen, ifftFlag, bitReverseFlag, pTwiddle, pBitRevTable, twidCoefModifier, bitRevFactor};
fftLen
length of CFFT/CIFFT; ifftFlag
Flag for selection of CFFT or CIFFT(Set ifftFlag to calculate CIFFT otherwise calculates CFFT); bitReverseFlag
Flag for selection of output order(Set bitReverseFlag to output in normal order otherwise output in bit reversed order); pTwiddle
points to array of twiddle coefficients; pBitRevTable
points to the array of bit reversal table. twidCoefModifier
modifier for twiddle factor table which supports all FFT lengths with same table; pBitRevTable
modifier for bit reversal table which supports all FFT lengths with same table. onebyfftLen
value of 1/fftLen to calculate CIFFT;arm_status arm_cfft_radix4_init_f32 | ( | arm_cfft_radix4_instance_f32 * | S, |
uint16_t | fftLen, | ||
uint8_t | ifftFlag, | ||
uint8_t | bitReverseFlag | ||
) |
Initialization function for the floating-point CFFT/CIFFT.
[in,out] | *S | points to an instance of the floating-point CFFT/CIFFT structure. |
[in] | fftLen | length of the FFT. |
[in] | ifftFlag | flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. |
[in] | bitReverseFlag | flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. |
fftLen
is not a supported value.ifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. Definition at line 1449 of file arm_cfft_radix4_init_f32.c.
void arm_cfft_radix4_f32 | ( | const arm_cfft_radix4_instance_f32 * | S, |
float32_t * | pSrc | ||
) |
Processing function for the floating-point CFFT/CIFFT.
[in] | *S | points to an instance of the floating-point CFFT/CIFFT structure. |
[in,out] | *pSrc | points to the complex data buffer of size 2*fftLen . Processing occurs in-place. |
Definition at line 165 of file arm_cfft_radix4_f32.c.
arm_status arm_cfft_radix4_init_q31 | ( | arm_cfft_radix4_instance_q31 * | S, |
uint16_t | fftLen, | ||
uint8_t | ifftFlag, | ||
uint8_t | bitReverseFlag | ||
) |
Initialization function for the Q31 CFFT/CIFFT.
[in,out] | *S | points to an instance of the Q31 CFFT/CIFFT structure. |
[in] | fftLen | length of the FFT. |
[in] | ifftFlag | flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. |
[in] | bitReverseFlag | flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. |
fftLen
is not a supported value.ifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. Definition at line 1110 of file arm_cfft_radix4_init_q31.c.
void arm_cfft_radix4_q31 | ( | const arm_cfft_radix4_instance_q31 * | S, |
q31_t * | pSrc | ||
) |
Processing function for the Q31 CFFT/CIFFT.
[in] | *S | points to an instance of the Q31 CFFT/CIFFT structure. |
[in,out] | *pSrc | points to the complex data buffer of size 2*fftLen . Processing occurs in-place. |
Input and Output Formats for Q31 CFFT
Input and Output Formats for Q31 CIFFT
Definition at line 55 of file arm_cfft_radix4_q31.c.
arm_status arm_cfft_radix4_init_q15 | ( | arm_cfft_radix4_instance_q15 * | S, |
uint16_t | fftLen, | ||
uint8_t | ifftFlag, | ||
uint8_t | bitReverseFlag | ||
) |
Initialization function for the Q15 CFFT/CIFFT.
[in,out] | *S | points to an instance of the Q15 CFFT/CIFFT structure. |
[in] | fftLen | length of the FFT. |
[in] | ifftFlag | flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. |
[in] | bitReverseFlag | flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. |
fftLen
is not a supported value.ifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. Definition at line 1111 of file arm_cfft_radix4_init_q15.c.
void arm_cfft_radix4_q15 | ( | const arm_cfft_radix4_instance_q15 * | S, |
q15_t * | pSrc | ||
) |
Processing function for the Q15 CFFT/CIFFT.
[in] | *S | points to an instance of the Q15 CFFT/CIFFT structure. |
[in,out] | *pSrc | points to the complex data buffer. Processing occurs in-place. |
Input and Output Formats for Q15 CFFT
Input and Output Formats for Q15 CIFFT
Definition at line 55 of file arm_cfft_radix4_q15.c.
const float32_t twiddleCoef[8192] [static] |
for(i = 0; i< N; i++) { twiddleCoef[2*i]= cos(i * 2*PI/(float)N); twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); }
Definition at line 59 of file arm_cfft_radix4_init_f32.c.
const q31_t twiddleCoefQ31[8192] [static] |
for(i = 0; i< N; i++) { twiddleCoefQ31[2*i]= cos(i * 2*PI/(float)N); twiddleCoefQ31[2*i+1]= sin(i * 2*PI/(float)N); }
Definition at line 60 of file arm_cfft_radix4_init_q31.c.
const q15_t twiddleCoefQ15[4096 *2] [static] |
for(i = 0; i< N; i++) { twiddleCoefQ15[2*i]= cos(i * 2*PI/(float)N); twiddleCoefQ15[2*i+1]= sin(i * 2*PI/(float)N); }
Definition at line 61 of file arm_cfft_radix4_init_q15.c.
const uint16_t armBitRevTable[1024] |
for(l=1;l <= N/4;l++) { for(i=0;i<logN2;i++) { a[i]=l&(1<<i); } for(j=0; j<logN2; j++) { if (a[j]!=0) y[l]+=(1<<((logN2-1)-j)); } y[l] = y[l] >> 1; }
Definition at line 62 of file arm_common_tables.c.