vcs rtl tool 简介

VCS RTL Verification

VCS 数字逻辑仿真器和VCS MX混合HDL语言仿真器都是Synopsys的智能RTL验证解决方案的基石。VCS是业界领先的仿真器,支持本征断言(native assertion)描述、自动测试平台生成技术(testbench)、以及代码和断言覆盖引擎,确保智能化验证的实现。VCS中本征代码支持 (Native)技术确保了设计验证的效率、性能和质量,并缩短了验证周期。VCS中的本征代码技术实现了在单一工具中,支持可验证性设计(DFV),及 覆盖率驱动和约束的随机激励生成。其本征对断言的支持和所包含的丰富的断言检查工具库保证了设计人员能够方便地采用DFV技术来查找错误和提高验证质量。 此外,断言可以作为设计要求重复利用,在Synopsys的混合RTL规则验证产品Magellan中进行形式验证。
VCS对专用集成电路(ASIC)生产商的建模和仿真签核(Sign-off)提供了支持。
VCS对统一的设计和验证语言标准SystemVerilog提供支持。SystemVerilog增强了设计人员的能力,加快了验证速度并提高了验证的质量。
对于要求在RTL环境中使用SystemC模型进行验证的设计团队,VCS提供了支持OSCI SystemC的直接内核接口(DKI)和支持System Studio的直接内核接口(DKI)。

主要优点:
  • 本征测试平台(testbench)、断言和完备的覆盖率测试技术,为Verilog 和混合HDL验证带来2-5倍的性能提升
  • 为SystemVerilog设计和基于断言的验证提供支持,确保更高的设计和验证效率
  • 提供最高的性能和容量,加快产品上市周期
  • 通过集成NanoSim实现了具有最高处理能力的混合信号仿真环境
  • 采用单个统一工具,实现Verilog和混合HDL RTL及SystemC的支持
  • 支持所有主要的UNIX和Linux平台
 

VCS快速参考

1. Unix环境设置:

C-Shell
setenv VCS_HOME /usr/synopsys/vcs
if (-e ${VCS_HOME}/bin/environ.csh) then
    source ${VCS_HOME}/bin/environ.csh
endif
 
Bourne-shell/Korn-shell
VCS_HOME=/usr/synopsys/vcs
export VCS_HOME
. ${VCS_HOME}/bin/environ.sh
 

2. 执行仿真:

 
# show_setup: display settings frome synopsys_sim.setup
 
# vlogan: 分析Verilog源文件,解析模块中的各个reference
    vlogan [options] verilog_files
    Options are as follows:
verilog_source_file
is the name of the Verilog source file to be analyzed
+define+macro
defines any macros needed for ‘ifdef conditions defined in the
Verilog source.
-f filename
Reads a file, filename, and passes all arguments from that file on
to the vlogan command line.
-l logfile
Redirects all output from vlogan into the specified logfile.
-q
Disables verbose messaging.
-v library_file
Searches for unresolved module references in file library_file
-y search_dir
Searches for unresolved module references in the directory
search_dir
+libext+ext
Uses the extension ext when searching library directories
-work logical_library
Specifies the VHDL logical library to place the Verilog modules
into. Any VHDL source that instances this Verilog code can
reference this VHDL library to find the module.
-resolve
By default, vlogan does not resolve instantiated VHDL design
units. This option tells vlogan to resolve VHDL design units as
well. If this option is not used, any VHDL design units are
resolved during compilation.
-sverilog
Enables the analysis of SystemVerilog source code
+vhdllib+libs
Search libraries for VHDL components in case they were
analyzed in library other than “WORK”.(use with -resolve)
+reflib+libs
Search libraries for Verilog components in case they were
analyzed in library other than “WORK”. (use with -resolve).
+librescan
Search from beginning of library list for all undefined Verilog
modules.
+notimingchecks
Specifies no timing simulation (used for parsing only)
+nospecify
Specifies no path delays (used for parsing only)
 
# vcs: 编译设计并生成仿真可执行文件,默认叫做simv
    vcs <source_files> [libname.]design_unit  [options]
    Options are as follows: 
