1iverilog-vpi(1)              Version 10.3 (stable)             iverilog-vpi(1)
2
3
4

NAME

6       iverilog-vpi - Compile front end for VPI modules
7
8

SYNOPSIS

10       iverilog-vpi [options] sourcefile...
11
12

DESCRIPTION

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       By  default  the output is named after the first source file. For exam‐
21       ple, if the first source  file  is  named  foo.c,  the  output  becomes
22       foo.vpi.
23
24

OPTIONS

26       iverilog-vpi accepts the following options:
27
28       -llibrary
29               Include  the  named library in the link of the VPI module. This
30               allows VPI modules to further reference external libraries.
31
32
33       -Ldirectory
34               Add directory to the list of directories that will be  searched
35               for library files.
36
37
38       -Idirectory
39               Add  directory to the list of directories that will be searched
40               for header files.
41
42
43       -Ddefine
44               Define a macro named define.
45
46
47       --name=name
48               Normally, the output VPI module will be named after  the  first
49               source  file  passed  to  the  command. This flag sets the name
50               (without the .vpi suffix) of the output vpi module.
51
52

PC-ONLY OPTIONS

54       When built as a native Windows program (using the MinGW toolchain),  by
55       default  iverilog-vpi  will attempt to locate the MinGW tools needed to
56       compile a VPI module on the system path (as set by the PATH environment
57       variable).  As an alternative, the user may specify the location of the
58       MinGW tools via the following option.
59
60
61       -mingw=path
62               Tell the program the root of the MinGW compiler tool suite. The
63               vvp  runtime  is  compiled  with this compiler, and this is the
64               compiler that iverilog-vpi  expects  to  use  to  compile  your
65               source  code.  If  this  option accompanies a list of files, it
66               will apply to the current build only. If this  option  is  pro‐
67               vided  on  its own, iverilog-vpi will save the path in the reg‐
68               istry and use that path in preference to the  system  path  for
69               subsequent  operations,  avoiding the need to specify it on the
70               command line every time.
71
72

INFORMATIONAL OPTIONS

74       iverilog-vpi includes additional flags to let Makefile  gurus  peek  at
75       the  configuration  of  the iverilog installation.  This way, Makefiles
76       can be written that handle complex VPI  builds  natively,  and  without
77       hard-coding values that depend on the system and installation.  If used
78       at all, these options must be used one at a time, and without any other
79       options or directives.
80
81
82       --install-dir
83               Print the install directory for VPI modules.
84
85
86       --cflags
87               Print the compiler flags (CFLAGS or CXXFLAGS) needed to compile
88               source code destined for a VPI module.
89
90
91       --ldflags
92               Print the linker flags (LDFLAGS) needed to link a VPI module.
93
94
95       --ldlibs
96               Print the libraries (LDLIBS) needed to link a VPI module.
97
98
99       Example GNU makefile that takes advantage of these flags:
100
101           CFLAGS = -Wall -O $(CFLAGS_$@)
102           VPI_CFLAGS := $(shell iverilog-vpi --cflags)
103           CFLAGS_messagev.o = $(VPI_CFLAGS)
104           CFLAGS_fifo.o = $(VPI_CFLAGS)
105           messagev.o fifo.o: transport.h
106           messagev.vpi: messagev.o fifo.o
107                iverilog-vpi $^
108
109

AUTHOR

111       Steve Williams (steve@icarus.com)
112
113

SEE ALSO

115       iverilog(1),  vvp(1),   <http://iverilog.icarus.com/>,   <http://mingw-
116       w64.yaxm.org/>,
117
118
120       Copyright ©  2002-2017 Stephen Williams
121
122       This document can be freely redistributed according to the terms of the
123       GNU General Public License version 2.0
124
125
126
127                                Jan 29th, 2017                 iverilog-vpi(1)
Impressum