您的位置:首页 > 其它

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

2011-09-30 14:51 253 查看
注意什么时候用后处理模式,什么时候用交互式模式? 在初步仿真时使用交互模式,若是调试一个很成熟的设计或者很多人一起做调试这时用后处理模式。后处理模式交互调试能力相对较差,但是通过记录的数据可以观察出其中异常的地方
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:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: