Synopsys Vcs Tutorial
Synopsys Vcs Tutorial
STEP 1: login to the Linux system on Linuxlab server. Start a terminal (the
shell prompt).
Fig. 1 The screen when you login to the Linuxlab through equeue
STEP 2: In the terminal, execute the following command:
module add ese461
You could perform “module avail” in the terminal to find the available
modules on Linuxlab. Make sure ese461 is presented when you execute
this command.
2
Successfully compiled
Fig. 4 The result of successfully executing vcs
3
Error message when encounter a
error during the compiling process.
Fig.6 The result of vcs when it thinks there are mistakes in the code
• A successfully compiling will print out on terminal “../simv up to
date”. And it should generate an executable file named “simv” in the
same folder where your codes are present.
• Then in the terminal run:
./simv
• After the process finishes, “VCS Simulation Report” will be present
on the terminal and a file named “<file>.vcd” will be generated in the
same folder where your codes are present. This is the dump file we
specified in the test bench code and we will use it to graphically
display the simulation results.
Simulation Report
4
Fig. 8 Start dve on the terminal
• Go to “File/Open Database” and select the “.vcd” file from the
project folder.
5
• Then you will find the name of your test bench model in the
Hierarchy box (Counter_tb here). Expand it so that you can find DUT
in the options.
Device(Module)
under test
6
• Click on “Add to New Wave View” to see the waveforms of your
Inputs and Outputs. You should see your results in a new window.
Then adjust the size of the waveform and explore other options as
well.
Adjust the size of waveform.
The leftmost is “fit the screen”
7
Additional Option to run in Debug mode:
Instead of compiling the files directly as before, we can enable a debug flag
during compilation by using following command
vcs -lca -debug_access+all Counter.v Counter_tb.v
Now run the code:
./simv -gui &
This should open the dve tool automatically and you can fully run your test
bench or debug it step by step. To do this first select inputs and outputs
from variable window and right click “Add to the Waves” as before. This
should open the following window as shown in the Fig. 14 . Then click the
tool button of blue arrow in brace or press F11 to run the test bench step
by step(Fig. 14 and Fig. 15). Or click the tool button of the blue arrow
pointing downward or press F5 to run the test bench fully(Fig. 16 ~ Fig. 18).
Other tool options are also available and just explore them by yourself.
8
1.Click here or press
3.Fit screen
“F5” to run simulation
9
7.Then click here or press “F5”
9.Fit screen
will restart the simulation
10
Reference:
If you are interested in exploring further, another example model and test
bench codes are present in the following link
https://github.com/bangonkali/electronics/tree/master/verilog/adder
Reference for test bench syntax can be found here.
11