Split entity and architecture
Number of files entity and architecture code is written to
Model Configuration Pane: Global Settings / General
Description
Specify whether generated VHDL® entity and architecture code is written to a single VHDL file or to separate files.
Dependencies
This option is enabled when the target language (specified by the Language option) is VHDL.
Selecting this option enables the following parameters:
Split entity file postfix
Split architecture file postfix
You can specify an empty character vector for either the Split arch file postfix or the Split entity file postfix. Both VHDL entity and architecture files cannot have empty postfix values. When you specify both values, make sure that you use different values for the Split entity file postfix and the Split arch file postfix.
If you input special characters for the Split entity file postfix or the Split arch file postfix, the code generator changes the entity name or the architecture name to a valid HDL name before generating code.
Settings
off
(default) | on
Default: Off
on
VHDL entity and architecture definitions are written to separate files.
off
VHDL entity and architecture code is written to a single VHDL file.
Tips
To set this property, use the functions hdlset_param
or makehdl
. To view the property value, use
the function hdlget_param
.
For example:
Pass the property as an argument to the
makehdl
function.makehdl(gcb,'SplitEntityArch','on')
When you use
hdlset_param
, you can set the parameter on the model and then generate HDL code usingmakehdl
.hdlset_param(gcs,'SplitEntityArch','on') makehdl('myDUT')
The names of the entity and architecture files derive from the base file name (as specified by the generating model or subsystem name). By default, postfix strings identifying the file as an entity (_entity
) or architecture (_arch
) are appended to the base file name. You can override the default and specify your own postfix as a character vector.
For example, instead of all generated code residing in MyFIR.vhd
, you can specify that the code reside in MyFIR_entity.vhd
and MyFIR_arch.vhd
.
Recommended Settings
No recommended settings.
Programmatic Use
Parameter: SplitEntityArch |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
Version History
Introduced in R2012a