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:
本文档介绍了如何使用VCS进行基本操作,包括环境变量设置、编译命令、运行模拟以及在后处理模式下打开新窗口进行波形查看。通过设置-RPP选项进入后处理模式,可以方便地调整波形窗口的时间尺度和精度,实现模拟结果的深入分析。
3420

被折叠的 条评论
为什么被折叠?



