UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 36812

Description

The FIR Compiler requires the user to define coefficients to define the Filter's frequency characteristics.

This is done by entering some representation of the coefficients in the 'Coefficient Vector' field in the FIR Compiler GUI.

There are several methods available using Matlab and System Generator to define the coefficients.

Solution

Method 1:Direct input

In the blank to define the coefficients, the coefficients can be directly input as an array of values:

[-0.0053  -0.0028  0.0435  0.1695  0.2951  0.2951 0.1695  0.0435  -0.0028  -0.0053]

Method 2: Calling a Matlab filter function

Matlab has many built in functions available that can be used to design specific filter coefficients.

A couple of examples of these functions are FIR1 and FIRRCOS.

These functions can be used for the Coefficient Vector value.

An example using the FIR1 function is:

FIR1(99,.18)

Method 3: Using the FDATool

The System Generator blockset includes a block that calls Matlab's FDATool.

When this block is used, it is convenient to use the FDATool to design filter coefficients.

When this block is included in the Sysgen design, the following command can be used for the Coefficient Vector:

xlfda_numerator('FDATool')

Method 4: Calling a workspace variable

If the coefficients already exist in a variable in Matlab's workspace, it is possible to use the variable name for the Coefficient Vector to call the filter coefficients from the workspace.

AR# 36812
Date 03/23/2015
Status Active
Type General Article
Tools
• Vivado Design Suite