Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 84 lines (59 sloc) 3.025 kB
29cfd8c Add a quick-start document.
steve authored
1
2 * Getting Started with Icarus Verilog
3
4 Icarus Verilog is a Verilog compiler. It is suitable for use as a
5 simulator, and, to some degree, synthesizer. Icarus Verilog runs under
6 Linux and a variety of UNIX systems, as well as Windows as a command
7 line tool, so the instructions are generally applicable to all
8 environments. Note that this is only a quick start. For more detailed
9 documentation, see the manual page for the iverilog command.
10
11
12 * Hello, World!
13
14 The first thing you want to do as a user is learn how to compile and
15 execute even the most trivial design. For the purposes of simulation,
16 we use as our example *the* most trivial simulation:
17
18 module main;
e4ae832 Clean up spurious trailing white space.
steve authored
19
20 initial
29cfd8c Add a quick-start document.
steve authored
21 begin
22 $display("Hello, World");
23 $finish ;
24 end
25
26 endmodule
27
28 By a text editor (or copy hello.vl from the Icarus Verilog examples
29 directory) arrange for this program to be in a text file, "hello.vl".
30 Next, compile this program with a command like this:
31
32 % iverilog -o hello hello.vl
33
34 The results of this compile are placed into the file "hello", as the
35 "-o" flag tells the compiler where to place the compiled result. Next,
36 execute the compiled program like so:
37
38 % vvp hello
39 Hello, World
40
41 And there it is, the program has been executed. So what happened? The
42 first step, the "iverilog" command, read and interpreted the source
43 file, then generated a compiled result. The compiled form may be
44 selected by command line switches, but the default form is the VVP
45 format, which is actually run by the "vvp" command.
46
47 The "iverilog" and "vvp" commands are the only commands that users
48 use to invoke Icarus Verilog. What the compiler actually does is
49 controlled by command line switches. In our little example, we asked
f28b97e Spelling error
steve authored
50 the compiler to compile the source program to the default vvp form,
29cfd8c Add a quick-start document.
steve authored
51 which is in turn executed by the vvp program.
52
53
54 * Windows Install
55
56 The easiest way to install under Windows is to get a precompiled
57 installer for the version you wish to install. Icarus Verilog is
58 distributed for Windows users as a self-installing .exe. Just execute
59 the installer and follow the instructions. During the install, take
60 note of the directory where the program is installed: for example,
61 C:\iverilog is a good place to install.
62
63 Once the binary is installed, you need to add the bin directory to
64 your execution path. The executables you need are in C:\iverilog\bin,
65 where the "C:\iverilog" part is actually the root of where you
66 installed the package. The programs are in the bin subdirectory. Put
67 this directory in your PATH environment variable, and the above
68 commands become accessible to you at the command line prompt, or even
69 in batch files.
70
71
72 * Linux Install
73
74 Under Linux, the install is even easier. For RedHat and Mandrake based
75 systems, there is the appropriate RPM file. Just install the package
76 with the "rpm -U <file>" command. Debian users should get Icarus
77 Verilog packages from the main Debian software site.
78
79
80 * Install From Source
81
e941e7e Spelling fixes.
steve authored
82 In this case, see README.txt and other documentation that comes with
29cfd8c Add a quick-start document.
steve authored
83 the source.
Something went wrong with that request. Please try again.