4 releases
0.0.3 | Nov 18, 2024 |
---|---|
0.0.2 | Nov 9, 2024 |
0.0.1 | Aug 23, 2024 |
0.0.0 | Aug 23, 2024 |
#429 in Hardware support
99KB
3K
SLoC
Svdpi
Rust bindings for Systemverilog DPI and VPI.
WARNING: The development is at very early stage. Features may be incomplete and NO stability is promised.
Currently main users are t1 and chisel-nix.
The normative documentation is SystemVerilog LRM (Languare Reference Manual). DPI and VPI interfaces are defined as part of the standard.
The most up-to-date standard version now is IEEE 1800-2023. The standard is available at no cost via the IEEE Get Program.
High Level Bindings
Features are currently very limited and are developed as needed.
Feature requests and PRs are welcomed.
Low Level Bindings
svdpi.h
raw bindings lives in sys::dpi
.
svvpi.h
raw bindings lives in sys::vpi
.
SystemVerilog Language Version
The baseline is SystemVerilog 2017. Enable sv2023
feature to use features defined in SystemVerilog 2023 (like svGetTime
).
Use VPI
Enable vpi
feature to use VPI functions. Currently we focus on ultilizing VPI functions inside DPI functions.
As LRM explicitly states "For VPI access (or any other interface access) to be possible, the appropriate implementation-defined mechanism shall still be used to enable these interface(s)". E.g. Verilator requires you to verilate the design with --vpi
option.
Linking with Simulator
This crate only declares DPI (and VPI) function prototypes and does not try to interfere with the compilation process.
Users are responsible to compile the DPI library properly and link it with the simulator. Read LRM 2023 Annex J (Inclusion of foreign language code) and the simulator's manual for more help.