ExamplesΒΆ

A very brief description of how to use VPI is that vpi_user.h provides dozens of functions to scan/navigate the hierarchy of the elaborated hardware design, and it allows setting callbacks for specific events/signals.

Note

Since VHDL sources are agnostic to the usage of VPI modules, most of the examples in this section reuse the same VHDL sources. Readers should focus on the differences between the provided C files.

Attention

On Windows, the directory containing libghdlvpi.dll needs to be added to the PATH. This can be achieved with --vpi-library-dir, --vpi-library-dir-unix or $(cd $(dirname $(which ghdl))/../lib; pwd).