Crates.io | svdpi |
lib.rs | svdpi |
version | 0.0.3 |
source | src |
created_at | 2024-08-23 06:58:57.049839 |
updated_at | 2024-11-18 07:20:33.626563 |
description | Rust bindings for SystemVerilog DPI and VPI |
homepage | |
repository | https://github.com/FanShupei/svdpi-rs |
max_upload_size | |
id | 1348734 |
size | 98,942 |
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.
Features are currently very limited and are developed as needed.
Feature requests and PRs are welcomed.
svdpi.h
raw bindings lives in sys::dpi
.
svvpi.h
raw bindings lives in sys::vpi
.
The baseline is SystemVerilog 2017. Enable sv2023
feature to use features defined in SystemVerilog 2023 (like svGetTime
).
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.
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.