The FDATool block is used to define the filter order and coefficients, and the Xilinx® Blocksets are used to implement a filter. The DSP library in the Xilinx Blockset contains the FDATool block.
A simple System Generator model below illustrates a standard FIR filter design using the FDATool and digital FIR filter block.
The design uses two sine wave sources which are being added together and passed separately through two low-pass filters.
- The first filter is the one that could be implemented using Xilinx blockset. It is a digital low pass filter implemented using the Digital FIR filter block.
- The second filter is what is referred to as a reference filter. A low pass filter is implemented using a Direct-form FIR structure.
The frequency response of both filters visualized in Spectrum Analyzer block.
The Xilinx version of the FDAtool can be used to define the coefficients of the low-pass filter to eliminate high-frequency noise. The filter configuration parameters like Response Type, Filter Order, Frequency Specification, and Magnitude Specification can be modified from the Properties Editor of the FDATool as shown below.
The Design Filter option at the bottom of the tool window allows you to find out the filter order and observe the Magnitude Response. You can also view the Phase Response, Impulse Response, Coefficients, and more by selecting the appropriate icon at the top-right of the window. You can display the filter coefficients in the MATLAB® workspace by typing the following:
>> xlfda_numerator('FDATool')
The following functions help you find the maximum and minimum coefficient values to adequately specify the coefficient width and binary point:
>> max(xlfda_numerator('FDATool'))
>> min(xlfda_numerator('FDATool'))
Now, the filter parameters of the FDATool instance can be associated with the Digital FIR filter instance.
The Xilinx Filter response can be viewed and compared with the Simulink® response using the Spectrum Analyzer.
For complete example along with steps to use the FDATool, refer to the Vivado Design Suite Tutorial: Model-Based DSP Design Using System Generator (UG948).