Module name prefix
Prefix for module or entity name
Model Configuration Pane: Global Settings / General
Description
Specify a prefix for every module or entity name in the generated HDL code.
Settings
''
(default) | character vectorDefault: ''
Specify a prefix for every module or entity name in the generated HDL code. HDL Coder™ also applies this prefix to generated script file names.
You can specify the module name prefix to avoid name collisions if you plan to instantiate the generated HDL code multiple times in a larger system.
Tips
To set this property, use the functions hdlset_param
or makehdl
. To view the property value, use
the function hdlget_param
.
Suppose you have a DUT, myDut
, containing an internal module, myUnit
. You can prefix the modules within your design with unit1_
by using either of these methods.
Pass the property as an argument to the
makehdl
function.makehdl('myDUT', ... 'ModulePrefix','unit1_')
When you use
hdlset_param
, you can set the parameter on the model and then generate HDL code usingmakehdl
.hdlset_param('myUnit/myDUT','ModulePrefix','unit1_') makehdl('myDUT')
In the generated code, your HDL module names are unit1_myDut
and unit1_myUnit
, with corresponding HDL file names. Generated script file names also have the unit1_
prefix.
Recommended Settings
No recommended settings.
Programmatic Use
Parameter: ModulePrefix |
Type: character vector |
Default: '' |
Version History
Introduced in R2013a