使用vcs基本步骤-交互式模式

vcs有三种调试模式:CLI调试模式、VirSim交互调试模式、VirSim后处理模式。

启动VirSim交互调试模式有两种方法:

1、vcs source.v -RI -line +vcsd +cfgfile+filename

或者:

2、vcs source.v -I -line +vcsd

      vcs source.v -RIG +cfgfile+filename

 

交互式模式调试步骤:

1.

Now we are going to simulate the design again but in interactive mode. First let's 
exit VirSim if you have not already done so. Recompile your source code with the 
following command line:  

vcs -RI -Mupdate -f main_count.f

The -Mupdate is a compile-time option that tells vcs to compile incrementally.   
When you use this option, it will create a sub-directory called csrc. This directory 
will contain a Makefile and object files for each module that is compiled. When 
you compile incrementally, only the modules that change between compilations 
will need to be recompiled. The -RI means we are going to simulate in interactive 
mode. As soon as the code is compiled, VirSim will be invoked and the simulation 
will start. 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2.

Now you can open the Hierarchy window, open the Waveform window, either load 
your configuration file (using Ctrl-L) or browse through the hierarchy to select 
signals to view as in GUI part described above. The time scale can be changed by 
Step Time button in the Simulator Control panel in the Interactive window. When 
you simulate interactively, the waveforms are only  recorded for the signals that 
appear in the Waveform Window. Hence you should select any signals of interest 
before the simulation time that you want to view them. If at any time you want to 
restart the simulation, select Re-exec or  Invoke Sim under the Sim option in the 
Interactive window.


3.

You can also view your source code in the following manner. Select Source under 
Window menu of the Interactive window to open a Source Window and Select  Hierarchy under Window menu of the Interactive window to open a Hierarchy 
window. Then in the Hierarchy window, select a module instance, say test_count, 
and drag it (using the middle mouse button) to the large black panel in the Source 
window as shown below. If you want to edit your code, VCS will then invoke a text 
editor. 


 

 

你可能感兴趣的:(IC设计)