Skip to content
STIMSMITH

Direct Programming Interface (DPI)

Concept

SystemVerilog's Direct Programming Interface (DPI) is used in the reusable RISC-V vector accelerator verification environment to bridge the SystemVerilog/UVM testbench with the Spike Instruction Set Simulator (ISS), which is implemented in C++. DPI enables native C/C++ functions to be imported into SystemVerilog, allowing the verification environment to invoke Spike routines such as setup, memory access, single-stepping, and interrupt injection from within the UVM-driven iss_wrapper abstraction.

First seen 5/24/2026
Last seen 6/14/2026
Evidence 1 chunks
Wiki v2

WIKI

Direct Programming Interface (DPI)

Definition

The Direct Programming Interface (DPI) is a SystemVerilog feature that allows SystemVerilog code to directly invoke functions implemented in C or C++ (and vice versa). In the reusable RISC-V vector accelerator verification environment, DPI is used as the inter-language bridge between the SystemVerilog/UVM testbench and the Spike Instruction Set Simulator (ISS), which is implemented in C++.

READ FULL ARTICLE →

NEIGHBORHOOD

3 nodes · 2 edges
graph · Direct Programming Interface (DPI) · depth=1

RELATIONSHIPS

2 connections
The paper uses SystemVerilog DPI to communicate with the Spike ISS.
iss_wrapper ← uses 100% 1e
iss_wrapper uses DPI to communicate with Spike ISS implemented in C++.

CITATIONS

5 sources
5 citations — click to expand
[1] DPI is a SystemVerilog feature used to communicate with the Spike ISS, which is implemented in C++. Reusable Verification Environment for a RISC-V Vector Accelerator
[2] The imported DPI functions are called from the class that extends the iss_wrapper, which implements the pure virtual methods of the wrapper. Reusable Verification Environment for a RISC-V Vector Accelerator
[3] Spike routines such as spike_setup, run_and_inject, exit_code, set_tohost_addr, get_memory_data, start_execution, set_memory_data, do_step, spike_set_external_interrupt, and spike_run_until_vector_ins are imported using 'DPI-C' context. Reusable Verification Environment for a RISC-V Vector Accelerator
[4] The base verification environment supports any ISA simulator as a reference model by declaring pure virtual methods in a wrapper class, which is then overridden in the build phase using UVM factory override capabilities (set_type_override_by_type). Reusable Verification Environment for a RISC-V Vector Accelerator
[5] For each project a different version of Spike is used (e.g., modifications were made to support vector extension 0.7.1), and Spike's library file is project-dependent, generated from a dedicated branch of the ISS repository. Reusable Verification Environment for a RISC-V Vector Accelerator