+v2k
Enables the use of new Verilog constricts in the 1364-2001
standard.
-full64
Compiles the design in 64 bit mode and creates a 64 bit
executable for simulating in 64 bit mode.
-cm_libs yv|celldefine
Specifies compiling for coverage source files in Verilog libraries
when you include the yv argument. Specifies compiling for
coverage module definitions that are under the ‘celldefine
compiler directive when you include the celldefine argument.
You can specify both arguments using the plus (+) delimiter.
+cli+[module_name=]1|2|3|4
Enable CLI debugging.
1 enables you to see the values of nets and registers and deposit
values to registers.
2 also enables breakpoints on value changes of nets and registers.
3 also enables you to force a value on nets.
4 also enables you to force a value on a register.
You can specify a module to enable CLI debugging only for
instances of the module.
-line
Enables stepping through the code and source line breakpoints in
DVE.
+vpi
    Enables the use of VPI PLI access routines.
-sverilog
    Enables the analysis of SystemVerilog source code
-ntb_opts keyword_argument
The keyword arguments are as follows:
check
Reports error, during compilation or simulation, when there is
an out-of-bound or illegal array access.
dep_check
Enables dependency analysis and incremental compilation.
Detects files with circular dependencies and issues an error
message when VCS cannot determine which file to compile
first.
no_file_by_file_pp
By default, VCS does file by file preprocessing on each input
file, feeding the concatenated result to the parser. This
argument disables this behavior.
print_deps[=filename]
Enter this argument with the dep_check argument. This
argument tells VCS to display the dependencies for the source
files on the screen or in the file that you specify.
tb_timescale=value
Specifies an overriding timescale for the testbench. The
timescale is in the Verilog format (for example,
10ns/10ns).
use_sigprop
Enables the signal property access functions. (for example,
vera_get_ifc_name()).
vera_portname
Specifies the following:
The Vera shell module name is named vera_shell.
The interface ports are named ifc_signal.
Bind signals are named, for example, as: \if_signal[3:0].
You can enter more than one keyword argument, using the +
delimiter, for example:
-ntb_opts use_sigprop+vera_portname
+nospecify
    Specifies no path delays (used for parsing only)
-override_timescale=time_unit/time_precision
Overrides the time unit and a precision unit for all the
‘timescale compiler directives in the source code and,
like the -timescale option, provides a timescale for all
module definitions that precede the first ‘timescale
compiler directive. Do not include spaces when specifying
the arguments to this option.
-assert keyword_argument
The keyword arguments are as follows:
dumpoff
Disables the dumping of SVA information in the VPD file
during simulation.
filter
Blocks reporting of trivial implication successes. These
happen when an implication construct registers a success only
because the precondition (antecedent) portion is false (and so
the consequence portion is not checked). With this option,
reporting only shows successes in which the whole expression
matched.
finish_maxfail=N
Terminates the simulation if the number of failures for any
assertion reaches Nmust be supplied, otherwise no limit is
set.
global_finish_maxfail=N
Stops the simulation when the total number of failures, from
all SystemVerilog assertions, reaches N.
maxcover=N
Disables the collection of coverage information for cover
statements after the cover statements are covered number of
times. Nmust be a positive integer, it can’t be 0.
+incdir+directory+
Specifies the directories that contain the files you specified with
the ‘include compiler directive. You can specify more that one
directory, separating each path name with the “+” character.
-y directory_pathname
Specifies a Verilog library directory to search for module
definitions.
+define+macro_name=value+
Defines a text macro. Test for this definition in your Verilog
source code using the ‘ifdef compiler directive.
-cm line|cond|fsm|tgl|path
Specifies compiling for the specified type or types of coverage.
The arguments specifies the types of coverage:
line
Compile for line or statement coverage.
cond
Compile for condition coverage.
fsm
Compile for FSM coverage.
tgl
Compile for toggle coverage.
path
Compile for path coverage.
-cm_noconst
Tells VCS not to monitor for conditions that can never be met or
lines that can never execute because a signal is permanently at a 1
0r 0 value.
-cm_cond arguments
Modifies condition coverage as specified by the argument or
arguments:
basic
Only logical conditions and no multiple conditions.
std
The default: only logical, multiple, sensitized conditions.
full
Logical and non-logical, multiple conditions, no sensitized
conditions.
allops
Logical and non-logical conditions.
event
Signals in event controls in the sensitivity list position are
conditions.
anywidth
Enables conditions that need more than 32 bits.
sop
Specifies condition SOP coverage. It also tells VCS that when
it reads conditional expressions that contain the ^ bitwise
XOR and ~^ bitwise XNOR operators, it reduces the
expression to negation and logical AND or OR.
for
Enables conditions in for loops.
tf
Enables conditions in user defined tasks and functions.
You can specify more than one argument. If you do use the + plus
delimiter between arguments, for example:
-cm_cond basic+allops
-cm_tgl mda 
Enables toggle coverage for Verilog 2001 multidimensional
arrays and SystemVerilog unpacked arrays. Not requires for
packed SystemVerilog arrays. 
-P pli.tab
    Specifies a PLI table file. 
