HDL Code Generation for System Objects - MATLAB & Simulink (original) (raw)

HDL Coder™ supports both predefined and user-defined System objects for code generation.

Why Use System Objects?

System objects provide a design advantage because:

Predefined System Objects

Predefined System objects that are available with MATLAB®, DSP System Toolbox™, and Communications Toolbox™ are supported for HDL code generation. For a list, see Predefined System Objects Supported for HDL Code Generation.

User-Defined System Objects

You can create user-defined System objects for HDL code generation. For an example, see Generate Code for User-Defined System Objects.

Note

To use a MATLAB class for HDL code generation, the class must be a System object.

Limitations of HDL Code Generation for System Objects

The following limitations apply to HDL code generation for System objects:

Supported Methods

For predefined System objects, calling the object itself is supported for HDL code generation, but no other object functions are supported.

For user-defined System objects, either thestep method, or the output andupdate methods, are supported for HDL code generation.

Additional Restrictions for Predefined System Objects

Predefined System objects are not supported for HDL code generation from within a MATLAB System block.

Additional Restrictions for User-Defined System Objects

In addition to the limitations for allSystem objects, the following restrictions apply to user-definedSystem objects for HDL code generation:

System object Examples for HDL Code Generation

To learn how to use System objects for HDL code generation, view the MATLAB designs in the following examples: