You are on page 1of 90

Verilog Simulation & D

ebugging Tools

TA:

Author: Trumen
Outline

Environment Setup
NC-Verilog
nLint
nWave
Verdi

2
Environment Setup

3
Login to the Linux Server

Many EDA tools are provided only for the Linu


x OS.
So we have to use software like PuTTY/PieTTY/
MobaXterm on our local computer to login to
the linux server and use the EDA tools on it.

4
NTUEE Linux Servers

IC Design Lab (TA: )


http://cad.ee.ntu.edu.tw/
Server list
IP NAME TYPE CPU CPU CLOCK MEMORY OS
140.112.20. Intel Xeon 2.4 GHz *
cad16 IBM X3400 100 G RHEL 5
59 64 16
140.112.20. Intel Xeon 2.4 GHz *
cad17 IBM X3550 20 G RHEL 5
60 64 16

140.112.20. Intel Xeon CentOS
cad42 IBM X3500 2 GHz * 24 32 G
85 64 5

5
X Window System

X Window System (X11, X, and sometimes infor


mally X-Windows) is a windowing system for bit
map displays, common on UNIX-like (ex: Linux)
operating systems.
Microsoft Windows is not shipped with support
for X, but many third-party implementations exi
st, as free and open source software such as Cy
gwin/X, and proprietary products such as Xmin
g.
6
Introduction to MobaXterm
(1/2)

MobaXterm is free software that can be install


ed onto your local Windows or Mac computer
which provides a graphical user interface and
a command line shell for the server.
Official Website http
://mobaxterm.mobatek.net/

7
Introduction to MobaXterm
(2/2)

MobaXterm provides useful features for devel


opers:
Multitab terminal with embedded Unix commands
(ls, cd, ...).
Embedded X11 server for easily exporting your Lin
ux display.
Passwords management for SSH, SFTP, etc (on dem
and password saving).

8
Session Settings

Click the Session button and specify which ses


sion you want. Usually this will be SSH. For th
at click SSH.

1
2

9
1 2

10
1 (double-click)

11
Command Line Shell

We can also use the command line shell to log


in to the server.
ssh bXXXXX@cad27.ee.ntu.edu.tw [-p YYYYY]
bXXXXX: your usesr name
YYYYY: port number
here -p 22 is redundant because 22 is the default port n
umber.

12
Upload Files (1/2)

Uploading files fom your local PC to the serve


r.
1
2

3. Choose
which
file(s) to
upload

13
Upload Files (2/2)

Moving and copying files by using the drag-an


d-drop.

14
Download Files (1/2)

Downloading files from the server to local PC.

2
3. Select
1 directory

15
Download Files (2/2)

Moving and copying files by using the drag-an


d-drop.

2
1

16
NC-Verilog

17
Introduction to NC-Verilog

The Cadence NC-Verilog simulator is a Veri


log digital logic simulator.
We can use NC-Verilog to
Compiles the Verilog source files.
Elaborates the design and generates a simulation s
napshot.
Simulates the snapshot.

18
Before Using NC-Verilog

Source the environment settings of CAD tools.


source ~cvsd/cvsd.cshrc
If you try entering the command "ncverilog" b
ut it turns out "command not found," it mean
s there's something wrong with the "*.cshrc" f
ile or the software license is out of date.

19
Running Verilog (1/2)

Run the Verilog simulation:


ncverilog testbench.v exp2.rsa.v +access+r

Another choice of running Verilog simulation:


ncverilog -f exp2_rsa.f +access+r

In exp2_rsa.f

20
Running Verilog (2/2)

"+access+r" is added to enable waveform file


dumping.
In testbench.v, line 69~72

or

*.fsdb has smaller file size than *.vcd. But $fs


dbDumpfile cannot work without sourcing ver
di.cshrc.
21
Simulation Results

Check the simulation result to see if the Verilo


g design is finished correctly.

22
nLint

23
Introduction to nLint

nLint is a comprehensive HDL design rule che


cker fully integrated with the Debussy debugg
ing system (Developed by SpringSoft).
We can use nLint to check the coding style of
our design and if it is synthesizable.

24
Before Using nLint

Source the environment settings of CAD tools.


source ~cvsd/verdi.cshrc
To avoid the warning *WARN* Failed to check
out license. occurs when starting nLint, please
type the following command:

setenv LM_LICENSE_FILE '26585@lsntu:26585@lsncku'

25
Start nLint

Type the following command:


nLint -gui &
The token "&" enable you to use the terminal while
nLint is running in the background.

Just ignore this


warning. 26
Specify the Design File

27
1
2

5
28
Start Checking

29
Not all the warnings or errors are valuable.

30
nWave

31
Introduction to nWave

nWave is one of the best waveform (*.vcd or *


.fsdb) viewer.
We can debug easily by checking the wavefor
m file dumped during simulation.

32
Before Using nWave

Source the environment settings of CAD tools.


source ~cvsd/verdi.cshrc
To avoid the Verdi warning window occurs,

please type the following command:

setenv LM_LICENSE_FILE '26585@lsntu:26585@lsncku'


33
Start nWave

Type the following command:


nWave &
Also, the token "&" enable you to use the terminal
while Verdi is running in the background.

Just ignore this


warning. 34
Open the FSDB File

35
2

36
Choose Signals

37
1

Choose signals
we are interested
in.

3 4
38
Browse the Whole Waveform

39
Browse the Specified Interval

press & drag

40
41
Search for Specified Signal
4,5, 2 3

42
Jump to the cursor position (Used when we are lost)

cursor position
(Search by rising oe)

43
Change Sign Representation

2
3

44
Change Radix Representatio
n 2

45
46
Change Signal Position

2
Press middle mouse
button,
drag and then drop.
1

47
48
Signal Aliasing
2

1
3

49
1
4

Note that signal aliasing is a strict


one-to-one correspondence so the
value represented in the viewer
must exactly represent what format
your filter expects. (e.g., binary,
hexadecimal)
5

3 6

50
51
Reload the Waveform

Remember to reload the waveform whenever


finishing another Verilog simulation.

52
Verdi

53
Introduction to Verdi

The Verdi Automated Debug System is an adv


anced open platform for debugging digital de
signs with powerful technology that helps you
:
1. Comprehend complex and unfamiliar design beh
avior.
2. Automate difficult and tedious debug processes.
3. Unify diverse and complicated design environme
nts.
54
Basic Function (1/2)

nTrace
A source code viewer and analyzer that operates o
n the knowledge database (KDB) to display the desi
gn hierarchy and source code (Verilog, VHDL, Sysm
Verilog, SystemC, PSL, OVA, mixed) for selected des
ign blocks.
The main window of Verdi.

55
Basic Function (2/2)

nWave
A state-of-the-art graphical waveform viewer and a
nalyzer that is fully integrated with Verdi's source c
ode, schematic, and flow views.
nSchema
A schematic viewer and analyzer that generates int
eractive debug-specific logic diagrams showing the
structure of selected portions of a design.

These two tools can be opened through


nTrace. 56
Before Using Verdi

Source the environment settings of CAD tools.


source ~cvsd/verdi.cshrc
To avoid the Verdi warning window occurs,

please type the following command:

setenv LM_LICENSE_FILE '26585@lsntu:26585@lsncku'


57
Start Verdi

Type the following command:


verdi &
Also, the token "&" enable you to use the terminal
while Verdi is running in the background.

Just ignore this


warning. 58
nTrace

59
1
2

5
60
1 (double-click)
Netlist Code
Window
Hierarchical
Browser

Message
Window

61
1
1
double-click

62
1

1
double-click

63
1

64
1

65
2

66
67
2

68
69
nSchema

70
Push View In
1 (double-click)

71
1

72
73
1 (right-click)

74
1 (right-click)

75
76
nWave

77
1

3
78
1
Press middle mouse
button,
drag and then drop.

79
80
1
Ctrl + C

81
1 (right-click)

82
83
1

84
1

85
1

86
87
88
The End.
Any question?
Reference

1. "MobaXterm User Manual by The Centre for


eResearch, University of Auckand.
2. "Cadence NC-Verilog Simulator Tutorial by C
adence
3. "Quick Start: an nLint Tutorial" by NOVAS
4. "Introduction to Verdi" by Abel Hu
5. "Verdi3 datasheet" by Synopsys

90

You might also like