Logo
MSP DSP Library
Complex FIR

Data Structures

struct  msp_cmplx_fir_q15_params
 Parameter structure for complex FIR filter. More...
 
struct  msp_cmplx_fir_iq31_params
 Parameter structure for complex FIR filter. More...
 

Macros

#define MSP_ALIGN_CMPLX_FIR_Q15(n)   (n*8)
 Calculate the alignment for a 16-bit complex FIR filter from length parameter.
 
#define MSP_ALIGN_CMPLX_FIR_IQ31(n)   (n*16)
 Calculate the alignment for a 32-bit complex FIR filter from length parameter.
 

Functions

msp_status msp_cmplx_fir_q15 (const msp_cmplx_fir_q15_params *params, const _q15 *src, _q15 *dst)
 Discrete-time convolution of a complex source vector with complex coefficients to apply an FIR filter. More...
 
msp_status msp_cmplx_fir_iq31 (const msp_cmplx_fir_iq31_params *params, const _iq31 *src, _iq31 *dst)
 Discrete-time convolution of a complex source vector with complex coefficients to apply an FIR filter. More...
 

Detailed Description

Functions for performing complex Finite Impulse Response (FIR) filters.

Function Documentation

msp_status msp_cmplx_fir_iq31 ( const msp_cmplx_fir_iq31_params params,
const _iq31 src,
_iq31 dst 
)

Discrete-time convolution of a complex source vector with complex coefficients to apply an FIR filter.

Details
FIR filter implementation utilizing discrete-time convolution. Complex IQ31 multiplication is performed with a 32-bit accumulator to avoid intermediate overflow.
Pseudo code
dst = conv([stateBuffer, src], taps)(0:1:length)
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment when circular buffer is disabled or aligned to sixteen times the FIR data length if circular buffer is enabled (e.g. a 64-sample FIR with 128-sample circular buffer must be aligned to a 1024-byte address). When allocating data the MSP_ALIGN_CMPLX_FIR_IQ31 macro can be used to calculate the correct alignment.
Parameters
paramsPointer to the complex FIR parameter structure.
srcPointer to the source vector to filter.
dstPointer to the destination vector.
Returns
Status of the operation.
msp_status msp_cmplx_fir_q15 ( const msp_cmplx_fir_q15_params params,
const _q15 src,
_q15 dst 
)

Discrete-time convolution of a complex source vector with complex coefficients to apply an FIR filter.

Details
FIR filter implementation utilizing discrete-time convolution. Complex Q15 multiplication is performed with a 32-bit accumulator to avoid intermediate overflow.
Pseudo code
dst = conv([stateBuffer, src], taps)(0:1:length)
LEA Support
This function is supported by LEA and requires data to be placed into shared LEA memory with 4-byte alignment when circular buffer is disabled or aligned to eight times the FIR data length if circular buffer is enabled (e.g. a 64-sample FIR with 128-sample circular buffer must be aligned to a 512-byte address). When allocating data the MSP_ALIGN_CMPLX_FIR_Q15 macro can be used to calculate the correct alignment.
Parameters
paramsPointer to the complex FIR parameter structure.
srcPointer to the source vector to filter.
dstPointer to the destination vector.
Returns
Status of the operation.