This repo contains SystemVerilog VPI examples that I found in the wild, translated to Nim, and then many examples of my own that show the Nim/SystemVerilog interface via VPI.
User needs to have access to some SystemVerilog simulator supporting VPI, like Cadence Xcelium.
All examples in this repo use the Nim ~svvpi~ package. To install it, do:
nimble install svvpi
- To run the default Nim/SV examples, cd to each subdirectory and run
make
. - Some examples also have C/SV examples in an
orig/
subdirectory under there. To run those, cd to thatorig/
directory and then runmake
.
Unless stated otherwise, all C examples in this repo and most of the SystemVerilog test benches are originally authored by late Stuart Sutherland (sourced from The Verilog PLI Handbook).
I have received the permission from Don Mills (sutherland-hdl.com
)
to post code from The Verilog PLI Handbook in this repository.
All Nim examples are authored by Kaushal Modi. The C and SystemVerilog test benches could also be altered to improve the examples functionally, or just for coding consistency.
- The Verilog PLI Handbook by Stuart Sutherland – SpringerLink | Author’s homepage
- C examples from /The Verilog PLI Handbook/
- Cadence Xcelium VPI examples in
${XCELIUM_ROOT}/../inca/examples/vpi/
- Cadence Xcelium
- 20.09-s09
- OS
- CentOS 7.6
- Nim
- 1.5.1 as of 2021-04-30 Fri.