MATLAB System

Include System object in model (HDL Coder)

Description

You can define a System object™ and use it in a MATLAB System block for HDL code generation.

The MATLAB System block is available with Simulink®.

For information about the Simulink behavior and block parameters, see MATLAB System.

Tunable Parameter Support

HDL Coder™ supports tunable parameters with the following data types:

  • Numeric

  • Fixed point

  • Character

  • Logical

When using tunable parameters with the MATLAB System block, the tunable parameter should be a Simulink.Parameter object with the StorageClass set to ExportedGlobal.

x = Simulink.Parameter 
x.Value = 1 
x.CoderInfo.StorageClass = 'ExportedGlobal' 
For details, see Generate DUT Ports for Tunable Parameters.

HDL Architecture

This block has a single, default HDL architecture.

HDL Block Properties

If you use a predefined System object, the HDL block properties available are the same as the properties available for the corresponding block.

By default, the following HDL block properties are available.

ConstMultiplierOptimization

Canonical signed digit (CSD) or factored CSD optimization. The default is none. See also ConstMultiplierOptimization.

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.

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.

LoopOptimization

Unroll, stream, or do not optimize loops. The default is none. See also LoopOptimization.

MapPersistentVarsToRAM

Map persistent arrays to RAM. The default is off. See also MapPersistentVarsToRAM.

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.

ResetType

Suppress reset logic generation. The default is default, which generates reset logic. See also ResetType.

SharingFactor

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

VariablesToPipeline

Insert a pipeline register at the output of the specified MATLAB® variable or variables. Specify the list of variables as a character vector, with spaces separating the variables.

Restrictions

Was this topic helpful?