Products & Services Solutions Academia Support User Community Company

Learn more about Filter Design HDL Coder   

Generating Code for Multirate Filters

Supported Multirate Filter Types

HDL code generation is supported for the following types of multirate filters:

Generating Multirate Filter Code

To generate multirate filter code, you must first select and design one of the supported filter types using FDATool, filterbuilder, or the MATLAB command line.

After you have created the filter, open the Generate HDL dialog box, set the desired code generation properties, and generate code. GUI options that support multirate filter code generation are described in Code Generation Options for Multirate Filters.

If you prefer to generate code via the generatehdlfunction, the coder also defines multirate filter code generation properties that are functionally equivalent to the GUI options. generatehdl Properties for Multirate Filters summarizes these properties.

Code Generation Options for Multirate Filters

When a multirate filter of a supported type (see Supported Multirate Filter Types) is designed, the enabled/disabled state of several options in the Generate HDL dialog box changes:

The following figure shows the default settings of the Generate HDL dialog box options for a supported CIC filter.

The Clock inputs options are:

Setting the Clock Enable Output Name

A clock enable output is generated when Single is selected from the Clock inputs options in the Generate HDL dialog box. The default name for the clock enable output is ce_out.

To change the name of the clock enable output, enter the desired name into the Clock enable output port field of the Ports pane of the Generate HDL dialog box, as shown in the following figure.

Note that the coder enables the Clock enable output port field only when generating multiple clocks.

generatehdl Properties for Multirate Filters

If you are using generatehdl to generate code for a multirate filter, you can set the following properties to specify clock generation options:

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS