Main Content

Code reuse

Single reusable file to represent the subsystem logic

Since R2022a

Model Configuration Pane: Global Settings / Coding style


Specify whether to generate a single reusable file to represent the subsystem logic for your model subsystem.


Atomic only (default) | Atomic and Virtual | off

Default: Atomic only

Atomic only

Generate reusable code for only atomic subsystems.

Atomic and Virtual

Generate a single reusable file for multiple identical subsystems.


Suppress the generation of a single reusable file that represents the subsystem logic.


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

For example, to generate a single reusable system for your entire project, enter

hdlset_param('myHDLModel', 'SubsystemReuse', 'Atomic and Virtual')

To set the option for a DUT component in your project, enter:

makehdl(<DUT system>, 'SubsystemReuse', 'Atomic and Virtual')

Recommended Settings

No recommended settings.

Programmatic Use

Type: character vector
Values:'Atomic only' | 'Atomic and Virtual'|'off'
Default: 'Atomic only'

Version History

Introduced in R2022a