DSP Builder for Intel® FPGAs (Advanced Blockset): Handbook

ID 683337
Date 5/27/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

13.1.13. Single-Rate FIR

The SingleRateFIR block implements a highly efficient multichannel finite impulse response filter across a broad range of parameters directly from a Simulink model. A memory-mapped interface allows you to read and write coefficients directly, easing system integration. The SingleRateFIR block performs filtering on a stream of multichannel input data and produces a stream of output data with increased sampling frequency.

You can use the SingleRateFIR block in a digital up converter for a radio system or a general purpose DSP application. The coefficients and input data are fixed-point types, and the output is the implied full precision fixed-point type. You can reduce the precision by using a separate Scale block, which can perform rounding and saturation to provide the required output precision.

The SingleRateFIR block supports sample rates from 1 to 500, coefficient width in bits from 2 to 32 bits, half-band and L-band Nyquist filters, real and complex filters, and symmetry and anti(negative)-symmetry.

Table 58.  Parameters for the Single-Rate FIR Block
Parameter Description
Input rate per channel Specifies the sampling frequency of the input data per channel measured in millions of samples per second (MSPS).
Number of channels Specifies the number of unique channels to process.
Symmetry You can select Symmetrical or Anti-Symmetrical coefficients. Symmetrical coefficients can result in hardware resource savings over the asymmetrical version.
Coefficients You can specify the filter coefficients using a Simulink fixed-point object fi(0). The data type of the fixed-point object determines the width and format of the coefficients. The length of the array determines the length of the filter. For example, fi(fir1(49, 0.3),1,18,19)
Base address You can memory map the filter's coefficients into the address space of the system. This field determines the starting address for the coefficients. It is specified as a MATLAB double type (decimal integer) but you can use a MATLAB expression to specify a hexadecimal or octal type if required.
Read/Write mode You can allow Read, Write, or Read/Write access from the system interface. Turn on Constant, to map coefficients to the system address space.
Expose Avalonmemory-mapped agent in Simulink Allows you to reconfigure coefficients without Platform Designer. Also, it allows you to reprogram multiple FIR filters simultaneously. Turn on to show the Avalon memory-mapped inputs and outputs as normal ports in Simulink. The Read/Write mode decides the valid subset of Avalon memory-mapped agent ports that appear on the block. If you select Constant, the block shows no Avalon-MM ports.
Reconfigurable channels Turn on for a reconfigurable FIR filter.
Channel mapping Enter parameters as a MATLAB 2D array for a reconfigurable FIR filter. Each row represents a mode; each entry in a row represents the channel input on that time slot. For example, [0,0,0,0;0,1 2,3] gives the first element of the second row as 0, which means DSP Builder processes channel 0 on the first cycle when the FIR is set to mode 1.
Table 59.  Port Interface for the Single-Rate FIR Block
Signal Direction Description
a Input The fixed-point data input to the block. If you request more channels than can fit on a single bus, this signal is a vector. The width in bits is inherited from the input wire.
v Input Indicates validity of the data input signals. If v is high, the data on the a wire is valid.
c Input Indicates the channel of the data input signals. If v is high, c indicates the channel to which the data corresponds.
m Input Indicates a reconfigurable filter.
b Input Indicates multibank filter. This input appears when you add a second filter definition to the Coefficients parameter in the parameters dialog box.
q Output The fixed-point filtered data output from the block. If you request more channels than can fit on a single bus, this signal is a vector. The width in bits is a function of the input width in bits and the parameterization.
v Output Indicates the validity of data output signals. The output data can be non-zero when v is low.
c Output Indicates the channel of the data output signals. The output data can be non-zero when v is low.