+libext+extension
Specifies that VCS only search the source files in a Verilog
library directory with the specified extension. You can specify
more than one extension, separating each extension with the “+”
character. For example, +libext++.v specifies searches library 
files with no extension and library files with the .v extension.
Enter this option when you enter the -y option. 
-v filename
    Specifies a Verilog library file to search for module definitions.         
 
# simv: 启动一个simulation session.
    simv [options]
    Options are as follows:
-cm line|cond|fsm|tgl|path|assert
Specifies monitoring for the specified type or types of coverage.
The arguments specifies the types of coverage:
line
Monitor for line or statement coverage.
cond
Monitor for condition coverage.
fsm
Monitor for FSM coverage.
tgl
Monitor for toggle coverage.
path
Monitor for path coverage.
branch
Monitor for branch coverage.
assert
Monitor for SystemVerilog assertion coverage.
If you want VCS to monitor for more than one type of coverage,
use the plus (+) character as a delimiter between arguments, for
example:
-cm line+cond+fsm+tgl
-cm_name filename
    Specifies the name of the report files.
 
一个例子:
vcs  +v2k  -full64  -cm_libs yv  +cli + 3  -line  +vpi  -sverilog  -ntb_opts dtm \
     -notimingchecks  +nospecify  -override_timescale = 1ns / 10ps \
     -assert vpiSeqFail  -assert enable_diag  +define +ASSERT_ON \
     +incdir + /home /tools_new /synopsys /VCS -D - 2010. 06_AMD64 /packages /sva + 
     -/home /tools_new /synopsys /VCS -D - 2010. 06_AMD64 /packages /sva \
     +define +DEBUG_OPTION  +define +MAX_ERR_NUM = 10000   -cm_noconst    -cm_cond full  -cm_tgl portsonly \
    -/home /tools_new /novas /Novas2010_verdi /share /PLI /vcs2006. 06 /LINUX64 /debussy.tab \ 
        /home /tools_new /novas /Novas2010_verdi /share /PLI /vcs2006. 06 /LINUX64 /pli.a \
     +libext +.v +  
    +
incdir + ~ /project /Berry /vmodel /common /rtl + ~ /project /Berry /vmodel /common /tb + ~ /project /Berry /vmodel /vdu /tb ~ /project /Berry_gen /vmodel /vdu /tb + \   
-
~ /project /Berry /vmodel /common /rtl 
-~ /project /Berry /vmodel /common /tb 
-~ /project /Berry /vmodel /vdu /rtl 
-~ /project /Berry /vmodel /vdu /tb 
-~ /project /Berry_gen /vmodel /vdu /tb 
-~ /project /Berry /vmodel /mbist /rtl \
-/home /tools_old /Misc /Xilinx /ISE_DS /ISE /verilog /src /unisims \
-/home /TSMC /TSMC -CL013G /SC_metro_fb_060907 /aci /sc -m /verilog /tsmc13_m.v \
    /home /tools_old /Misc /Xilinx /ISE_DS /ISE /verilog /src /glbl.v 
   ~ /project /Berry /vmodel /vdu /tc /vdu_unit_960h_03.v 
-file  ~ /project /Berry /vmodel /vdu /scripts /vcs_option

