2002-02-16 04:18:53 +01:00
|
|
|
.TH iverilog 1 "$Date: 2002/02/16 03:18:54 $" Version "$Date: 2002/02/16 03:18:54 $"
|
2000-04-26 22:53:21 +02:00
|
|
|
.SH NAME
|
|
|
|
|
iverilog - Icarus Verilog compiler
|
|
|
|
|
|
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
.B iverilog
|
2002-02-03 08:05:36 +01:00
|
|
|
[-ESVv] [-Cpath] [-ccmdfile] [-Dmacro[=defn]] [-pflag=value]
|
2001-11-14 04:28:15 +01:00
|
|
|
[-Iincludedir] [-mmodule] [-Nfile] [-ooutputfilename] [-stopmodule]
|
2001-10-21 01:02:39 +02:00
|
|
|
[-ttype] [-Tmin/typ/max] [-Wclass] [-ypath] sourcefile
|
2000-04-26 22:53:21 +02:00
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
.PP
|
|
|
|
|
\fIiverilog\fP is a compiler that translates Verilog source code into
|
|
|
|
|
executable programs for simulation, or other netlist formats for
|
2002-02-16 04:18:53 +01:00
|
|
|
further processing. The currently supported targets are \fIvvp\fP for
|
|
|
|
|
simulation, and \fIxnf\fP and \fIfpga\fP for synthesis. Other target
|
|
|
|
|
types are added as code generators are implemented.
|
2000-04-26 22:53:21 +02:00
|
|
|
|
|
|
|
|
.SH OPTIONS
|
|
|
|
|
.l
|
|
|
|
|
\fIiverilog\fP accepts the following options:
|
|
|
|
|
.TP 8
|
2000-05-04 00:14:31 +02:00
|
|
|
.B -B\fIbase\fP
|
|
|
|
|
The \fIiverilog\fP program uses external programs to preprocess and
|
2001-11-17 18:45:37 +01:00
|
|
|
compile the Verilog source. Normally, the path used to locate these
|
2000-05-04 00:14:31 +02:00
|
|
|
tools is built into the \fIiverilog\fP program. However, the \fB-B\fP
|
|
|
|
|
switch allows the user to select a different set of programs. The path
|
|
|
|
|
given is used to locate \fIivlpp\fP, \fIivl\fP and the VPI modules.
|
|
|
|
|
.TP 8
|
2001-01-05 06:16:03 +01:00
|
|
|
.B -c\fIfile\fP
|
|
|
|
|
This flag specifies an input file that contains a list of Verilog
|
|
|
|
|
source files. This is similar to the \fIcommand file\fP of other
|
|
|
|
|
Verilog simulators, in that it is a file that contains the file names
|
2001-11-12 02:26:36 +01:00
|
|
|
instead of taking them on the command line. See \fBCommand Files\fP below.
|
2001-01-05 06:16:03 +01:00
|
|
|
.TP 8
|
2000-10-18 23:53:05 +02:00
|
|
|
.B -C\fIpath\fP
|
|
|
|
|
This flag selects the driver configuration file to use. Normally, the
|
|
|
|
|
iverilog program will read its configuration file from
|
|
|
|
|
/usr/lib/ivl/iverilog.conf (or the install path configured at compile
|
|
|
|
|
time) but the user can specify the path to a different configuration
|
|
|
|
|
file. This is useful when testing new configuration files. See the
|
|
|
|
|
installed configuration file for a summary of the file format.
|
|
|
|
|
.TP 8
|
2000-04-26 22:53:21 +02:00
|
|
|
.B -D\fImacro\fP
|
2000-05-05 03:07:42 +02:00
|
|
|
Defines macro \fImacro\fP with the string `1' as its definition. This
|
|
|
|
|
form is normally only used to trigger ifdef conditionals in the
|
|
|
|
|
Verilog source.
|
2000-04-26 22:53:21 +02:00
|
|
|
.TP 8
|
|
|
|
|
.B -D\fImacro=defn\fP
|
2000-05-05 03:07:42 +02:00
|
|
|
Defines macro \fImacro\fP as \fIdefn\fP.
|
2000-04-26 22:53:21 +02:00
|
|
|
.TP 8
|
|
|
|
|
.B -E
|
|
|
|
|
Preprocess the Verilog source, but do not compile it. The output file
|
|
|
|
|
is the Verilog input, but with file inclusions and macro references
|
|
|
|
|
expanded and removed. This is useful, for example, to preprocess
|
2001-11-17 18:45:37 +01:00
|
|
|
Verilog source for use by other compilers.
|
2000-04-26 22:53:21 +02:00
|
|
|
.TP 8
|
2000-05-05 03:07:42 +02:00
|
|
|
.B -I\fIincludedir\fP
|
2001-11-14 04:28:15 +01:00
|
|
|
Append directory \fIincludedir\fP to list of directories searched
|
2000-05-05 03:07:42 +02:00
|
|
|
for Verilog include files. The \fB-I\fP switch may be used many times
|
|
|
|
|
to specify several directories to search, the directories are searched
|
|
|
|
|
in the order they appear on the command line.
|
2000-04-26 22:53:21 +02:00
|
|
|
.TP 8
|
|
|
|
|
.B -m\fImodule\fP
|
|
|
|
|
Add this module to the list of VPI modules to be loaded by the
|
2000-05-17 05:53:29 +02:00
|
|
|
simulation. Many modules can be specified, and all will be loaded, in
|
2001-05-15 17:09:08 +02:00
|
|
|
the order specified. The system module is implicit and always included.
|
2000-04-26 22:53:21 +02:00
|
|
|
.TP 8
|
2000-08-09 03:34:00 +02:00
|
|
|
.B -N\fIpath\fP
|
|
|
|
|
This is used for debugging the compiler proper. Dump the final netlist
|
|
|
|
|
form of the design to the specified file. It otherwise does not affect
|
|
|
|
|
operation of the compiler. The dump happens after the design is
|
|
|
|
|
elaborated and optimized.
|
|
|
|
|
.TP 8
|
2000-04-26 22:53:21 +02:00
|
|
|
.B -o \fIfilename\fP
|
|
|
|
|
Place output in the file \fIfilename\fP. If no output file name is
|
|
|
|
|
specified, \fIiverilog\fP uses the default name \fBa.out\fP.
|
|
|
|
|
.TP 8
|
2001-01-20 20:02:04 +01:00
|
|
|
.B -p\fIflag=value\fP
|
|
|
|
|
Assign a value to a target specific flag. The \fB-p\fP switch may be
|
|
|
|
|
used as often as necessary to specify all the desired flags. The flags
|
|
|
|
|
that are used depend on the target that is selected, and are described
|
|
|
|
|
in target specific documentation. Flags that are not used are ignored.
|
|
|
|
|
.TP 8
|
2000-05-04 00:14:31 +02:00
|
|
|
.B -S
|
|
|
|
|
Synthesize. Normally, if the target can accept behavioral
|
2000-05-05 03:07:42 +02:00
|
|
|
descriptions the compiler will leave processes in behavioral
|
2000-05-04 00:14:31 +02:00
|
|
|
form. The \fB-S\fP switch causes the compiler to perform synthesis
|
|
|
|
|
even if it is not necessary for the target. If the target type is a
|
|
|
|
|
netlist format, the \fB-S\fP switch is unnecessary and has no effect.
|
|
|
|
|
.TP 8
|
2000-04-26 22:53:21 +02:00
|
|
|
.B -s \fItopmodule\fP
|
|
|
|
|
Specify the top level module to elaborate. Icarus Verilog will by default
|
2001-10-23 02:37:29 +02:00
|
|
|
choose modules that are not instantiated in any other modules, but
|
|
|
|
|
sometimes that is not sufficient, or instantiates too many modules. If
|
|
|
|
|
the user specifies one or more root modules with \fB-s\fP flags, then
|
|
|
|
|
they will be used as root modules instead.
|
2000-04-26 22:53:21 +02:00
|
|
|
.TP 8
|
2000-07-29 19:58:20 +02:00
|
|
|
.B -T\fImin|typ|max\fP
|
|
|
|
|
Use this switch to select min, typ or max times from min:typ:max
|
|
|
|
|
expressions. Normally, the compiler will simply use the typ value from
|
|
|
|
|
these expressions (with a warning) but this switch will tell the
|
|
|
|
|
compiler explicitly which value to use. This will suppress the
|
|
|
|
|
warning that the compiler is making a choice.
|
|
|
|
|
.TP 8
|
2000-05-04 00:14:31 +02:00
|
|
|
.B -t\fItarget\fP
|
|
|
|
|
Use this switch to specify the target output format. See the
|
|
|
|
|
\fBTARGETS\fP section below for a list of valid output formats.
|
|
|
|
|
.TP 8
|
2000-04-26 22:53:21 +02:00
|
|
|
.B -v
|
|
|
|
|
Turn on verbose messages. This will print the command lines that are
|
|
|
|
|
executed to perform the actual compilation, along with version
|
2002-02-03 08:05:36 +01:00
|
|
|
information from the various components, as well as the version of the
|
|
|
|
|
product as a whole.
|
|
|
|
|
.TP 8
|
|
|
|
|
.B -V
|
|
|
|
|
Print the version of the compiler, and exit.
|
2000-05-04 00:14:31 +02:00
|
|
|
.TP 8
|
|
|
|
|
.B -W\fIclass\fP
|
|
|
|
|
Turn on different classes of warnings. See the \fBWARNING TYPES\fP
|
2001-11-14 04:28:15 +01:00
|
|
|
section below for descriptions of the different warning groups. If
|
2000-05-04 00:14:31 +02:00
|
|
|
multiple \fB-W\fP switches are used, the warning set is the union of
|
|
|
|
|
all the requested classes.
|
2001-10-21 01:02:39 +02:00
|
|
|
.TP 8
|
2001-11-14 04:28:15 +01:00
|
|
|
.B -y\fIlibdir\fP
|
2001-10-21 01:02:39 +02:00
|
|
|
Append the directory to the library module search path. When the
|
|
|
|
|
compiler finds an undefined module, it looks in these directories for
|
|
|
|
|
files with the right name.
|
|
|
|
|
|
|
|
|
|
.SH MODULE LIBRARIES
|
|
|
|
|
|
|
|
|
|
The Icarus Verilog compiler supports module libraries as directories
|
|
|
|
|
that contain Verilog source files. During elaboration, the compiler
|
|
|
|
|
notices the instantiation of undefined module types. If the user
|
|
|
|
|
specifies library search directories, the compiler will search the
|
|
|
|
|
directory for files with the name of the missing module type. If it
|
|
|
|
|
finds such a file, it loads it as a Verilog source file, they tries
|
|
|
|
|
again to elaborate the module.
|
|
|
|
|
|
|
|
|
|
Library module files should contain only a single module, but this is
|
|
|
|
|
not a requirement. Library modules may reference other modules in the
|
|
|
|
|
library or in the main design.
|
2000-04-26 22:53:21 +02:00
|
|
|
|
|
|
|
|
.SH TARGETS
|
|
|
|
|
|
|
|
|
|
The Icarus Verilog compiler supports a variety of targets, for
|
2000-04-29 03:20:14 +02:00
|
|
|
different purposes, and the \fB-t\fP switch is used to select the
|
2000-04-26 22:53:21 +02:00
|
|
|
desired target.
|
|
|
|
|
|
|
|
|
|
.TP 8
|
|
|
|
|
.B null
|
|
|
|
|
The null target causes no code to be generated. It is useful for
|
|
|
|
|
checking the syntax of the Verilog source.
|
|
|
|
|
.TP 8
|
2001-05-15 17:09:08 +02:00
|
|
|
.B vvp
|
2001-07-01 00:59:40 +02:00
|
|
|
This is the default. The vvp target generates code for the vvp
|
|
|
|
|
runtime. The output is a complete program that simulates the design
|
2002-02-16 04:18:53 +01:00
|
|
|
but must be run by the \fBvvp\fP command.
|
2001-05-15 17:09:08 +02:00
|
|
|
.TP 8
|
2000-04-26 22:53:21 +02:00
|
|
|
.B xnf
|
|
|
|
|
This is the Xilinx Netlist Format used by many tools for placing
|
|
|
|
|
devices in FPGAs or other programmable devices. The Icarus Verilog XNF
|
|
|
|
|
code generator can generate complete designs or XNF macros that can be
|
2002-02-16 04:18:53 +01:00
|
|
|
imported into larger designs by other tools. (This target is obsolete,
|
|
|
|
|
use the \fBfpga\fP target instead.)
|
2001-08-31 19:28:10 +02:00
|
|
|
.TP 8
|
|
|
|
|
.B fpga
|
2002-02-16 04:18:53 +01:00
|
|
|
This is a synthesis target that supports a variety of fpga devices,
|
|
|
|
|
mostly by EDIF format output.
|
2000-04-26 22:53:21 +02:00
|
|
|
|
2000-05-04 00:14:31 +02:00
|
|
|
.SH "WARNING TYPES"
|
|
|
|
|
These are the types of warnings that can be selected by the \fB-W\fP
|
|
|
|
|
switch.
|
|
|
|
|
|
|
|
|
|
.TP 8
|
|
|
|
|
.B all
|
|
|
|
|
This enables all supported warning categories.
|
|
|
|
|
|
|
|
|
|
.TP 8
|
|
|
|
|
.B implicit
|
|
|
|
|
This enables warnings for creation of implicit declarations. For
|
2001-11-14 04:28:15 +01:00
|
|
|
example, if a scalar wire X is used but not declared in the Verilog
|
2000-05-04 00:14:31 +02:00
|
|
|
source, this will print a warning at its first use.
|
|
|
|
|
|
2001-11-14 04:28:15 +01:00
|
|
|
.SH "COMMAND FILES"
|
2001-11-12 02:26:36 +01:00
|
|
|
The command file allows the user to place source file names and
|
|
|
|
|
certain command line switches into a text file instead of on a long
|
|
|
|
|
command line. Command files can include C or C++ style comments, as
|
|
|
|
|
well as # comments, if the # starts the line.
|
|
|
|
|
|
2001-11-14 04:28:15 +01:00
|
|
|
.TP 8
|
|
|
|
|
.I "file name"
|
2001-11-12 02:26:36 +01:00
|
|
|
A simple file name or file path is taken to be the name of a Verilog
|
2001-11-14 04:28:15 +01:00
|
|
|
source file. The path starts with the first non-white-space character.
|
2001-11-12 02:26:36 +01:00
|
|
|
|
2001-11-14 04:28:15 +01:00
|
|
|
.TP 8
|
|
|
|
|
.B -y\ \fIlibdir\fP
|
2001-11-12 02:26:36 +01:00
|
|
|
A \fB-y\fP token prefixes a library directory in the command file,
|
2001-11-17 18:45:37 +01:00
|
|
|
exactly like it does on the command line. The parameter to the \fB-y\fP
|
2001-11-12 02:26:36 +01:00
|
|
|
flag may be on the same line or the next non-comment line.
|
|
|
|
|
|
2001-11-14 04:28:15 +01:00
|
|
|
.TP 8
|
|
|
|
|
.B +incdir+\fIincludedir\fP
|
|
|
|
|
The \fB+incdir+\fP token in command files gives directories to search
|
|
|
|
|
for include files in much the same way that \fB-I\fP flags work on the
|
|
|
|
|
command line. The difference is that multiple \fI+includedir\fP
|
|
|
|
|
directories are valid parameters to a single \fB+incdir+\fP token,
|
|
|
|
|
although you may also have multiple \fB+incdir+\fP lines.
|
|
|
|
|
|
2001-11-16 06:07:19 +01:00
|
|
|
.TP 8
|
|
|
|
|
.B +libext+\fIext\fP
|
|
|
|
|
The \fB+libext\fP token in command files fives file extensions to try
|
|
|
|
|
when looking for a library file. This is useful in conjunction with
|
|
|
|
|
\fB-y\fP flags to list suffixes to try in each directory before moving
|
|
|
|
|
on to the next library directory.
|
|
|
|
|
|
2001-11-14 04:28:15 +01:00
|
|
|
.TP 8
|
|
|
|
|
.B +define+\fINAME\fP=\fIvalue\fP
|
|
|
|
|
The \fB+define+\fP token is the same as the \fB-D\fP option on the
|
|
|
|
|
command line. The value part of the token is optional.
|
|
|
|
|
|
2001-12-08 05:13:07 +01:00
|
|
|
.TP 8
|
|
|
|
|
.B +toupper-filename\fP
|
|
|
|
|
This token causes file names after this in the command file to be
|
|
|
|
|
translated to uppercase. This helps with situations where a directory
|
|
|
|
|
has passed through a DOS machine, and in the process the file names
|
|
|
|
|
become munged.
|
|
|
|
|
|
|
|
|
|
.TP 8
|
|
|
|
|
.B +tolower-filename\fP
|
|
|
|
|
This is similar to the \fB+toupper-filename\fP hack described above.
|
|
|
|
|
|
2000-04-26 22:53:21 +02:00
|
|
|
.SH EXAMPLES
|
|
|
|
|
These examples assume that you have a Verilog source file called hello.v in
|
|
|
|
|
the current directory
|
|
|
|
|
|
|
|
|
|
To compile hello.v to an executable file called a.out:
|
|
|
|
|
|
2001-05-15 17:09:08 +02:00
|
|
|
iverilog hello.v
|
2000-04-26 22:53:21 +02:00
|
|
|
|
|
|
|
|
To compile hello.v to an executable file called hello:
|
|
|
|
|
|
2001-05-15 17:09:08 +02:00
|
|
|
iverilog -o hello hello.v
|
|
|
|
|
|
2001-07-01 00:59:40 +02:00
|
|
|
To compile and run explicitly using the vvp runtime:
|
2001-05-15 17:09:08 +02:00
|
|
|
|
|
|
|
|
iverilog -ohello.vvp -tvvp hello.v
|
2000-04-26 22:53:21 +02:00
|
|
|
|
|
|
|
|
To compile hello.v to a file in XNF-format called hello.xnf
|
|
|
|
|
|
2001-05-15 17:09:08 +02:00
|
|
|
iverilog -txnf -ohello.xnf hello.v
|
2000-04-26 22:53:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
.SH "AUTHOR"
|
|
|
|
|
.nf
|
|
|
|
|
Steve Williams (steve@icarus.com)
|
|
|
|
|
|
|
|
|
|
.SH SEE ALSO
|
2001-07-30 00:50:28 +02:00
|
|
|
vvp(1),
|
2000-04-26 22:53:21 +02:00
|
|
|
.BR "<http://www.icarus.com/eda/verilog/>"
|
|
|
|
|
|
|
|
|
|
.SH COPYRIGHT
|
|
|
|
|
.nf
|
|
|
|
|
Copyright \(co 2000 Stephen Williams
|
|
|
|
|
|
|
|
|
|
This document can be freely redistributed according to the terms of the
|
|
|
|
|
GNU General Public License version 2.0
|