Xcelium XRUN用户手册

Xcelium XRUN User Guide
Product Version 22.09
September 2022
Document Last Updated: May 2022
Contents
1 Overview
1.1 How xrun Works
1.2 File Type Support
1.3 Recompilation and Re-Elaboration
1.3.1 Debugging Recompilation and Re-Elaboration
1.4 Displaying and Replaying the xrun History
1.4.1 Saving the xrun History
1.4.2 Disabling the xrun History
1.5 IP Protection
1.6 Running xrun in Prep Mode
1.7 Support for Compressed Files
2 Getting Help on XRUN
2.1 Getting Help on Tool Messages
2.2 Getting Help on Command-Line Options
2.2.1 Checking for Compatible Options Using the xrun Command
2.2.2 Available xrun Help Options
2.2.3 Using the Online Help
3 The XRUN Command
3.1 Command Syntax
3.2 Managing Your xrun Command
3.2.1 Using the XRUNOPTS hdl.var Variable
3.2.2 Using an Arguments File
3.3 Input Files
3.3.1 Specman Input Files
3.3.2 Custom File Extensions for Input Files
3.4 Command-Line Options
3.4.1 Executable Options Not Defined in xrun
3.4.2 Command-Line Options Specific to xrun
3.4.3 -roelab
3.4.4 -rwelab
3.4.5 Supported Datatypes
3.4.6 IXCOM Command-Line Options
3.4.7 OVM Command-Line Options
3.4.8 Specman Command-Line Options
3.4.9 UVM Command-Line Options
3.5 Example xrun Commands
4 Customizing XRUN
4.1 Changing the Default Set of File Extensions
4.2 Changing the Name of the xcelium.d Directory
4.3 Changing the Path to the xcelium.d Directory
4.4 Changing the Name of the Work Library
4.5 Compiling into Multiple Libraries
4.5.1 Specifying the Source Files to be Compiled
4.5.2 Specifying the Library
4.5.3 Precompiling Files and Referencing the Library
4.5.4 Precompiling a Read-Only Library for Elaboration
4.5.5 Enabling Parallel MAKELIB Compilation
4.5.6 Using Other Options Within a MAKELIB Collection
4.5.7 Examples
4.6 Specifying a Snapshot Name
4.7 Changing the Storage Location of Scratch Area Files
4.8 Compiling Source Files with Specific Options
4.9 Specifying Enhanced Recompilation
4.10 Customizing Crash Reports
4.10.1 Specifying a Runtime Debugger
4.10.2 Crash Trend Reporting
4.10.3 Reporting Additional Crash Data
4.10.4 Customizing the Crash Report Name
4.11 Changing the Severity of Messages
4.11.1 Using a Control File to Change the Severity Level
5 Compatibility with Existing Use Models
5.1 XMVerilog
5.2 Compatibility with xmverilog for Mixed-Language
5.3 Multi-Step Mode Simulation
5.4 SystemVerilog
5.5 Verilog and VHDL AMS
5.6 Specman
5.6.1 Verilog Example
5.6.2 VHDL Example
5.6.3 Mixed-Language Example
5.7 C and C++ Files
5.7.1 SystemC
5.7.2 PLI/VPI/VHPI/CIF
5.7.3 DPI
5.7.4 Example
5.8 Xcelium HDL Analysis (HAL)
5.9 Debugging HDL and e Code
6 Multi-Core Lite
6.1 Supported Platforms
6.2 Licensing
6.3 Specifying Multi-Core Lite on the Command Line
6.4 Debugging Multi-Core Lite
7 Library Management
7.1 The -v and -y Library Management Scheme
7.1.1 Using Library Files
7.1.2 Using Library Directories
7.1.3 Compiling -v and -y Modules into a Single Library
7.1.4 Checking the Syntax of Library Files
7.1.5 File Extensions in Library Directories
7.1.6 Library Scan Precedence
7.2 Support for Compilation Units in Library Files
7.2.1 Protecting Compilation Unit Scope Elements

Overview综述

通过在单个命令行上指定所有输入文件和命令行选项,xrun实用程序允许您使用单核或多核引擎运行Xcelium模拟器。通过单核引擎,此实用程序简化了调用过程,允许您使用一个工具进行仿真,而不是单独执行多个工具来拼凑一个快照,然后可以使用xmsim手动仿真该快照。
xrun从不同的仿真语言获取文件,如Verilog、SystemVerilog、VHDL、Verilog AMS、VHDL AMS、Specman e,以及用通用编程语言(如C和c++)编写的文件,并使用适当的编译器对它们进行编译。编译完输入文件后,xrun自动调用xmelab来精细设计,然后自动调用xmsim模拟器。
使用xrun的最基本方法是在命令行上列出将组成仿真的文件,以及xrun将传递给适当的编译器、精化器和模拟器的所有命令行选项。例如:
% xrun -ieee1364 -v93 -access +r -gui verify.e top.v middle.vhd sub.v