## file: vcs_option
-CFLAGS "-g -ggdb -daH -I$$VCS_HOME/include -I$APL_SRC/vmodel/vdu/tb -I$APL_SRC/cmodel/vdu "
$APL_SRC/vmodel/vdu/tb/vdu_dpi.c
$APL_SRC/cmodel/vdu/blz_vdu_glbvar.c
...
 
simv  +tc =vdu_unit_960h_03  +seed = 20060407  +notimingcheck  +dumpon = 1  +dumpend = - 1  +dumpbgn = 0  +dumpmodule =all  +noclkgate = 0 +gate = 0  -assert report =sva.rpt  -assert quiet  0  -assert nopostproc  -cm_name vdu_unit_960h_03_20060407 -cm   -cm_noconst   | tee vcs_sim.log
 
 

3. PLI Table的格式:

    # 每行内容如下格式:
       $name PLI_specifications [ACC_capabilities]
   其中:
       $name                 用户定义的系统任务或系统函数
       PLI_specifications    指定运行时,VCS调用的C函数
       ACC_capabilities      需要加入,移除或在不同hierarchy间改变的ACC功能   
 
    # PLI指定:
 格式如下:
   call=function
   check=function
   misc=function
   data=integer
   size=number
   args=
   nocelldefinepli
   persistent
 
     # ACC功能:
   acc=(+=)|-=|:=capibities:module_name[+]|%CELL|%TASK|*
     其中:
         acc              关键字
      =(+=)|-=|:=      add/remove/change
      capibilities     冒号分隔
   PLI函数可用的ACC功能:
       r/read
       rw/read_write
       cbk/call_back
       ...
# VCS配置文件
   可用来指定对设计的每个部分采用Radiant technology optimization 和 two state simulation.
   文件语法如下:
   module
   {list_of_module_identifiers} {list_of_attributes};
   instance
   {list_of_module_identifiers} {list_of_attributes};
   tree [(depth)]
   {list_of_module_identifiers} {list_of_attributes};
  
   Radiant technology的属性:
   noOpt
   noPortOpt
   Opt
   PortOpt
  
   two state simulation的属性:
   2value
   4value
 

4. SCL和CLI命令:

    # 仿真控制语言 SCL(Simulation Control Language):
      查看命令用法
        > help -verbose command_name
        或:
        > command_name -help
      VCSMX中SCL是Tcl,包含了一些VCS MX专用的命令和变量。列举如下:
         alias name definition
         apropos ...
         ...
    # 命令行接口 CLI(Command Line Interface)
       . (period)        继续仿真
       ?                 显示CLI命令简单描述
       always #relative_time | [@posedge|@negedge]
       break #...
       ...

5. Post Processing功能:

      # vpd2vcd: 转换VPD输出到VCD输出
          vpd2vcd [options] vpd_file [vcd_file]
      # vcdiff: 比较两个VCD文件
          vcdiff vcd_file1 vcd_file2 [options]
 
 
 

*附-关于VCS Basic

VCS初级版不包括以下功能:

1.  Testbench technology: SystemVerilog/OpenVera
2.  Assertion technology: SystemVerilog/OpenVera
3.  Coverage technology: code coverage(Coverage Metrics) / functional coverage(TB/Assertion)
4. Mixed signal simulation with NanoSim
如果设计源代码包含testbench/aasertion内容,VCS Basic报错并停止编译。
 
比如:
~ 用来报告OpenVera的assertions coverage的fcovReport功能,在VCS Basic中不被支持。
~ 用来报告SystemVerilog的assertions coverage的 assertCovReport功能,不支持。
~ 用来显示code coverage结果与打印报告的 cmView功能,不支持。
 

关于Licensing

    VCS Basic需要与VCS不同的license.
 

禁用的Compile-Time选项

    # SystemVerilog Assertion内容:-sverilog用于使能SystemVerilog内容,但是如果用于使能assertions内容就会报错。
            -assert  -sv_pragma
    # Coverage Metrics:
            -cm   -cm_cond  -cm...
    # Mixed Signal Simulation
            +ad

禁用的Run-Time选项

    # SystemVerilog Assertion内容:
            -assert    -cm assert    -cm_assert_dir
    # Coverage Metrics
            -cm     -cm_dir   ...
 
  • 2
    点赞
  • 38
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值