Logo
MSP DSP Library
Support

Data Structures

struct  msp_cmplx_bitrev_q15_params
 Parameter structure for Q15 complex bit-reversal. More...
 
struct  msp_cmplx_bitrev_iq31_params
 Parameter structure for IQ31 complex bit-reversal. More...
 
struct  msp_split_q15_params
 Parameter structure for Q15 split operation. More...
 
struct  msp_split_iq31_params
 Parameter structure for IQ31 split operation. More...
 

Macros

#define MSP_ALIGN_FFT_Q15(n)   (n*2)
 Alignment for 16-bit real FFT functions that use the msp_fft_q15_params parameter structure.
 
#define MSP_ALIGN_FFT_IQ31(n)   (n*4)
 Alignment for 32-bit real FFT functions that use the msp_fft_iq31_params parameter structure.
 
#define MSP_ALIGN_CMPLX_FFT_Q15(n)   (n*4)
 Alignment for 16-bit complex FFT functions that use the msp_cmplx_fft_q15_params parameter structure.
 
#define MSP_ALIGN_CMPLX_FFT_IQ31(n)   (n*8)
 Alignment for 32-bit complex FFT functions that use the msp_cmplx_fft_iq31_params parameter structure.
 

Functions

msp_status msp_cmplx_bitrev_q15 (const msp_cmplx_bitrev_q15_params *params, int16_t *src)
 Complex bit-reversal function. More...
 
msp_status msp_cmplx_bitrev_iq31 (const msp_cmplx_bitrev_iq31_params *params, int32_t *src)
 Complex bit-reversal function. More...
 
msp_status msp_split_q15 (const msp_split_q15_params *params, int16_t *src)
 Split operation for performing the final step of a real FFT. More...
 
msp_status msp_split_iq31 (const msp_split_iq31_params *params, int32_t *src)
 Split operation for performing the final step of a real FFT. More...
 

Detailed Description

Support functions used for real and complex FFT functions. These functions do not need to be called outside of DSPLib.

Function Documentation

msp_status msp_cmplx_bitrev_iq31 ( const msp_cmplx_bitrev_iq31_params params,
int32_t *  src 
)

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)
Parameters
paramsPointer to the complex bit-reversal parameter structure.
srcPointer to the complex data array to perform the bit-reversal on.
Returns
Status of the operation.
msp_status msp_cmplx_bitrev_q15 ( const msp_cmplx_bitrev_q15_params params,
int16_t *  src 
)

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)
Parameters
paramsPointer to the complex bit-reversal parameter structure.
srcPointer to the complex data array to perform the bit-reversal on.
Returns
Status of the operation.
msp_status msp_split_iq31 ( const msp_split_iq31_params params,
int32_t *  src 
)

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.
When using LEASC the twiddle table pointer can be set to NULL (zero) and the source data must be aligned to LENGTH*2 bytes. For example, a 256 point real FFT must be aligned to a 512 byte address in shared LEA memory.
Pseudo code
G(k) = 0.5*(X(k) + X*(N-k)) - 0.5*j*(e^-j2*pi*k/2N)*(X(k) - X*(N-k))
Parameters
paramsPointer to the split parameter structure.
srcPointer to the data array to perform the split operation on.
Returns
Status of the operation.
msp_status msp_split_q15 ( const msp_split_q15_params params,
int16_t *  src 
)

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.
When using LEASC the twiddle table pointer can be set to NULL (zero) and the source data must be aligned to LENGTH bytes. For example, a 256 point real FFT must be aligned to a 256 byte address in shared LEA memory.
Pseudo code
G(k) = 0.5*(X(k) + X*(N-k)) - 0.5*j*(e^-j2*pi*k/2N)*(X(k) - X*(N-k))
Parameters
paramsPointer to the split parameter structure.
srcPointer to the data array to perform the split operation on.
Returns
Status of the operation.