1iverilog-vpi(1) Version 0.9.4 iverilog-vpi(1)
2
3
4
6 iverilog-vpi - Compile front end for VPI modules
7
8
10 iverilog-vpi [--name=name] sourcefile...
11
12
14 iverilog-vpi is a tool to simplify the compilation of VPI modules for
15 use with Icarus Verilog. It takes on the command line a list of C or
16 C++ source files, and generates as output a linked VPI module. See the
17 vvp(1) man page for a description of how the linked module is loaded by
18 a simulation.
19
20 The output is named after the first source file. For example, if the
21 first source file is named foo.c, the output becomes foo.vpi.
22
23
25 iverilog-vpi accepts the following options:
26
27 -llibrary
28 Include the named library in the link of the VPI module. This
29 allows VPI modules to further reference external libraries.
30
31
32 -Idirectory
33 Add directory to the list of directories that will be search
34 for header files.
35
36
37 -Ddefine
38 Define a macro named define.
39
40
41 --name=name
42 Normally, the output VPI module will be named after the first
43 source file passed to the command. This flag sets the name
44 (without the .vpi suffix) of the output vpi module.
45
46
47 --install-dir
48 This flag causes the program to print the install directory for
49 VPI modules, then exit. It is a convenience for makefiles or
50 automated plug-in installers.
51
52
53 --cflags, --ldflags and -ldlibs
54 These flags provide compile time information.
55
56
58 The PC port of iverilog-vpi includes two special flags needed to sup‐
59 port the more intractable development environment. These flags help the
60 program locate parts that it needs.
61
62
63 -mingw=path
64 Tell the program the root of the Mingw compiler tool suite. The
65 vvp runtime is compiled with this compiler, and this is the
66 compiler that iverilog-vpi expects to use to compile your
67 source code. This is normally not needed, and if you do use it,
68 it is only needed once. The compiler will save the path in the
69 registry for use later.
70
71
72 -ivl=path
73 Set for the use during compilation the root if the Icarus Ver‐
74 ilog install. This is the place where you installed Icarus Ver‐
75 ilog when you ran the installer. This flag is also only needed
76 once, and the path is stored in the registry for future use.
77
78
80 The UNIX version of iverilog-vpi includes additional flags to let Make‐
81 file gurus peek at the configuration of the iverilog installation.
82 This way, Makefiles can be written that handle complex VPI builds
83 natively, and without hard-coding values that depend on the system and
84 installation. If used at all, these options must be used one at a
85 time, and without any other options or directives.
86
87
88 --cflags
89 Print the compiler flags (CFLAGS or CXXFLAGS) needed to compile
90 source code destined for a VPI module.
91
92
93 --ldflags
94 Print the linker flags (LDFLAGS) needed to link a VPI module.
95
96
97 --ldlibs
98 Print the libraries (LDLIBS) needed to link a VPI module.
99
100
101 -m32 On 64bit systems that support it (and support vvp32) this flag
102 requests a 32bit vpi binary instead of the default 64bit
103 binary.
104
105
106 Example GNU makefile that takes advantage of these flags:
107
108 CFLAGS = -Wall -O $(CFLAGS_$@)
109 VPI_CFLAGS := $(shell iverilog-vpi --cflags)
110 CFLAGS_messagev.o = $(VPI_CFLAGS)
111 CFLAGS_fifo.o = $(VPI_CFLAGS)
112 messagev.o fifo.o: transport.h
113 messagev.vpi: messagev.o fifo.o
114 iverilog-vpi $^
115
116
118 Steve Williams (steve@icarus.com)
119
120
122 iverilog(1), vvp(1), <http://www.icarus.com/eda/verilog/>,
123 <http://www.mingw.org>,
124
125
127 Copyright © 2002-2009 Stephen Williams
128
129 This document can be freely redistributed according to the terms of the
130 GNU General Public License version 2.0
131
132
133
134 April 17th, 2009 iverilog-vpi(1)