Library
AI Engine/DSP
Description
This block implements the FIR Filter targeted for AI Engine and supports five different filter types.
Parameters
- Filter Type
-
- Single Rate
- The Single Rate FIR filter treats each of the inputs as an independent channel (sample-based processing), and filters each channel independently. This implements a static filter with fixed coefficients.
- Decimation
- The Decimation filter resamples the discrete-time input at a rate D times slower than the input sample rate, where D is the integer value you specify for the Decimation factor parameter.
- Interpolation
- The Interpolation filter resamples the discrete-time input at a rate 'L' times faster than the input sample rate, where L is the integer value you specify for the Interpolation factor parameter.
- Halfband Decimator
- The Halfband Interpolator filter performs decimation of the input signal by a factor of two.
- Halfband Interpolator
- The Halfband Interpolator filter performs interpolation of the input signal by a factor of two.
- Symmetric FIR Filter
- Specifies the symmetricity of the FIR filter. This option is available to select only for Single rate, Decimation, and Interpolation filters. The other filters are symmetric by default so this option is not available to select.
- Decimation/Interpolation factor
- An unsigned integer which describes the decimation/interpolation factor of the filter. It must be in the range 1 to 16.
- Filter length
- An unsigned integer which describes the number of taps in the filter.
- Filter coefficients
- This field should only be supplied for the first half of the filter length
plus the center tap for odd lengths i.e., taps[] = {c0, c1, c2, ..., cN [,
cCT]} where N = (FILTER_LENGTH)/2 and cCT is the center tap where
FILTER_LENGTH is odd. For example, a 7-tap filter might use coeffs (1, 3, 2,
5, 2, 3, 1). This could be input as taps[]= {1,3,2,5} because the context of
symmetry allows the remaining coefficients to be inferred.
For Halfband Decimator and Halfband Interpolator filter types, the coefficients must be supplied in a compressed form. i.e., taps[] = {c0, c2, c4, ..., cN, cCT} where N = (FILTER_LENGTH+1)/4 and cCT is the center tap. For example, a 7-tap halfband interpolator might use coeffs (1, 0, 2, 5, 2, 0, 1). This would be input as taps[]= {1,2,5} because the context of halfband interpolation allows the remaining coefficients to be inferred.
- Filter coefficients data type
- Describes the type of individual coefficients of the filter taps. It should
be one of: int16, cint16, int32, cint32, float, cfloat. and must also
satisfy the following rules:
- Complex types are only supported when the Input/Output data type is also complex.
- 32-bit types are only supported when the Input/Output data type is also a 32-bit type.
- The Filter coefficients data type must be an integer type if the Input/Output data type is an integer type.
- The Filter coefficients data type must be a float type if the Input/Output data type is a float type.
- Input/Output data type
- Describes the type of individual data samples input to and output from
the filter function. The following table summarizes the datatypes that are
supported with respect to the coefficient datatype.
Input/Output data Type Coefficient data type int16 int16 cint16 int16, cint16 int32 int16, int32 cint32 int16, cint16, int32, cint32 float float cfloat float, cfloat Note:- Half Band decimation filter: does not support Int16 Input/Output data type and Coefficients. Int16 type and other combination in the above table are supported.
- Decimation filter: Only supports Cint16 Input/Output data type and Coefficients Int16 type. Other data type combinations in the above table are not supported.
- Input window size (Number of samples)
- Describes the number of samples in the window used as input to the filter.
- Input sampling rate (MSPS)
- Specifies the rate at which data samples should be processed.
- Specify the number of cascade stages
- When this option is not enabled, the tool will determine an FIR filter configuration that best achieves the specified input sampling rate. But when the option is enabled and the Number of cascade stages is specified, the tool will guarantee the same. In such cases, however, the specified input sampling rate constraint may not be achieved.
- Scale output down by 2^
- Describes power of two shift down applied to the accumulation of FIR terms before output. It must be in range 0 to 61.
- Rounding mode
- Describes the selection of rounding to be applied during the shift down
stage of processing. Following are the rounding options:
- Floor (truncate).
- Ceiling.
- Round to Positive Infinity.
- Round to Negative Infinity.
- Round Symmetrical to Infinity.
- Round Symmetrical to Zero.
- Round Convergent to Even.
- Round Convergent to Odd.
Note: Modes 2 to 7 round to the nearest integer. They differ only in how they round for the value of 0.5.