Products & Services Solutions Academia Support User Community Company

Learn more about Filter Design HDL Coder   

Generating Code for Cascade Filters

Supported Cascade Filter Types

The coder supports code generation for the following types of cascade filters:

Generating Cascade Filter Code

Generating Cascade Filter Code with FDATool

To generate cascade filter code with FDATool:

  1. Instantiate the filter stages and cascade them in the MATLAB workspace (see the Filter Design Toolbox documentation for the dfilt.cascade and mfilt.cascade filter objects).

    The coder currently imposes certain limitations on the filter types allowed in a cascade filter. See Rules and Limitations for Code Generation with Cascade Filters before creating your filter stages and cascade filter object.

  2. Import the cascade filter object into FDATool, as described in Importing and Exporting Quantized Filters in the Filter Design Toolbox documentation.

  3. After you have imported the filter, open the Generate HDL dialog box, set the desired code generation properties, and generate code. See Rules and Limitations for Code Generation with Cascade Filters.

Generating Cascade Filter Code with the fdhdltool Function

To generate cascade filter code from the command line using fdhdltool:

  1. Instantiate the filter stages and cascade them in the MATLAB workspace (see the Filter Design Toolbox documentation for the dfilt.cascade and mfilt.cascade filter objects).

    The coder currently imposes certain limitations on the filter types allowed in a cascade filter. See Rules and Limitations for Code Generation with Cascade Filters before creating your filter stages and cascade filter object.

  2. Call fdhdltool to open the Generate HDL dialog box, passing in the cascade filter object as in the following example:

    fdhdltool(my_cascade);
  3. Set the desired code generation properties, and generate code. See Rules and Limitations for Code Generation with Cascade Filters.

Rules and Limitations for Code Generation with Cascade Filters

The following rules and limitations apply to cascade filters when used for code generation:

The following figure shows the default settings of the Generate HDL dialog box options when a cascade filter has been designed

  


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