Skip to content

Commit e85b669

Browse files
author
steve
committed
Add the glossary file.
1 parent bc6dfeb commit e85b669

File tree

3 files changed

+82
-10
lines changed

3 files changed

+82
-10
lines changed

driver/iverilog.man

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH iverilog 1 "$Date: 2001/01/20 19:02:05 $" Version "$Date: 2001/01/20 19:02:05 $"
1+
.TH iverilog 1 "$Date: 2001/05/15 15:09:08 $" Version "$Date: 2001/05/15 15:09:08 $"
22
.SH NAME
33
iverilog - Icarus Verilog compiler
44

@@ -10,9 +10,10 @@ iverilog - Icarus Verilog compiler
1010
.PP
1111
\fIiverilog\fP is a compiler that translates Verilog source code into
1212
executable programs for simulation, or other netlist formats for
13-
further processing. The currenty supported targets are \fIvvm\fP (for
14-
executable simulation) and \fIxnf\fP for synthesis. Other target
15-
types are added as code generators are implemented.
13+
further processing. The currently supported targets are \fIvvm\fP (for
14+
executable simulation) and \fIvvp\fP for simulation, and \fIxnf\fP for
15+
synthesis. Other target types are added as code generators are
16+
implemented.
1617

1718
.SH OPTIONS
1819
.l
@@ -56,15 +57,15 @@ expanded and removed. This is useful, for example, to preprocess
5657
verilog source for use by other compilers.
5758
.TP 8
5859
.B -I\fIincludedir\fP
59-
Append directory \fIincludepdir\fP to list of directoriess searched
60+
Append directory \fIincludepdir\fP to list of directories searched
6061
for Verilog include files. The \fB-I\fP switch may be used many times
6162
to specify several directories to search, the directories are searched
6263
in the order they appear on the command line.
6364
.TP 8
6465
.B -m\fImodule\fP
6566
Add this module to the list of VPI modules to be loaded by the
6667
simulation. Many modules can be specified, and all will be loaded, in
67-
the order specified.
68+
the order specified. The system module is implicit and always included.
6869
.TP 8
6970
.B -N\fIpath\fP
7071
This is used for debugging the compiler proper. Dump the final netlist
@@ -133,6 +134,12 @@ This is the default. The target is an executable program that uses the
133134
vvm simulation runtime. The compiler actually generates C++ code, then
134135
compiles and links that code to make the output executable.
135136
.TP 8
137+
.B vvp
138+
The vvp target generates code for the vvp runtime. The output is a
139+
complete program that simulates the design (like with vvm) but must be
140+
run by the \fivvp\fP command. This target is much faster then the
141+
\fBvvm\fP target, but not quite as complete.
142+
.TP 8
136143
.B xnf
137144
This is the Xilinx Netlist Format used by many tools for placing
138145
devices in FPGAs or other programmable devices. The Icarus Verilog XNF
@@ -159,15 +166,19 @@ the current directory
159166

160167
To compile hello.v to an executable file called a.out:
161168

162-
verilog hello.v
169+
iverilog hello.v
163170

164171
To compile hello.v to an executable file called hello:
165172

166-
verilog -o hello hello.v
173+
iverilog -o hello hello.v
174+
175+
To compile and run using the vvp runtime:
176+
177+
iverilog -ohello.vvp -tvvp hello.v
167178

168179
To compile hello.v to a file in XNF-format called hello.xnf
169180

170-
verilog -txnf -ohello.xnf hello.v
181+
iverilog -txnf -ohello.xnf hello.v
171182

172183

173184
.SH "AUTHOR"

glossary.txt

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
Throughout Icarus Verilog descriptions and source code, I use a
3+
variety of terms and acronyms that might be specific to Icarus
4+
Verilog, have an Icarus Verilog specific meaning, or just aren't
5+
widely known. So here I define these terms.
6+
7+
8+
LRM - Language Reference Manual
9+
This is a generic acronym, but in the Verilog world we sometimes
10+
mean *the* language reference manual, the IEEE1364 standard.
11+
12+
13+
PLI - Programming Language Interface
14+
This is a C API into Verilog simulators that is defined by the
15+
IEEE1364. There are two major interfaces, sometimes called PLI 1
16+
and PLI 2. PLI 2 is also often called VPI.
17+
18+
19+
UDP - User Defined Primitive
20+
These are objects that Verilog programmers define with the
21+
"primitive" keyword. They are truth-table based devices. The
22+
syntax for defining them is described in the LRM.
23+
24+
25+
VPI -
26+
This is the C API that is defined by the Verilog standard, and
27+
that Icarus Verilog partially implements. See also PLI.
28+
29+
30+
VVM - Verilog Virtual Machine
31+
This is the Icarus Verilog runtime that works with the code
32+
generator that generates C++.
33+
34+
35+
VVP - Verilog Virtual Processor
36+
This is the Icarus Verilog runtime that reads in custom code in a
37+
form that I call "VVP Assembly". See the vvp/ directory for
38+
documentation on that.
39+

vvp/vpi_signal.cc

+23-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
1818
*/
1919
#if !defined(WINNT)
20-
#ident "$Id: vpi_signal.cc,v 1.12 2001/05/14 00:42:32 steve Exp $"
20+
#ident "$Id: vpi_signal.cc,v 1.13 2001/05/15 15:09:08 steve Exp $"
2121
#endif
2222

2323
/*
@@ -170,6 +170,25 @@ static void signal_get_value(vpiHandle ref, s_vpi_value*vp)
170170

171171
switch (vp->format) {
172172

173+
case vpiIntVal:
174+
assert(wid <= 8 * sizeof vp->value.integer);
175+
vp->value.integer = 0;
176+
for (unsigned idx = 0 ; idx < wid ; idx += 1) {
177+
vvp_ipoint_t fptr = ipoint_index(rfp->bits, idx);
178+
switch (functor_oval(fptr)) {
179+
case 0:
180+
break;
181+
case 1:
182+
vp->value.integer |= 1<<idx;
183+
break;
184+
default:
185+
idx = wid;
186+
vp->value.integer = 0;
187+
break;
188+
}
189+
}
190+
break;
191+
173192
case vpiBinStrVal:
174193
for (unsigned idx = 0 ; idx < wid ; idx += 1) {
175194
vvp_ipoint_t fptr = ipoint_index(rfp->bits, idx);
@@ -407,6 +426,9 @@ vpiHandle vpip_make_net(char*name, int msb, int lsb, bool signed_flag,
407426

408427
/*
409428
* $Log: vpi_signal.cc,v $
429+
* Revision 1.13 2001/05/15 15:09:08 steve
430+
* Add the glossary file.
431+
*
410432
* Revision 1.12 2001/05/14 00:42:32 steve
411433
* test width of target with bit size of long.
412434
*

0 commit comments

Comments
 (0)