vcs 使用--基本

1.Synopsys Verilog Compiler Simulator is a tool  from Synopsys specifically designed to simulate and debug designs. This tutorial basically describes how to use VCS, simulate a
verilog description of a design and learn  to debug the design. VCS also uses VirSim, which is a graphical user interface to VCS used for debugging and viewing the waveforms.

 

2.There are three main steps in debugging the design, which are as follows
 
1.  Compiling the Verilog/VHDL source code.
2.  Running the Simulation.
3.  Viewing and debugging the generated waveforms.

 

3.You can interactively do the above steps using the VCS tool. VCS first compiles the
verilog source code into object files, which are nothing but C source files. VCS can
compile the source code into the object files without generating assembly language files.
VCS then invokes a C compiler to create an executable file. We use this executable file to
simulate the design. You can use the command line to execute the binary file which
creates the waveform file, or you can use VirSim. 

 

Compiling and Simulating

1.  In the “vcs” directory,  compile the verilog source code by typing the following at the
machine prompt.  
 

[hkommuru@hafez vcs]$ vcs –f main_counter.f +v2k  
 
Please note that the –f option means the file specified (main_counter.f ) contains a list of 
command line options for vcs. In this case, the command line options are just a list of the 
verilog file names. Also note  that the testbench is listed first. The below command also 
will have same effect . 
 
 [hkommuru@hafez vcs]$ vcs –f  counter_tb.v counter.v  +v2k  
The +v2k option is used if you are using Verilog IEE 1364-2000 syntax; otherwise there 
is no need for the option. Please look at Figure 1 for output of compile command. 


By default the output of compilation would be a executable binary  file is named simv.
You can specify a different name with the -o compile-time option. VCS compiles the
source code on a module by module basis. You can incrementally compile your design
with VCS, since VCS compiles only the modules which have changed since the last
compilation.  


 2.  Now, execute the simv command line with no arguments. You should see the output
from both vcs and simulation and should produce a waveform file called counter.dump in
your working directory.

[hkommuru@hafez vcs]$simv 


 

VIRSIM TUTORIAL

3. We can now re-invoke vcs to view the waveform. At the unix prompt, type:

[hkommuru@hafez vcs]$ vcs –RPP counter.v 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值