|
#define | MSP_ALIGN_FIR_Q15(n) (n*4) |
| Calculate the alignment for a 16-bit real FIR filter from length parameter.
|
|
#define | MSP_ALIGN_FIR_IQ31(n) (n*8) |
| Calculate the alignment for a 32-bit real FIR filter from length parameter.
|
|
Functions for performing real Finite Impulse Response (FIR) filters.
Discrete-time convolution of a source vector with real coefficients to apply an FIR filter.
- Details
- FIR filter implementation utilizing discrete-time convolution. 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 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_FIR_IQ31 macro can be used to calculate the correct alignment.
- Parameters
-
params | Pointer to the FIR parameter structure. |
src | Pointer to the source vector to filter. |
dst | Pointer to the destination vector. |
- Returns
- Status of the operation.
- Examples:
- filter_ex2_fir_iq31.c.
Discrete-time convolution of a source vector with real coefficients to apply an FIR filter.
- Details
- FIR filter implementation utilizing discrete-time convolution. 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 four 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 256-byte address). When allocating data the MSP_ALIGN_FIR_Q15 macro can be used to calculate the correct alignment.
- Parameters
-
params | Pointer to the FIR parameter structure. |
src | Pointer to the source vector to filter. |
dst | Pointer to the destination vector. |
- Returns
- Status of the operation.
- Examples:
- filter_ex1_fir_q15.c.