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 


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用\[1\]:vcs的脚本写法可以帮助快递进行仿真得到波形文件。其中.PHONY可以指定对应哪些关键词进行make操作。\[1\]在这个脚本中,使用了-v2k选项来指定使用SystemVerilog语法,-timescale选项来指定时间刻度,-debug_all选项来生成调试信息,-o选项来指定输出文件名,-l选项来指定编译日志文件名,-f选项来指定包含Verilog文件的文件列表。\[1\]另外,还定义了几个目标,如vcs、sim、dve和clean,分别对应不同的操作。\[1\]引用\[2\]:采用的是全加器的官方教程,首先介绍不使用脚本的执行过程。\[2\]在这个例子中,使用了-v2k选项来指定使用SystemVerilog语法,-debug_all选项来生成调试信息,-timescale选项来指定时间刻度,-l选项来指定编译日志文件名。\[2\]引用\[3\]:这是一个仿真代码的例子,用于测试DFF_EXP模块。\[3\]在这个例子中,定义了输入输出端口和一些寄存器和线路。\[3\]问题中提到的-vcs -incdir命令是用来指定包含目录的选项,可以用于指定包含Verilog文件时的搜索路径。 #### 引用[.reference_title] - *1* *2* [VCS工具的基本使用(一)](https://blog.csdn.net/qq_38863842/article/details/121071378)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [VCS工具学习笔记(5)](https://blog.csdn.net/qq_43045275/article/details/127759807)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值