Synopsys VCS 编译时,启用debug选项

8 篇文章 6 订阅

如果你在使用VCS就行仿真工作的时候,对vcs命令提供的一大堆选项,感到困惑,一筹莫展的时候,别担心,记不住,就用vcs -help命令啊,或者查看VCS MX UG。

但是今天我要讲的困惑我很久的debug*系列选项,请看看这篇短短的博客吧!

如果想在仿真时,使用调试功能,不管后处理调试模式,还是交互式调试模式,首先都需要在编译或者elaboration的时候,使能debug功能。
VCS MX为调试模式提供以下编译选项:
-debug_pp,-debug,-debug_access(+ ), -debug_all,-debug_region =()(+ )

  • 在部分调试模式下elab设计
    vcs -debug [compile_options] TOP

  • 在完全调试模式下elab设计
    vcs -debug_all [compile_options] TOP

  • 用所需的调试功能来elab设计
    vcs -debug_access<+options> [compile_options] TOP

这其中-debug_access后可以跟一些特定的选项,其中也有pp和all,也就是说-debug_access+pp, -debug_access+all。

那么他们和-debug_pp, -debug_all有什么关系呢。
旧版本的VCS提供的-debug -debug_pp和 -debug_all编译命令更加易于使用,并在仿真运行时性能上进行权衡。但是,运行时性能是提高用户工作效率的关键。考虑到这一点,较新版本的VCS带有性能有效的调试方法。这其中“-debug_access”是从VCS 2014.03版本开始,为用户提供了一个新选项。与“-debug_access”配合使用,VCS 2015.09发行版提供了一个新选项“-debug_region”。
你可以在编译时使用-debug_access选项来更好地控制仿真中调试的功能。
与-debug_pp选项相比,-debug_access选项允许存储VPD和FSDB文件以进行后处理调试,并减少不必要的调试选项。
你可以使用-debug_access+指定其他选项,以有选择地启用所需的调试功能。 只启用所需的调试功能,即可优化仿真性能。所以所有的一切都在于精细化控制,提高仿真效率。尽量改用最新的优化的debug选项吧。

debug_access(+<option>)*

OptionDescription
rThe -debug_access+r option enables the read capability for the entire design.
wThe -debug_access+w option applies write (deposit) capability to the registers and variables for the entire design.
wnThe -debug_access+wn option applies write (deposit) capability to the nets for the entire design.
fThe -debug_access+f option enables the following: Write (deposit) capability on registers and variables.Force capability on registers, variables, and nets.This option is equivalent to -debug_access+w+fn
fnThe -debug_access+fn option applies force capability to the nets for the entire design.
fwnThe -debug_access+fwn option applies write (deposit) and force capability to all nets in the design.
lineThe -debug_access+line option enables line debugging. It allows you to use the commands for step/next and line breakpoints.This option is equivalent to -debug_access+pp -line
cbkThe -debug_access+cbk option enables PLI-based callbacks on static nets, registers, and variables.
cbkdThe -debug_access+cbkd option enables both dumping and PLI-based callbacks on dynamic nets, registers, and variables.
threadThe -debug_access+thread option enables the debugging of the SystemVerilog threads.
classThe -debug_access+class option is equivalent to the following command:-debug_access+r+w+thread+class+line+cbk+cbkd.The -debug_access+class option enables testbench debug capabilities.
nomemcbkThe -debug_access+nomemcbk option disables callbacks for memories and multidimensional arrays (MDAs). By default,-debug_access enables callbacks for memories and MDAs.
dmptfThe -debug_access+dmptf option enables dumping of task/function ports and internal nodes/memories for the entire design.
ppThe -debug_access+pp option is equivalent to the following command:-debug_access+w+cbk+drivers.The -debug_access+pp option enables debug capabilities equal to -debug_pp (except for no thread debugging and dumping of task/function signals, and does not apply capability inside cells and encrypted modules).
allThe -debug_access+all option is equivalent to the following commands:-debug_access+line+class+wn+driver+r+w+cbk+f+fn+thread+cbkd.The -debug_access+all option enables debug capabilities equal to -debug_all (except it does not apply capability inside cells and encrypted modules).
reportThe -debug_access+report option enables the reporting of the global debug capability diagnostics.

