MTI Further

以前学习modelsim,就是仿真看看波形,高级的features基本上没用过,当然也不是很清楚有什么含义,经过一段时间的学习,基本上对几种波形也有所了解了。各大EDA公司都是有自己的格式,VCD是标准,FSDB是专利,只能在verdi下面看(verdi -ssf xx.fsdb)前仿,后仿都非常的有用。synopsys下面看vcs的波形就是用vpd(dve -vpd vcdplus.vpd &),如果是放到modelsim和cadence下面,格式就分别变成了wlf和shm。观看VCD文件有个比较好的开源工具,叫做gtkwave。除此之外都是各家通过vcd2wlf(mti),转化为自己的格式来查看波形。还需要说的是格式之间还是有优劣的,公认的是fsdb是最好的格式,因为压缩比大,这样在大型系统设计中,速度就会快很多。verdi中用来显示的波形的组件是nWave。

for shm: http://www.edaboard.com/thread28489.html 
for diff format: http://www.edaboard.com/thread98530.html

我所指的高级features也好说清楚,就是debug, code coverage, functional coverage。

真正的设计其实只是占比较少的部分,更重要的是通过各种各样的辅助来侦错。 这些高级应用就是这一方面。

-- code coverage(batch or GUI)

batch

vlog(or vcom) -cover bcst filename.v (b=branch, c=condition, s=statement and t=toggle. )

vsim -coverage TOP

run -all (必须是"-all") 

GUI 模式

OR, u can enable it using GUI. U go to Compile > Compile Options and select the Coverage tab.
Another option, u just right-click on ur design file at "Project" and choose "Properties". Now, u can see coverage tab.  

两种显示方式,text和html.

coverage report -html -htmldir covhtmlreport -threshL 50 -threshH 90 

coverage report -file C:/XXX/report.txt -byfile -assert -directive -cvg -codeAll 

在GUI下,这些操作都很简单。 

for code coverage:http://www.edaboard.com/thread89191.html 

-- functional coverage

Functional coverage 在Verification methodology里面经常是靠covergroup和coverpoint来完成的,也经常是在report_ph()来生成相应的coverage report。

所以,也就是针对不同的Verification methodology来做不同的functional coverage closure。

这里可能需要说的是modelsim和questasim的区别,有些帖子(ref,2009)会说questasim会支持更多的features来support functional verification。但这些差别可能有点早, wikipedia上的解释是说两者其实差不多,就是GUI和license上的区别(wiki_ref)。


--debug

MTI的debug功能是默认的,如果不需要的话,可以在vlog(vcom)编译的时候加入开关-nodebug。

在run -all 之后,可以通过对不同的对象加入时间轴cursor来track之间的关系,也可以show各个信号的drivers。

也可以restart之后设断点,做调试。 两个reference里面都没有讲到debug的keyboard shortcuts,对应关系如下:

F9:run, F10: run -continue, F11:run -step ,F12: run -over 

for debug: http://ece.gmu.edu/coursewebpages/ECE/ECE448/S11/tutorials/ModelSim_Simulation.pdf 

for debug: http://doc.union.edu/118/se_tutor.pdf 
 

原文地址:https://www.cnblogs.com/chenrui/p/2681088.html