ModulePrefix

Specify prefix for DUT module or entity name

Settings

'prefix name'

Default: ''

Specify a prefix for every module or entity name in the generated HDL code as a character vector. HDL Coder™ also applies this prefix to generated script file names.

Usage Notes

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.

For example, suppose you have a DUT, myDut, containing an internal module, myUnit. You can prefix the modules within your design with unit1_, by entering the following command:

hdlset_param ('path/to/myDut', 'ModulePrefix','unit1_')
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.

Set or View This Property

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

Was this topic helpful?