在这个实例中:

  • 文件top.v和sub.v被识别为Verilog文件,并由Verilog解析器xmvlog编译。将-ieee1364选项传递给xmvlog编译器。
  • 文件middle.vhd被识别为VHDL文件,由VHDL解析器xmvhdl编译。-v93选项被传递给xmvhdl编译器。
  • 文件verify.e被识别为Specman e文件,并使用sn_compile.sh进行编译。
  • 编译文件之后,然后xrun调用xmelab来详细设计。-access选项被传递给精细器以提供对仿真对象的读访问。
  • 精细器生成仿真快照后,将使用SimVision和Specview图形用户界面调用xmsim。
    使用xrun帮助系统获取与工具相关的命令行选项的信息。在Getting Help on XRUN上获取帮助选项。
    有两个选项对于获取工具特定选项的信息特别有用:-helpshowsubject,它显示可执行文件列表和其他可用帮助的主题,以及-helpsubject,它显示选定主题的选项列表。例如:
% xrun -helpshowsubject
...
Arguments for -helpsubject
xmvlog
xmvhdl
xmelab
xmsim
sn_compile.sh
xmsc_run
hal
formalbuild
formalverifier
amsspice
xrun
...
...
% xrun -helpsubject xmvlog
Options for requested subject: xmvlog
...
-allowredefinition Allow multiple files to define the same object
-ams Enable Verilog-AMS compilation
-assert Enable PSL language features
-assert_vlog Enable PSL language features
-cbnoforwardclockingevent Disable forward reference for clocking events
-cd_lexpragma Process preprocessor directive before lex pragmas
-cds_implicit_tmpdir Specify location for design data storage
...

除了特定于工具的选项外,还可以包括修改xrun实用程序行为的选项。xrun相关选项在The XRUN Command中描述。

1.1 xrun如何工作

本节总结xrun的工作方式以及默认情况下的情况
当你第一次使用xrun命令运行仿真器时,它:
1.创建一个名为xcelium.d的临时目录。
2.在xcelium.d目录下创建一个临时子目录称为:
run.<platform | platform.64>.<xrun_version>.d
例如:
run.lnx86.17.04.d/
xrun在这个子目录下创建文件和目录,以支持工具操作。为了方便起见,创建一个名为run.d的符号链接,指向这个xrun 临时子目录。
3.解析命令行。
4.为命令行中指定的每个文件调用适当的编译器。

  • 在HDL设计文件中包含的设计单元被编译到工作库xcelium.d/worklib中。
  • 在-y库或-v库文件中指定的Verilog设计单元被编译成具有相同名称的库。这些库存储在run.d/xllibs的子目录中。
  • Specman e编译器sn_compile.sh的输出存储在run.d目录下的子目录中。
    例如,以下命令编译top.v到工作库(xcelium.d/worklib)。在./libs中的设计单元被编译到称为(xcelium.d/run.d/xllibs/libs)库中。在./models中的设计单元被编译为称为(xcelium.d/run.d/xllibs/models)的库中。
    % xrun top.v -y ./libs -y ./models +libext+.v
    注意: 当使用-y选项时,在Verilog代码实例中请求的模块名称必须与在源目录中找到的文件名相同。使用-libext列出的文件扩展名也必须相同。如果< module_name >.不相同,则该工具将无法读取包含该定义的文件。
  1. 调用elaborator (xmelab) 精细设计,且生成一个仿真快照。
  2. 调用simulator (xmsim)仿真快照。
    所有工具的输出都写入一个名为xrun.log的公共日志文件,该文件位于调用xrun的目录中。使用-l选项可以修改日志文件的名称。例如:
    % xrun -l run1.log ...
    要从xrun.log文件重定向某些可执行文件的输出,例如hal或xmsim,请参阅-log_*command-line options。

1.2 支持的文件类型

在xrun命令行中可以指定以下文件类型:

  • Verilog
  • SystemVerilog
  • VHDL
  • Specman e
  • Specman e-library
  • Verilog AMS
  • VHDL AMS
  • C or C++ or SystemC
  • Compiled object files (.o), compiled archives (.a), and dynamic libraries (.so, .sl)
  • SPICE files
    xrun命令行界面得到了增强,可以使用IXCOM工具编译仿真加速的设计。这个界面类似于xrun使用Xcelium Single Core仿真器编译设计的模型。

1.3 重新编译和重新精细

当再次调用xrun时(也就是说使用现存的xcelium.d临时目录),工具自动确定是否有任何更改需要重新编译然后重新精细,或者设计快照只需要重新精细。
默认情况下,xrun使用安全的重新编译策略,它检查时间戳和快照信息,以确定何时应该再次运行编译和精细。您不需要指定命令行选项来使用默认流。
或者,您可以指定一种增强的重新编译策略,它可以提供比默认流更好的性能。这个增强的流要求在xrun命令行中包含-fast_recompilation选项。有关增强重新编译的详细信息,请参见指定Specifying Enhanced Recompilation。
对于默认或增强流,xrun将直接进行仿真如果:

  • 自上次编译输入文件以来,输入文件的内容没有更改。这包括-f或-f参数文件、Verilog -v库文件和-y目录,以及任何’ include文件的内容。
  • 命令行中输入文件的顺序是相同的,包括Verilog -v库文件和-y目录的顺序。
  • 命令行选项是相同的,或者,如果它们不同,所做的更改不会影响不同语言编译器或xmelab的输出。
    例如,一些选项,如+gui和-s,只影响运行时行为。从命令行添加或删除它们不会导致重新编译或重新精细。但是,添加、删除或更改其他可能影响编译或精细的选项(例如,删除-notimingchecks选项或更改-access +r为-access +rw)将强制重新编译或精细。
  • 4
    点赞
  • 46
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值