Downloaded and integrated latest wiki documentation from the geda website.
[geda-gaf/peter-b.git] / docs / wiki / geda_icarus_quick_start.html
blob6ee2a88963b1df548aeaeb3e60a803be860a7bab
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
4 lang="en" dir="ltr">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <title>geda:icarus_quick_start</title>
8 <meta name="generator" content="DokuWiki Release rc2007-05-24" />
9 <meta name="robots" content="index,follow" />
10 <meta name="date" content="2007-05-24T22:27:25-0400" />
11 <meta name="keywords" content="geda,icarus_quick_start" />
12 <link rel="search" type="application/opensearchdescription+xml" href="http://geda.seul.org/wiki/lib/exe/opensearch.php" title="geda Wiki" />
13 <link rel="start" href="http://geda.seul.org/wiki/" />
14 <link rel="contents" href="http://geda.seul.org/wiki/geda:icarus_quick_start?do=index" title="Index" />
15 <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="http://geda.seul.org/wiki/feed.php" />
16 <link rel="alternate" type="application/rss+xml" title="Current Namespace" href="http://geda.seul.org/wiki/feed.php?mode=list&ns=geda" />
17 <link rel="alternate" type="text/html" title="Plain HTML" href="http://geda.seul.org/wiki/_export/xhtml/geda:icarus_quick_start" />
18 <link rel="alternate" type="text/plain" title="Wiki Markup" href="http://geda.seul.org/wiki/_export/raw/geda:icarus_quick_start" />
19 <link rel="stylesheet" media="all" type="text/css" href="lib/exe/css" />
20 <link rel="stylesheet" media="screen" type="text/css" href="lib/exe/001css" />
21 <link rel="stylesheet" media="print" type="text/css" href="lib/exe/002css" />
22 </head>
23 <body>
24 <div class="dokuwiki export">
28 <h1><a name="getting_started_with_icarus_verilog" id="getting_started_with_icarus_verilog">Getting Started with Icarus Verilog</a></h1>
29 <div class="level1">
30 <pre class="code">* Getting Started with Icarus Verilog
32 Icarus Verilog is a Verilog compiler. It is suitable for use as a
33 simulator, and, to some degree, synthesizer. Icarus Verilog runs under
34 Linux and a variety of UNIX systems, as well as Windows as a command
35 line tool, so the instructions are generally applicable to all
36 environments. Note that this is only a quick start. For more detailed
37 documentation, see the manual page for the iverilog command.
40 * Hello, World!
42 The first thing you want to do as a user is learn how to compile and
43 execute even the most trivial design. For the purposes of simulation,
44 we use as our example *the* most trivial simulation:
46 module main;
48 initial
49 begin
50 $display(&quot;Hello, World&quot;);
51 $finish ;
52 end
54 endmodule
56 By a text editor (or copy hello.vl from the Icarus Verilog examples
57 directory) arrange for this program to be in a text file, &quot;hello.vl&quot;.
58 Next, compile this program with a command like this:
60 % iverilog -o hello hello.vl
62 The results of this compile are placed into the file &quot;hello&quot;, as the
63 &quot;-o&quot; flag tells the compiler where to place the compiled result. Next,
64 execute the compiled program like so:
66 % vvp hello
67 Hello, World
69 And there it is, the program has been executed. So what happened? The
70 first step, the &quot;iverilog&quot; command, read and interpreted the source
71 file, then generated a compiled result. The compiled form may be
72 selected by command line switches, but the default form is the VVP
73 format, which is actually run by the &quot;vvp&quot; command.
75 The &quot;iverilog&quot; and &quot;vvp&quot; commands are the only commands that users
76 use to invoke Icarus Verilog. What the compiler actually does is
77 controlled by command line switches. In our little example, we asked
78 the compiler to compile the source program to the default vvp form,
79 which is in turn executed by the vvp program.
82 * Windows Install
84 The easiest way to install under Windows is to get a precompiled
85 installer for the version you wish to install. Icarus Verilog is
86 distributed for Windows users as a self-installing .exe. Just execute
87 the installer and follow the instructions. During the install, take
88 note of the directory where the program is installed: for example,
89 C:\iverilog is a good place to install.
91 Once the binary is installed, you need to add the bin directory to
92 your execution path. The executables you need are in C:\iverilog\bin,
93 where the &quot;C:\iverilog&quot; part is actually the root of where you
94 installed the package. The programs are in the bin subdirectory. Put
95 this directory in your PATH environment variable, and the above
96 commands become accessible to you at the command line prompt, or even
97 in batch files.
100 * Linux Install
102 Under Linux, the install is even easier. For RedHat and Mandrake based
103 systems, there is the appropriate RPM file. Just install the package
104 with the &quot;rpm -U &lt;file&gt;&quot; command. Debian users should get Icarus
105 Verilog packages from the main Debian software site.
108 * Install From Source
110 In this case, see README.txt and other documentation that comes with
111 the source.</pre>
113 </div>
114 </div>
115 </body>
116 </html>