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 comma-separated pairs of Name,Value arguments to the generatehdl function. Name is the property name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair 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

expand all

Enable script generation for EDA tools, specified as one of the following:

  • 'on' — The coder generates a compilation script for Mentor Graphics® 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.

See Integration with Third-Party EDA Tools.

Compilation Scripts

expand all

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'.

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.

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.

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.

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.

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.

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

expand all

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'.

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'.

Command written to simulation script, specified as 'vsim -novopt %s.%s\n', a character vector, or a string scalar. 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.

Dependencies

This property applies only when the EDAScriptGeneration and GenerateHDLTestBench properties are set to 'on'.

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'.

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

expand all

Generate script for synthesis tool, specified as one of the following.

HDLSynthTool ValueSynthesis Tool
'none'N/A. The coder does not generate a synthesis script.
'Vivado'

Xilinx® Vivado®

'ISE'Xilinx ISE
'Libero'

Microsemi® Libero®

'Precision'Mentor Graphics 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'.

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 ValueDefault HDLSynthFilePostfix Value
noneN/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'.

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
The implicit argument, %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'.

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'.

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.

PropertyLocation in Dialog Box
Compilation scriptEDA Tool Scripts tab, left pane. (VHDLLibraryName property does not have a corresponding option in the dialog box.)
Simulation scriptEDA Tool Scripts tab, left pane. To access simulation flags, see Test Bench > Configuration tab.
Synthesis scriptEDA Tool Scripts tab, left pane.