使用vcs基本步骤-后处理模式

本文档介绍了如何使用VCS进行基本操作,包括环境变量设置、编译命令、运行模拟以及在后处理模式下打开新窗口进行波形查看。通过设置-RPP选项进入后处理模式,可以方便地调整波形窗口的时间尺度和精度,实现模拟结果的深入分析。
注意什么时候用后处理模式,什么时候用交互式模式? 在初步仿真时使用交互模式,若是调试一个很成熟的设计或者很多人一起做调试这时用后处理模式。后处理模式交互调试能力相对较差,但是通过记录的数据可以观察出其中异常的地方
VCS (Verilog Compiler Simulator) is a tool suite from Synopsys. It includes VirSim, a 
graphical user interface to VCS for debugging and viewing waveforms. 
  
The methodology of debugging your project design involves three steps: 
 
1) Compiling your verilog source code, 
2) Running the simulation, and 
3) Viewing the generated waveforms. 


1.Initial Setup

The VCS package is installed at  /apps/synopsys/A-2008.09/bin. For convenience, set the following environment variables to your .cshrc file. Remember that anytime you changed/modified  .cshrc file, you must source it (by command
“source .cshrc”) or by logging-out and then logging back in.

Create a directory where you want to do the tutorial and create the following three text 
files named count.v, test_count.v, and main_count.f in that directory. Listings 
of count.v and test_count.v are at the end of this tutorial. The main_count.f 
file has only 1 line as shown below: 


test_count.v count.v
 

2.

 Change to test directory that contains  count.v,  test_count.v, and 
main_count.f (in this tutorial it is tutorial) 


3.

Compile the verilog source code by typing the following at the machine prompt:

vcs +v2k -f main_count.f

+v2k
Enables language features in the IEEE 1364-2001 standard. 


 

The  -f option means that the file specified (main_count.f) contains a list of 
command line options for vcs. In this case, the command-line options are just a 
list of file names and note that the testbench is listed first. The following command 
line would have the same effect: 

vcs +v2k test_count.v count.v

4.

Execute  simv on the command line with no arguments. You should  see output 
from both  vcs and the simulation and it should produce a waveform file called 
count.dump in your working directory. 

./simv

 

5.

We are now going to re-invoke vcs to view the waveform. At the prompt, type: 

vcs -RPP count.v

The -RPP option tells vcs that we are opening it in post-processing mode. This
should open up a new window as below:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6.

In this window, click on open under the File menu option. Change the file type that 
you want to open to VCD (not VCD+). (VCD has .dump file extension and VCD+ has 
.vcd file extension). They are both waveform files but VCD files are text files, and 
VCD+ are condensed binary files. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7.

Select and open the file count.dump and then click OK (also click O.K. on the 
information pop-up screen). Click on the test_count button, and you should see 
all signals instantiated in the signal window: clock, dec, in[3:0], load, and 
zero.


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8.Click on New Waveform Window to open a waveform window as below:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9.

In the Hierarchy window, highlight all signals in the signal list with the left mouse 
button. Then with the middle mouse button, drag the selected signals over to the 
black space in the waveform window.  At this point, you should see the waveforms 
starting at time 0 of the simulation.  

10.In the waveform window, the menu option Display -> Time Scale can be used to
change the display unit and the display precision. You can also use Zoom on the
menu to change the appearance as shown below:



 


 

 

 

 

 

 

 

 




 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值