Hauptinhalt

Generated model

R2026b

Generate model that shows latency and numeric differences between model and HDL code

Model Configuration Pane: Global Settings / Model Generation

Description

The Generated model parameter specifies whether to generate a model that shows the latency and numeric differences between your Simulink® design under test (DUT) and the generated HDL code.

When you select the Generated model parameter, HDL Coder™ creates a behavioral model during code generation. This behavioral model reflects the cycle-accurate and bit-true behavior of the generated code and show how HDL optimizations affect the latency and data flow.

The behavioral model can differ from the original model when HDL optimizations introduce additional delays, pipeline stages, or rate changes. Use this model to visualize the effects of HDL optimizations, such as pipeline insertion, delay balancing, and rate changes.

When you clear the Generated model, HDL Coder represents the design behavior of the original model by using an abstract model that it derives from the original model and DUT output port latency. Clearing this parameter can reduce code generation overhead.

If the design has DUT interface ports that differ from the original model, such as designs with tunable parameters or those that require frame-to-sample conversion, select Generated model.

Note

When you select Generated model, the Naming options and Layout options become available.

Settings

on (default) | off
on

Select this setting to generate the generated model. By default HDL Coder generates code and the generated model. To generate only the generated model, clear the Generate HDL code parameter.

off

Clear this setting when you want to generate an abstract model. HDL Coder represents the behavior of the original model by deriving an abstract model from the original model and the DUT output port latency. HDL Coder generates code using the abstract model.

Tips

To set this property, use the functions hdlset_param or makehdl. To view the property value, use the function hdlget_param.

If you want to generate HDL code and the generated model, enable Generate HDL codeproperty and GenerateModel property, enter:

hdlset_param("sfir_fixed", "GenerateModel","on");
hdlset_param("sfir_fixed", "GenerateHDLCode","on");
makehdl("sfir_fixed/symmetric_fir");

If you want to generate the generated model without generating HDL code, disable the GenerateHDLCode property, enter:

hdlset_param("sfir_fixed", "GenerateModel","on");
hdlset_param("sfir_fixed", "GenerateHDLCode","off");
makehdl("sfir_fixed/symmetric_fir");

Recommended Settings

No recommended settings.

Programmatic Use

Parameter: GenerateModel
Type: character vector | string
Value: "on" | "off"
Default: "on"

Version History

Introduced in R2017a