# systemverilog-dpi-arrays — original runnable example Original SystemVerilog and C++ code: MIT. Original observed results: CC BY 4.0. No simulator runtime library or executable is redistributed. Tested tools: Icarus Verilog 13.0, upstream release commit `dfeee909ed9f20b4870dd93423156c0170c0e1ff`; Verilator 5.052, upstream release commit `ea338be98e1e838d3518809ce8899f85a009963c`. The installed release executables are hashed in the run records. Tool source commits identify upstream release tags; the binary distributions were not rebuilt here. macOS 27.0.1, arm64, Apple clang 21.0.0 were used. Run from this source directory in a build location without spaces. ## Working DPI build ```sh verilator --binary --assert --language 1800-2012 -Wno-fatal --quiet-build --quiet-stats --quiet-exit --top-module tb --Mdir obj example.sv dpi.cpp ./obj/Vtb +verilator+quiet ``` Expected result: fixed 15, packed 18, ascending 60, descending 60, short −1, bytes 1. The rejected size is intentional. `Vtb__Dpi.h` is the generated interface-declaration output from this original source; the package includes no `svdpi.h` runtime header. The build regenerates its own header under `obj/`. ## Deliberate compile mismatch Configure `VERILATOR_ROOT` for the pinned installation, then run: ```sh clang++ -std=c++17 -fsyntax-only -Iobj -I"${VERILATOR_ROOT}/include/vltstd" mismatch.cpp ``` Expected: nonzero return code and `conflicting types for 'fixed_sum'`. The mismatched source is not linked or executed. ## Icarus unsupported observation ```sh iverilog -g2012 -Wall -s tb -o run.vvp example.sv ``` Expected in 13.0: compile rejection at the DPI-C imports. No executable result or VPI replacement is claimed. Relocated Icarus distributions may additionally require `-B "${ICARUS_LIB}"`. ## Records and scope Public logs: `../../measurements/printed-hdl/P09-icarus.json` and `../../measurements/printed-hdl/P09-verilator.json`. They contain exact commands, source hashes, UTC run times, return codes, literal checker output and diagnostics. Environment paths are replaced with named tokens. No generated executables, objects or third-party implementation headers belong in the published data folder.