该编码器将脚本生成脚本,作为代码和测试台生成过程的一部分。脚本文件在目标文件夹中生成。
当为过滤器生成HDL代码时,filt
,编码器写入以下脚本文件:
filt
_compile.do.
:导师图形®ModelSim®编译脚本。此脚本包含编译生成的过滤器代码的命令,但不是模拟它。
为过滤器生成测试台代码时filt
,编码器写入以下脚本文件:
filt
_tb_compile.do.
:导师图形模型主要编译脚本。此脚本包含编译生成的过滤器和测试台代码的命令。
filt
_tb_sim.do.do.
:导师图形模型主要仿真脚本。此脚本包含要运行生成的过滤器和测试台代码的模拟的命令。
您可以启用或禁用脚本生成并自定义生成的脚本文件的名称和内容:
将属性传递为'姓名',价值
arguments to thegeneratehdl
功能。看到HDL综合和工作流程自动化属性。
在“生成HDL”对话框中设置相应选项。选择EDA工具脚本tab, and click编译脚本orSimulation script从左列中的菜单。看到Customize Scripts for Compilation and Simulation。
A generated EDA script consists of three sections, which are generated and executed in the following order:
初始化(在里面
) phase. The在里面
phase performs required setup actions, such as creating a design library or a project file.
命令每文件阶段(cmd.
)。This phase of the script is called iteratively, once per generated HDL file.
终止阶段(术语
)。这个阶段的最终执行阶段script. One application of this phase is to execute a simulation of HDL code that was compiled in thecmd.
相。
编码器通过将格式字符向量传递给的编码器生成脚本FPRINGF.
功能。Using the UI options (orgeneratehdl
properties) summarized in the following sections, you can pass in customized format character vectors to the script generator. Some of these format character vectors take arguments, such as the top-level entity or module name.
您可以使用有效FPRINGF.
格式化字符。例如,'\n'
inserts a newline into the script file.
To view and set options in theEDA工具脚本对话框:
打开“生成HDL”对话框。
点击theEDA工具脚本标签。
该编译脚本选项组被选中,如图所示。
该生成EDA脚本选项控制脚本文件的生成。默认情况下,选择此选项,如前面的图像中所示。
If you want to disable script generation, clear this check box.
对话框左侧的列表允许您从几个类别中进行选择。选择一个类别并根据需要设置选项。类别是:
编译脚本:自定义脚本以编译生成的VHDL或Verilog代码。看到编译脚本选项。
Simulation script:customize scripts for HDL simulators. SeeSimulation Script Options。
综合脚本:为综合工具自定义脚本。看到第三方合成工具的自动化脚本。
每个部分的自定义字符向量传递给FPRINGF.
to write each section of the selected script. You can use format character vectors supported by theFPRINGF.
功能。Some of the character vectors include implicit arguments.
Option | 隐含参数 |
---|---|
编译初始化 | 图书馆名称 |
编译VHDL命令and编译Verilog命令 |
|
Compile termination | 没有隐含的论点 |
编译初始化 | 没有隐含的论点 |
模拟命令 |
|
Simulation termination | 没有隐含的论点 |
该图显示了编译脚本窗格,选项设置为其默认值。
编码器生成调用脚本firfilt_copy_compile.do
:
VLIB工作VCOM FIRFILT_COPY.VHD
firfilt_copy_tb_compile.do
VLIB工作VCOM FIRFILT_COPY.VHDvcom firfilt_copy_tb.vhd
设置模拟器标志用于编译脚本。您可以选择将模拟器标志插入生成的编译脚本中。此选项包含在标记脚本中,用于独立过滤器和测试台。例如,您可以指定编译器版本。要指定标志:
点击试验台在“生成HDL”对话框中。
输入兴趣的旗帜Simulator flagsfield. In the figure, the dialog box specifies that the导师图形模型主要模拟器使用-93
compiler option for compilation.
命令行替代:Specify simulator flags with thesimulatorflags.
property of thegeneratehdl
功能。
该coder generates a simulation script when you generate a test bench. The figure shows theSimulation script窗格,选项设置为其默认值。
编码器生成调用脚本firfilt_copy_tb_sim.do
:
onbreak简历简历的onerror VSIM -novopt work.firfilt_copy_tb附加波SIM:/ firfilt_copy_tb / u_firfilt_copy / CLK增加的Wave SIM:/ firfilt_copy_tb / u_firfilt_copy / clk_enable附加波SIM:/ firfilt_copy_tb / u_firfilt_copy /重置附加波SIM:/ firfilt_copy_tb / u_firfilt_copy / filter_in添加wave sim:/ firfilt_copy_tb / u_firfilt_copy / filter_out添加wave sim:/ firfilt_copy_tb / filter_out_ref运行-all
For information about synthesis script options, see第三方合成工具的自动化脚本。