你可以与-debug_access配合使用-debug_region来控制debug的范围,从而进一步提高了运行时性能
-debug_region选项使你能够将调试功能应用于设计的所需部分[DUT,单元,TB和标准包(OVM,UVM和RAL)或加密实例(模块,程序,包和接口)]。
编译时必须和-debug_access选项一起使用-debug_region选项。 以下是-debug_region的语法:
-debug_access(+ <option>)* -debug_region =(<option>)(+ <option>)*

-debug_region支持的选项

OptionDescriptionDefault Functionality if -debug_region is not specified
libApplies debug capabilities to the cells inside libraries.Debug capability is not applied to the libraries.
cellApplies debug capabilities to the cells.Debug capability is not applied to the cells.
encryptApplies debug capabilities to the fully-encrypted instances (modules, programs, packages, and interfaces).Debug capability is not applied to the fully-encrypted
tbApplies debug capabilities only to the testbench, but does not apply debug capabilities to the standard packages. It does not apply debug capability to the standard packages. The VPD/FSDB dumping of the DUT is not affected by this option.Debug capability is applied to testbench and DUT.
dutApplies debug capabilities only to the non-testbench objects.Debug capability is applied to testbench and DUT.
stdpkgApplies debug capabilities to the standard packages. You must use the stdpkg option in combination with the tb option. VCS issues a warning message if you use -debug_region=stdpkg only. The -debug_region=tb+stdpkg option applies debug capabilities to both testbench and standard packages.Debug capability is applied to the standard packages.

举例如下:
-debug_access+class -debug_region=tb
仅将类调试功能应用于测试平台。 调试功能不适用于标准软件包
-debug_access+force -debug_region=dut
将force调试功能应用于DUT
-debug_access+class -debug_region=tb+stdpkg
将调试功能应用于TB和标准软件包

使用-debug_region而不使用-debug_access会导致错误, 但是-debug_access可以在没有-debug_region的情况下使用
-debug_access也可以缩写为-debug_acc

对于现有使用-debug_pp,-debug,-debug_all选项的用户,VCS推荐以下使用模型:

  • 用于后期处理调试模式(使用此代替-debug_pp)
    -debug_acc(用于Verdi后期处理调试,以及用于存储VPD)
    -debug_acc+r+drivers(用于使用“-simv -gui”命令打开Verdi)
    使用简单的-debug_access代替-debug_pp可以为Verdi的后处理调试提供更好的性能。

要使用’simv -gui’打开Verdi,你可以使用+ r选项和其他+drivers选项进行drivers跟踪。

  • 对于Interactive RTL调试(代替-debug)
    -debug_acc+pp -debug_region=dut(+pp选项启用读取,写入,交互式值更改断点和驱动调试 - 非常小的交互式调试功能)
    -debug_acc+pp+f -debug_region=dut(在上面添加+f使其等于-debug,在网络和寄存器上使能force/write权限,仅在DUT区域上)
    -debug_acc+pp+f+ line -debug_region=dut(对于行断点/仿真调试,如step / next)

这里,-debug_region通过仅在dut区域允许功能来提高性能,而-debug_access允许您在force和line之间选择调试功能。
与在整个设计(dut+tb)上启用-debug或-debug_all相比,这在性能方面非常有用。

  • 对于Testbench调试(代替-debug_all)
    -debug_acc+classdbg -debug_region=tb+stdpkg(包括UVM库的完整测试平台调试)
    -debug_acc+classdbg -debug_region=tb(用户testbench的调试)
    这里-debug_region通过仅在testbench区域允许功能来提高性能,同时允许你选择(用户测试平台与UVM库)调试。与在整个设计上启用-debug_all(dut+tb+ stdpkg)相比,这在性能方面非常有用。

  • 对于RTL / Test bench调试(代替-debug_all)
    -debug_acc+all(等于-debug_all,除了单元格和库单元调试)
    -debug_acc+all -debug_region=cell+lib(等于-debug_all,包括单元和库单元调试)
    这是一种优化的方法,可以启用除cell / lib单元之外的所有功能并提高性能。

-debug_access选项的其他好处:

所有新的项目,如Unified Debug使用模型,统一编译Verdi调试,UCLI中FSDB的统一纯储,使用-debug_access非常方便,无需额外的选项和设置。 Verification Compiler使用-debug_access作为主要调试选项,同时也支持较旧的-debug *选项。

  • 35
    点赞
  • 275
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值