HDL Synthesis and Workflow Automation Properties
Integrate third-party EDA tools into filter design workflow
With the synthesis and workflow automation properties, you can enable and customize the generation of script files for third-party Electronic Design Automation (EDA) tools.
These scripts let you compile, simulate, and synthesize the generated HDL code. You can
modify the commands that the coder prints to the scripts by setting the properties on this
page. The coder passes the property values to fprintf
to create the script.
You can use control characters supported by the fprintf
function. For
example, '\n'
inserts a new line into the script file.
Specify these properties as
name-value arguments to the generatehdl
function.
Name
is the property name and Value
is the
corresponding value. You can specify several name-value arguments in any order as
'Name1',Value1,...,'NameN',ValueN
.
For example:
fir = dsp.FIRFilter('Structure','Direct form antisymmetric'); generatehdl(fir,'InputDataType',numerictype(1,16,15),'VHDLLibraryName','my_work');
Generate Scripts
EDAScriptGeneration
— Enable script generation for EDA tools
'on'
(default) | 'off'
Enable script generation for EDA tools, specified as one of the following:
'on'
— The coder generates a compilation script for Siemens® ModelSim™. In addition:If the
GenerateHDLTestBench
property is set to'on'
, the coder generates compilation and simulation scripts for the test bench.If the
HDLSynthTool
property is set to a value other than'none'
, the coder generates a synthesis script.
'off'
— Disables script generation, including compilation, simulation, and synthesis scripts.
Compilation Scripts
VHDLLibraryName
— Library name used in initialization section of compilation script
'work'
(default) | character vector | string scalar
Library name used in initialization section of compilation script, specified as
'work'
, a character vector, or a string scalar. Use this property
to avoid library name conflicts with your existing VHDL® code. The coder inserts this name into the HDLCompileInit
property
value. By default, the coder generates the library specification 'vlib
work/n'
.
HDLCompileFilePostfix
— Postfix to file name of compilation script
'_compile.do'
(default) | character vector | string scalar
Postfix to file name of compilation script, specified as
'_compile.do'
, a character vector, or a string scalar. The coder
derives the name of the script by appending this postfix to the generated filter name or
test bench name. For example, if the generated filter name is
my_design
, the coder adds the postfix
_compile.do
to form the name
my_design_compile.do
.
HDLCompileInit
— Initialization section of compilation script
'vlib %s\n'
(default) | character vector | string scalar
Initialization section of compilation script, specified as 'vlib
%s\n'
, a character vector, or a string scalar. The coder prints this command
to the beginning of the compilation script. The implicit argument,
%s
, is the name of the library specified by the VHDLLibraryName
property. By default, this property generates the library specification 'vlib
work/n'
. If you compile your filter design with code from other libraries,
update the VHDLLibraryName
property to avoid library name conflicts.
HDLCompileVerilogCmd
— Command written to compilation script for each Verilog file
'vlog %s %s\n'
(default) | character vector | string scalar
Command written to compilation script for each Verilog file, specified as
'vlog %s %s\n'
, a character vector, or a string scalar. This
command adds the generated HDL source file to the list of files to be compiled. The
coder prints this command to the script once for each generated HDL file. The first
implicit argument, %s
, takes the value of the SimulatorFlags
property.
The second implicit argument is the file name of the current module.
HDLCompileVHDLCmd
— Command written to compilation script for each VHDL file
'vcom %s %s\n'
(default) | character vector | string scalar
Command written to compilation script for each VHDL file, specified as 'vcom %s %s\n'
, a character vector,
or a string scalar. This command adds the generated HDL source file to the list of files
to be compiled. The coder prints this command to the script once for each generated HDL
file. The first implicit argument, %s
, takes the value of the
SimulatorFlags
property.
The second implicit argument is the file name of the current entity.
SimulatorFlags
— Simulator options
''
(default) | character vector | string scalar
Simulator options, specified as ''
, a character vector, or a
string scalar. Specify options that are specific to your application and the simulator
you are using. For example, if you use the 1076-1993 VHDL compiler, specify the flag '-93'
. The coder adds the
flags you specify with this option to the compilation command in the generated EDA tool
scripts. The HDLCompileVHDLCmd
or
HDLCompileVerilogCmd
properties determine the compilation command.
HDLCompileTerm
— Termination section of compilation script
''
(default) | character vector | string scalar
Termination section of compilation script, specified as ''
, a
character vector, or a string scalar. The coder prints this character sequence to the
end of the compilation script.
Simulation Scripts
HDLSimFilePostfix
— Postfix to file name of simulation script
'_sim.do'
(default) | character vector | string scalar
Postfix to file name of simulation script, specified as
'_sim.do'
, a character vector, or a string scalar. The coder derives
the name of the script by appending this postfix to the generated test bench name. For
example, if the name of the test bench is my_design_tb
, the coder
adds the postfix _sim.do
to form the name
my_design_tb_sim.do
.
Dependencies
This property applies only when the EDAScriptGeneration
and GenerateHDLTestBench
properties are set to
'on'
.
HDLSimInit
— Initialization section of simulation script
'onbreak resume\nonerror resume\n'
(default) | character vector | string scalar
Initialization section of simulation script, specified as 'onbreak
resume\nonerror resume\n'
, a character vector, or a string scalar. The coder
prints this command to the beginning of the simulation script.
Dependencies
This property applies only when the EDAScriptGeneration
and GenerateHDLTestBench
properties are set to
'on'
.
HDLSimCmd
— Command written to simulation script
'-voptargs=+acc %s.%s\n'
(default) | character vector | string scalar
Command written to simulation script, specified as a character vector or a string
scalar to be combined with vsim
, like vsim -voptargs=+acc
%s.%s\n
. The first implicit argument, %s
, is the library
name. The second implicit argument is the generated test bench name. For Verilog, the
library name is 'work'
and cannot be changed. For VHDL, the library name is the value of the VHDLLibraryName
property. If you compile your filter design with code from other libraries, update
VHDLLibraryName
to avoid library name conflicts.
Note
Prior to R2020b, the default HDL simulation command was vsim -novopt
%s.%s\n
. Siemens
ModelSim versions prior to 10.7 support the former syntax. If you use a more
recent ModelSim version, you must use the -voptargs=+acc
syntax.
Dependencies
This property applies only when the EDAScriptGeneration
and GenerateHDLTestBench
properties are set to
'on'
.
HDLSimViewWaveCmd
— Waveform-viewing command written to simulation script
'add wave sim:%s\n'
(default) | character vector | string scalar
Waveform-viewing command written to simulation script, specified as 'add
wave sim:%s\n'
, a character vector, or a string scalar. The implicit
argument, %s
, is a command that adds the signal paths for the DUT
top-level input signals, output signals, and output reference signals.
Dependencies
This property applies only when the EDAScriptGeneration
and GenerateHDLTestBench
properties are set to
'on'
.
HDLSimTerm
— Termination section of simulation script
'run -all\n'
(default) | character vector | string scalar
Termination section of simulation script, specified as 'run
-all\n'
, a character vector, or a string scalar. The coder prints this
command to the end of the simulation script.
Dependencies
This property applies only when the EDAScriptGeneration
and GenerateHDLTestBench
properties are set to
'on'
.
Synthesis Scripts
HDLSynthTool
— Generate script for synthesis tool
'none'
(default) | 'Vivado'
| 'ISE'
| 'Libero'
| 'Precision'
| 'Quartus'
| 'Synplify'
| 'Custom'
Generate script for synthesis tool, specified as one of the following.
HDLSynthTool Value | Synthesis Tool |
---|---|
'none' | N/A. The coder does not generate a synthesis script. |
'Vivado' |
Xilinx® Vivado® |
'ISE' | Xilinx ISE |
'Libero' |
Microsemi™ Libero® |
'Precision' | Siemens Precision |
'Quartus' | Altera® Quartus II |
'Synplify' |
Synopsys® Synplify Pro® |
'Custom' | The coder generates a script that supports your tool, based on the settings
of HDLSynthCmd ,
HDLSynthInit , and
HDLSynthTerm
properties. |
When generating the script, the coder uses tool-specific values set by the HDLSynthCmd
, HDLSynthInit
, and
HDLSynthTerm
properties.
Customize these properties according to your target device and constraints.
Dependencies
This property applies only when the EDAScriptGeneration
property is set to 'on'
.
HDLSynthFilePostfix
— Postfix to file name of synthesis script
character vector | string scalar
Postfix to file name of synthesis script, specified as a character vector or a string scalar. The coder derives the name of the script by appending this postfix to the generated filter name.
The default postfix value depends on the synthesis tool specified by the HDLSynthTool
property. For
example, if the value of HDLSynthTool
is
'Synplify'
, then HDLSynthFilePostfix
defaults
to '_synplify.tcl'
. Therefore, if the generated filter name is
my_design
, the coder adds the postfix
_synplify.tcl
to form the synthesis script file name
my_design_synplify.tcl
.
HDLSynthTool Value | Default HDLSynthFilePostfix Value |
---|---|
none | N/A |
'Vivado' | '_vivado.tcl' |
'ISE' | '_ise.tcl' |
'Libero' | '_libero.tcl' |
'Precision' | '_precision.tcl' |
'Quartus' | '_quartus.tcl' |
'Synplify' | '_synplify.tcl' |
'Custom' | '_custom.tcl' |
Dependencies
This property applies only when the EDAScriptGeneration
property is set to 'on'
and the
HDLSynthTool
property is
set to a value other than 'none'
.
HDLSynthInit
— Initialization section of synthesis script
character vector | string scalar
Initialization section of synthesis script, specified as a character vector or a
string scalar. The default value of this property depends on the synthesis tool
specified by the HDLSynthTool
property. For
example, if you set HDLSynthTool
to 'ISE'
, this
property defaults
to:
set src_dir [pwd]\nset prj_dir "synprj"\n file mkdir ../$prj_dir\n cd ../$prj_dir\n project new %s.xise\n project set family Virtex4\n project set device xc4vsx35\n project set package ff668\n project set speed -10\n
%s
, is the top-level module or entity name.
Dependencies
This property applies only when the EDAScriptGeneration
property is set to 'on'
and the
HDLSynthTool
property is
set to a value other than 'none'
.
HDLSynthCmd
— Command written to synthesis script for each HDL file
character vector | string scalar
Command written to synthesis script for each HDL file, specified as a character
vector or a string scalar. The command adds the generated HDL source file to the list of
files to be compiled. The coder prints this command to the script once for each
generated HDL file. The default value of this property depends on the synthesis tool
specified by the HDLSynthTool
property. For
example, when HDLSynthTool
is set to 'Quartus'
,
this property defaults to 'set_global_assignment -name %s_FILE
"$src_dir/%s"\n'
. The first implicit argument is the
TargetLanguage
. The second implicit argument is the name of the
HDL file.
Dependencies
This property applies only when the EDAScriptGeneration
property is set to 'on'
and the
HDLSynthTool
property is
set to a value other than 'none'
.
HDLSynthTerm
— Termination section of synthesis script
character vector | string scalar
Termination section of synthesis script, specified as a character vector or a string
scalar. The coder prints this character sequence to the end of the synthesis script. The
default value depends on the synthesis tool specified by the HDLSynthTool
property. For
example, if you set HDLSynthTool
to 'Synplify'
,
this property defaults
to:
set_option -technology VIRTEX4\n set_option -part XC4VSX35\n set_option -synthesis_onoff_pragma 0\n set_option -frequency auto\n project -run synthesis\n
Dependencies
This property applies only when the EDAScriptGeneration
property is set to 'on'
and the
HDLSynthTool
property is
set to a value other than 'none'
.
Tips
If you use the function fdhdltool
to generate HDL code, you can set the
corresponding properties in the Generate HDL dialog box.
Property | Location in Dialog Box |
---|---|
Compilation script | EDA Tool Scripts tab, left pane.
(VHDLLibraryName property does not have a corresponding
option in the dialog box.) |
Simulation script | EDA Tool Scripts tab, left pane. To access simulation flags, see Test Bench > Configuration tab. |
Synthesis script | EDA Tool Scripts tab, left pane. |
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)