与第三方EDA工具集成

生成默认脚本

该编码器将脚本生成脚本,作为代码和测试台生成过程的一部分。脚本文件在目标文件夹中生成。

当为过滤器生成HDL代码时,filt,编码器写入以下脚本文件:

  • filt_compile.do.导师图形®ModelSim®编译脚本。此脚本包含编译生成的过滤器代码的命令,但不是模拟它。

为过滤器生成测试台代码时filt,编码器写入以下脚本文件:

  • filt_tb_compile.do.导师图形模型主要编译脚本。此脚本包含编译生成的过滤器和测试台代码的命令。

  • filt_tb_sim.do.do.导师图形模型主要仿真脚本。此脚本包含要运行生成的过滤器和测试台代码的模拟的命令。

您可以启用或禁用脚本生成并自定义生成的脚本文件的名称和内容:

Structure of Generated Script Files

A generated EDA script consists of three sections, which are generated and executed in the following order:

  1. 初始化(在里面) phase. The在里面phase performs required setup actions, such as creating a design library or a project file.

  2. 命令每文件阶段(cmd.)。This phase of the script is called iteratively, once per generated HDL file.

  3. 终止阶段(术语)。这个阶段的最终执行阶段script. One application of this phase is to execute a simulation of HDL code that was compiled in thecmd.相。

编码器通过将格式字符向量传递给的编码器生成脚本FPRINGF.功能。Using the UI options (orgeneratehdlproperties) 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.

Customize Scripts for Compilation and Simulation

To view and set options in theEDA工具脚本对话框:

  1. 打开“生成HDL”对话框。

  2. 点击theEDA工具脚本标签。

    编译脚本选项组被选中,如图所示。

  3. 生成EDA脚本选项控制脚本文件的生成。默认情况下,选择此选项,如前面的图像中所示。

    If you want to disable script generation, clear this check box.

  4. 对话框左侧的列表允许您从几个类别中进行选择。选择一个类别并根据需要设置选项。类别是:

  5. 每个部分的自定义字符向量传递给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命令
    • Contents of theSimulator flags选项(空字符向量,'', 默认)

    • 文件名的当前模块

    Compile termination 没有隐含的论点
    编译初始化 没有隐含的论点
    模拟命令
    • 图书馆名称

    • Top-level module or entity name

    Simulation termination 没有隐含的论点

编译脚本选项

该图显示了编译脚本窗格,选项设置为其默认值。

编码器生成调用脚本firfilt_copy_compile.do

VLIB工作VCOM FIRFILT_COPY.VHD
If you generate a test bench for your filter, the coder also generates a script calledfirfilt_copy_tb_compile.do
VLIB工作VCOM FIRFILT_COPY.VHDvcom firfilt_copy_tb.vhd

设置模拟器标志用于编译脚本。您可以选择将模拟器标志插入生成的编译脚本中。此选项包含在标记脚本中,用于独立过滤器和测试台。例如,您可以指定编译器版本。要指定标志:

  1. 点击试验台在“生成HDL”对话框中。

  2. 输入兴趣的旗帜Simulator flagsfield. In the figure, the dialog box specifies that the导师图形模型主要模拟器使用-93compiler option for compilation.

命令行替代:Specify simulator flags with thesimulatorflags.property of thegeneratehdl功能。

Simulation Script Options

该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第三方合成工具的自动化脚本