Model

Include model as block in another model (HDL Coder)

Description

The Model block is available with Simulink®. For information about the simulation behavior and block parameters, see Model.

Generate Comments

If you enter text in the Model Block Properties dialog box Description field, HDL Coder™ generates a comment in the HDL code.

Generate Code For Model Arguments

To generate a single Verilog® module or VHDL® entity for instances of a referenced model with different model argument values, see Generate Parameterized Code for Referenced Models.

HDL Architecture

ArchitectureDescription
ModelReference (default) When you want to generate code from a referenced model and any nested models, use the ModelReference implementation. For more information, see How To Generate Code for a Referenced Model.
BlackBox

Use the BlackBox implementation to instantiate an HDL wrapper, or black box interface, for legacy or external HDL code. If you specify a black box interface, HDL Coder does not attempt to generate HDL code for the referenced model.

For more information, see Generate Black Box Interface for Referenced Model.

Black Box Interface Customization

For the BlackBox architecture, you can customize port names and set attributes of the external component interface. See Customize Black Box or HDL Cosimulation Interface.

HDL Block Properties

BalanceDelays

Detects introduction of new delays along one path, and inserts matching delays on the other paths. The default is inherit. See also BalanceDelays.

ConstrainedOutputPipeline

Number of registers to place at the outputs by moving existing delays within your design. Distributed pipelining does not redistribute these registers. The default is 0. See also ConstrainedOutputPipeline.

DistributedPipelining

Pipeline register distribution, or register retiming. The default is off. See also DistributedPipelining.

DSPStyle

Synthesis attributes for multiplier mapping. The default is none. See also DSPStyle.

InputPipeline

Number of input pipeline stages to insert in the generated code. Distributed pipelining and constrained output pipelining can move these registers. The default is 0. See also InputPipeline.

OutputPipeline

Number of output pipeline stages to insert in the generated code. Distributed pipelining and constrained output pipelining can move these registers. The default is 0. See also OutputPipeline.

SharingFactor

Number of functionally equivalent resources to map to a single shared resource. The default is 0. See also Resource Sharing.

StreamingFactor

Number of parallel data paths, or vectors, that are time multiplexed to transform into serial, scalar data paths. The default is 0, which implements fully parallel data paths. See also Streaming.

Restrictions

When you generate HDL code for referenced models, the following limitations apply:

  • You must set the block parameters for the Model block to their default values.

  • If multiple model references refer to the same model, their HDL block properties must be the same.

  • Referenced models cannot be protected models.

  • Hierarchical distributed pipelining must be disabled.

HDL Coder cannot move registers across a model reference. Therefore, referenced models may inhibit the following optimizations:

  • Distributed pipelining

  • Constrained output pipelining

The coder cannot apply the streaming optimization to a model reference.

The coder can apply the resource sharing optimization to share referenced model instances. However, you can apply this optimization only when all model references that point to the same referenced model have the same rate after optimizations and rate propagation. The model reference final rate may differ from the original rate, but all model references that point to the same referenced model must have the same final rate.

Was this topic helpful?