Include System object in model (HDL Coder)
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.
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'
This block has a single, default HDL architecture.
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.
Canonical signed digit (CSD) or factored CSD optimization. The
default is none
. See also ConstMultiplierOptimization.
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.
Pipeline register distribution, or register retiming. The default
is off
. See also DistributedPipelining.
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.
Unroll, stream, or do not optimize loops. The default is none
.
See also LoopOptimization.
Map persistent arrays to RAM. The default is off
.
See also MapPersistentVarsToRAM.
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.
Suppress reset logic generation. The default is default
,
which generates reset logic. See also ResetType.
Number of functionally equivalent resources to map to a single shared resource. The default is 0. See also Resource Sharing.
Warning
|
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.
The DUT subsystem must be single-rate.
Inputs cannot have non-discrete (constant or Inf
)
sample time.
The following predefined System objects are supported for code generation when you use them in the MATLAB System block:
If you use a user-defined System object, it must support HDL code generation. For information about user-defined System objects and requirements for HDL code generation, see HDL Code Generation for System Objects.