Icarus Verilog
Go to file
steve 32b52cbb97 Make debug output file parameters. 1999-04-23 04:34:32 +00:00
vvm Add to vvm proceedural memory references. 1999-04-22 04:56:58 +00:00
.cvsignore Ignore ivl. 1999-02-01 00:24:43 +00:00
LineInfo.h Elaborate gate ranges. 1999-02-15 02:06:15 +00:00
Makefile Elaborate gate ranges. 1999-02-15 02:06:15 +00:00
Module.cc Introduce verilog to CVS. 1998-11-03 23:28:49 +00:00
Module.h Add support for module parameters. 1999-02-21 17:01:57 +00:00
PExpr.cc Check net ranges in declarations. 1998-11-11 00:01:51 +00:00
PExpr.h Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
PGate.cc Elaborate gate ranges. 1999-02-15 02:06:15 +00:00
PGate.h Elaborate gate ranges. 1999-02-15 02:06:15 +00:00
PUdp.h Elaborate UDP devices, 1998-12-01 00:42:13 +00:00
PWire.h Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
README.txt Generate OBUF or IBUF attributes (and the gates 1998-12-07 04:53:16 +00:00
Statement.cc Parse and elaborate the Verilog CASE statement. 1999-02-03 04:20:11 +00:00
Statement.h Parse and elaborate the Verilog CASE statement. 1999-02-03 04:20:11 +00:00
cprop.cc Add the nobufz function to eliminate bufz objects, 1998-12-02 04:37:13 +00:00
design_dump.cc Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
elaborate.cc Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
emit.cc Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
eval.cc Introduce verilog to CVS. 1998-11-03 23:28:49 +00:00
lexor.lex Support sized decimal numbers, 1999-03-16 04:44:45 +00:00
main.cc Make debug output file parameters. 1999-04-23 04:34:32 +00:00
mangle.cc Mangle that handles device instance numbers. 1999-02-15 05:52:50 +00:00
netlist.cc Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
netlist.h Add to vvm proceedural memory references. 1999-04-22 04:56:58 +00:00
nobufz.cc Add the nobufz function to eliminate bufz objects, 1998-12-02 04:37:13 +00:00
parse.y Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
parse_misc.cc Handle procedural conditional, and some 1998-11-07 17:05:05 +00:00
parse_misc.h Handle procedural conditional, and some 1998-11-07 17:05:05 +00:00
pform.cc Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
pform.h Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
pform_dump.cc Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
propinit.cc Function to calculate wire initial value. 1998-12-20 02:05:41 +00:00
sigfold.cc Add the nobufz function to eliminate bufz objects, 1998-12-02 04:37:13 +00:00
stupid.cc Introduce netlist optimizations with the 1998-11-13 06:23:17 +00:00
t-null.cc Support null target for generating no output. 1999-01-24 01:35:08 +00:00
t-verilog.cc Elaborate UDP devices, 1998-12-01 00:42:13 +00:00
t-vvm.cc Add to vvm proceedural memory references. 1999-04-22 04:56:58 +00:00
t-xnf.cc Fix 2pin logic gates. 1998-12-09 02:43:19 +00:00
target.cc Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
target.h Add memories to the parse and elaboration phases. 1999-04-19 01:59:36 +00:00
targets.cc Support null target for generating no output. 1999-01-24 01:35:08 +00:00
verinum.cc Function to calculate wire initial value. 1998-12-20 02:05:41 +00:00
verinum.h Function to calculate wire initial value. 1998-12-20 02:05:41 +00:00
xnfio.cc Generate OBUF or IBUF attributes (and the gates 1998-12-07 04:53:16 +00:00

README.txt

THE ICARUS VERILOG COMPILATION SYSTEM

This tool includes a parser that parses Verilog (plus extensions) and
generates an internal netlist. The netlist is passed to various
processing steps that transform the design to more optimal/practical
forms, then passed to a code generator for final output. The
processing steps and the code generator are selected by command line
switches.

INVOKING

The vl command is the compiler driver, that invokes the parser,
optimization functions and the code generator.

Usage: vl [-s <module>] [-o <file>] [-D] [-F <name>] [-t <name>] file
       vl -h

-F <name>
	Use this flag to request an optimization function be applied
	to the netlist before it is sent to the target output
	stage. Any number of -F options may be given, to specify a
	variety of processing steps. The steps will be applied in
	order, with the output of one uses as the input to the next.

	The function is specified by name. Use the "vl -h" command to
	get a list of configured function names.

-f <assign>
	Use this flag to set a parameter value. The format of the
	assignment is <key>=<value> where key is any string up to the
	first '=', and <value> is the rest of the option. If the '='
	is omitted, then the key is assigned the empty string.

	The useful keys are defined by the functions and the target in
	use. These assignments are specifically useful for passing
	target specific information to the target backend, or
	options/parameters to optimization functions, if any are defined.

-o <file>
	Normally, the generated result is sent to standard
	output. Use the -o flag to specify an output file for the
	generated result.

-s <module>
	Normally, vl will elaborate the only module in the source
	file. If there are multiple modules, use this option to select
	the module to be used as the top-level module.

-t <name>
	Select the output format for the compiled result. Use the
	"vl -h" command to get a list of configured targets.

ATTRIBUTES

The parser accepts as an extension to Verilog the $attribute module
item. The syntax of the $attribute item is:

	$attribute (<identifier>, <key>, <value>);

The $attribute keyword looks like a system task invocation. The
difference here is that the parameters are more restricted then those
of a system task. The <identifier> must be an identifier. This will be
the item to get an attribute. The <key> and <value> are strings, not
expressions, that give the key and the value of the attribute to be
attached to the identified object.

Attributes are [<key> <value>] pairs and are used to communicate with
the various processing steps. See the documentation for the processing
step for a list of the pertinent attributes.

Attributes can also be applied to gate types. When this is done, the
attribute is given to every instantiation of the primitive. The syntax
for the attribute statement is the same, except that the <identifier>
names a primitive earlier in the compilation unit and the statement is
placed in global scope, instead of within a module. The semicolon is
not part of a type attribute.

Currently, type attributes are only supported for UDP types.

Note that attributes are also occasionally used for communication
between processing steps. Processing steps that are aware of others
may place attributes on netlist objects to communicate information to
later steps.

HOW IT WORKS -- STAGES OF PROCESSING

* Parse

The verilog compiler starts by parsing the verilog source file. The
output of the parse in a list of Module objects in PFORM. The pform
(see pform.h) is mostly a direct reflection of the compilation
unit. There may be dangling references, and it is not yet clear which
module is the root.

* Elaboration

This phase takes the pform and generates a netlist. The driver selects
(by user request or lucky guess) the root module to elaborate,
resolves references and expands the instantiations to form the design
netlist.

The elaborate() function performs the elaboration.

* Optimization

This is actually a collection of processing steps that perform
optimizations that do not depend on the target technology. Examples of
some useful transformations would be,

	- eliminate null effect circuitry,
	- combinational reduction
	- Constant propogation

The actual functions performed are specified on the command line by
the -F flags.

* Code Generation

This step takes the design netlist and uses it to drive the code
generator. (See target.h.) This may require transforming the
design to suit the technology.

The emit() method of the Design class performs this step. It runs
through the design elements, calling target functions as need arises
to generate actual output.

The target code generator to used is given by the -t flag on the
command line.