Split entity and architecture Parameters
These settings correspond to the parameters in the HDL Code Generation > Global Settings > General tab of the Configuration Parameters dialog box. The parameters determine whether to split the entity and architecture into separate files.
Split entity file postfix
Enter a character vector to be appended to the model name to form the name of a generated VHDL® entity file.
You can specify an empty character vector for either the Split entity file postfix or the Split arch 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 Split entity file postfix, the code generator changes the entity name to a valid HDL name before generating code.
Settings
Default:
_entity
Dependency
This parameter is enabled by selecting the Split entity and architecture check box. When you select this check box, HDL Coder™ places the VHDL entity and architecture code in separate files.
Command-Line Information
Property:
SplitEntityFilePostfix |
Type: character vector |
Default:
'_entity' |
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,'SplitEntityFilePostfix','_ent')
When you use
hdlset_param
, you can set the parameter on the model and then generate HDL code usingmakehdl
.hdlset_param(gcs,'SplitEntityFilePostfix','_ent') makehdl('myDUT')
Split arch file postfix
Enter a character vector to be appended to the model name to form the name of a generated VHDL architecture file.
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 Split arch file postfix, the code generator changes the architecture name to a valid HDL name before generating code.
Settings
Default:
_arch
Dependency
This parameter is enabled by selecting the Split entity and architecture check box. When you select this check box, HDL Coder places the VHDL entity and architecture code in separate files.
Command-Line Information
Property:
SplitArchFilePostfix |
Type: character vector |
Default:
'_arch' |
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,'SplitArchFilePostfix','_arch1')
When you use
hdlset_param
, you can set the parameter on the model and then generate HDL code usingmakehdl
.hdlset_param(gcs,'SplitArchFilePostfix','_arch1') makehdl('myDUT')
Split entity and architecture
Specify whether generated VHDL entity and architecture code is written to a single VHDL file or to separate files.
Settings
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
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
.
Dependency
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.
Command-Line Information
Property:
SplitEntityArch |
Type: character vector |
Value:
'on' | 'off' |
Default:
'off' |
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')