iverilog-vpi(1)
π iverilog-vpi β the compile front end for VPI modules π
okay bestie, so this is iverilog-vpi(1), from the Version 13.0 (stable) era of the Icarus Verilog manual, and it is literally the glow-up your VPI module deserves. β¨
π NAME π
iverilog-vpi β Compile front end for VPI modules
πΈ SYNOPSIS πΈ
iverilog-vpi [options] sourcefile...
π¦ DESCRIPTION π¦
So iverilog-vpi is the tool that makes compiling VPI modules for Icarus Verilog not a whole ordeal. You hand it a list of C or C++ source files on the command line, and it hands you back a linked VPI module. That's it, that's the whole serve. π
Want the tea on how that linked module actually gets loaded by a simulation? Go read the vvp(1) man page, she explains it all.
By default the output gets named after the first source file. So if your first source file is named foo.c, the output becomes foo.vpi. Iconic, predictable, we love a naming convention that just works. π
β¨ OPTIONS β¨
iverilog-vpi accepts the following options:
-llibraryβ Include the named library in the link of the VPI module. This lets your VPI modules go reference external libraries too, no cap.-Ldirectoryβ Adddirectoryto the list of directories that will be searched for library files.-Idirectoryβ Adddirectoryto the list of directories that will be searched for header files.-Ddefineβ Define a macro nameddefine.--name=nameβ Normally the output VPI module gets named after the first source file you passed to the command. This flag sets the name (without the.vpisuffix) of the output vpi module. So you get to pick, main character style. π
π₯οΈ PC-ONLY OPTIONS π₯οΈ
Heads up bestie, this section is only for the Windows girlies.
When it's built as a native Windows program (using the MinGW toolchain), by default iverilog-vpi will try to locate the MinGW tools it needs to compile a VPI module on the system path (as set by the PATH environment variable). But as an alternative, you can just tell it where the MinGW tools live with this option:
-mingw=pathβ Tell the program the root of the MinGW compiler tool suite. Thevvpruntime is compiled with this compiler, and this is the compiler thativerilog-vpiexpects to use to compile your source code. If this option accompanies a list of files, it will apply to the current build only. If this option is provided on its own,iverilog-vpiwill save the path in the registry and use that path in preference to the system path for subsequent operations β which means you avoid the need to specify it on the command line every single time. Obsessed with a tool that remembers things for you. π«Ά
π INFORMATIONAL OPTIONS π
iverilog-vpi also includes extra flags so the Makefile gurus can peek at the configuration of the iverilog installation. π The whole point is that Makefiles can be written that handle complex VPI builds natively, and without hard-coding values that depend on the system and installation. So much cleaner, fr fr.
Real talk though: if you use these at all, they must be used one at a time, and without any other options or directives. Don't get cute with it.
--install-dirβ Print the install directory for VPI modules.--cflagsβ Print the compiler flags (CFLAGSorCXXFLAGS) needed to compile source code destined for a VPI module.--ldflagsβ Print the linker flags (LDFLAGS) needed to link a VPI module.--ldlibsβ Print the libraries (LDLIBS) needed to link a VPI module.
Example GNU makefile that takes advantage of these flags β copy this vibe exactly:
CFLAGS = -Wall -O $(CFLAGS_$@)
VPI_CFLAGS := $(shell iverilog-vpi --cflags)
CFLAGS_messagev.o = $(VPI_CFLAGS)
CFLAGS_fifo.o = $(VPI_CFLAGS)
messagev.o fifo.o: transport.h
messagev.vpi: messagev.o fifo.o
iverilog-vpi $^
π AUTHOR π
Steve Williams (steve@icarus.com)
π SEE ALSO π
iverilog(1), vvp(1), <https://steveicarus.github.io/iverilog/>, <http://mingw-w64.yaxm.org/>,
π COPYRIGHT π
Copyright Β© 2002-2026 Stephen Williams
This document can be freely redistributed according to the terms of the GNU General Public License version 2.0
okay that's the whole page, you ate it up, you understood it, periodt. π β¨
Signing off from the iverilog-vpi(1) corner of the manual β this was the Version 13.0 (stable) era, dated Jan 13th, 2026. Take care of her, she's iconic. ππ
π¦ where this page comes from
- alpine 3.24: iverilog-doc 13.0-r0 Β· GPL-2.0-or-later
- arch rolling: iverilog 13.0-1 Β· GPL
- epel 10: iverilog 13.0-7.el10_3 Β· GPL-2.0-only
- fedora 44: iverilog 13.0-4.fc44 Β· GPL-2.0-only
- fedora 44: iverilog 13.0-7.fc44 Β· GPL-2.0-only
- fedora 44: iverilog 13.0-7.fc44 Β· GPL-2.0-only
- nixos 26.05: iverilog 13.0
- nixpkgs unstable: iverilog 13.0
- ubuntu stonking: iverilog 13.0-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms