|
#define | MSP_ALIGN_FFT_Q15(n) (n*2) |
| Calculate the alignment for a 16-bit real FFT from length parameter.
|
|
#define | MSP_ALIGN_FFT_IQ31(n) (n*4) |
| Calculate the alignment for a 32-bit real FFT from length parameter.
|
|
#define | MSP_ALIGN_CMPLX_FFT_Q15(n) (n*4) |
| Calculate the alignment for a 16-bit complex FFT from length parameter.
|
|
#define | MSP_ALIGN_CMPLX_FFT_IQ31(n) (n*8) |
| Calculate the alignment for a 32-bit complex FFT from length parameter.
|
|
Support functions used for real and complex FFT functions. These functions do not need to be called outside of DSPLib.
Complex bit-reversal function.
- Details
- Inputs to the real and complex fft functions need to be in bit reversed order before the result can be computed. The DSPLib fft functions contain a parameter to perform the bit reversal and this API does not need to be invoked directly. Alternatively the application can store input in bit reversed order and skip this step although it may be more efficient to store in linear order using pointer increment or DMA copy and performing the bit reversal all at once.
- Pseudo code
y = bitrevorder(x)
- LEA Support
- This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
- Parameters
-
params | Pointer to the complex bit-reversal parameter structure. |
src | Pointer to the complex data array to perform the bit-reversal on. |
- Returns
- Status of the operation.
Complex bit-reversal function.
- Details
- Inputs to the real and complex fft functions need to be in bit reversed order before the result can be computed. The DSPLib fft functions contain a parameter to perform the bit reversal and this API does not need to be invoked directly. Alternatively the application can store input in bit reversed order and skip this step although it may be more efficient to store in linear order using pointer increment or DMA copy and performing the bit reversal all at once.
- Pseudo code
y = bitrevorder(x)
- LEA Support
- This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment.
- Parameters
-
params | Pointer to the complex bit-reversal parameter structure. |
src | Pointer to the complex data array to perform the bit-reversal on. |
- Returns
- Status of the operation.
Split operation for performing the final step of a real FFT.
- Details
- Performs the final stage of a discreet Fourier transform (DFT) of real inputs. First a complex FFT of size length/2 with must be performed before this function can be called. The DSPLib real fft functions invoke this function directly and this API does not need to be called directly from the application.
- Pseudo code
G(k) = 0.5*(X(k) + X*(N-k)) - 0.5*j*(e^-j2*pi*k/2N)*(X(k) - X*(N-k))
- LEA Support
- This function is supported by LEA and requires data to be placed into shared LEA memory with alignment equal to four times the data length (e.g. a 256-point real FFT requires 1024-byte alignment). When allocating data the MSP_ALIGN_FFT_IQ31 macro can be used to calculate correct alignment. The twiddle table pointer parameter is not used with LEA and can be null or uninitialized.
- Parameters
-
params | Pointer to the split parameter structure. |
src | Pointer to the data array to perform the split operation on. |
- Returns
- Status of the operation.
Split operation for performing the final step of a real FFT.
- Details
- Performs the final stage of a discreet Fourier transform (DFT) of real inputs. First a complex FFT of size length/2 with must be performed before this function can be called. The DSPLib real fft functions invoke this function directly and this API does not need to be called directly from the application.
- Pseudo code
G(k) = 0.5*(X(k) + X*(N-k)) - 0.5*j*(e^-j2*pi*k/2N)*(X(k) - X*(N-k))
- LEA Support
- This function is supported by LEA and requires data to be placed into shared LEA memory with alignment equal to twice the data length (e.g. a 256-point real FFT requires 512-byte alignment). When allocating data the MSP_ALIGN_FFT_Q15 macro can be used to calculate correct alignment. The twiddle table pointer parameter is not used with LEA and can be null or uninitialized.
- Parameters
-
params | Pointer to the split parameter structure. |
src | Pointer to the data array to perform the split operation on. |
- Returns
- Status of the operation.