Expand description
§rustdv-gpi-sys
Raw FFI declarations for the simulator programming interface.
Deviation from design-doc D2.1 (documented in STATUS.md): the design
calls for bindgen-generated bindings to cocotb’s gpi.h. This sandbox has
no cocotb GPI build and a zero-external-dependency constraint (no bindgen),
so v0 binds the IEEE 1800 VPI C API directly — the same API cocotb’s
GPI wraps for Icarus. The declarations below are a hand-written subset of
vpi_user.h, sufficient for: hierarchy lookup, value get/set, time query,
and callbacks. The safe layer (rustdv-gpi) exposes a GPI-shaped API so
that swapping this crate for real gpi.h bindings later is contained.
Everything here is unsafe extern "C"; no logic lives in this crate
(the -sys discipline, design-doc D2.1).
Structs§
Constants§
- cbAfter
Delay - cbAt
Start OfSim Time - cbEnd
OfCompile - cbEnd
OfSimulation - cbForce
- cbNext
SimTime - cbRead
Only Synch - cbRead
Write Synch - cbRelease
- cbStart
OfSimulation - cbStmt
- cbValue
Change - vpi0
- vpi1
- vpiBin
StrVal - vpiBit
Var - vpiByte
Var - vpiConstant
- vpiDec
StrVal - vpiEnum
Var - vpiFile
- vpiFinish
- vpiForce
Flag - vpiFull
Name - vpiHex
StrVal - vpiInertial
Delay - vpiInt
Val - vpiInt
Var - vpiInteger
Var - vpiLine
No - vpiLong
IntVar - vpiMemory
- vpiModule
- vpiName
- vpiNet
- vpiNo
Delay - vpiOct
StrVal - vpiParameter
- vpiPort
- vpiReal
Val - vpiReal
Var - vpiReg
- vpiRelease
Flag - vpiReset
- vpiScalar
Val - vpiScaled
Real Time - vpiShort
IntVar - vpiSim
Time - vpiSize
- vpiStop
- vpiString
Val - vpiSuppress
Time - vpiSuppress
Val - vpiTime
Precision - vpiTime
Unit - vpiType
- vpiVector
Val - vpiX
- vpiZ
Functions§
- vpi_
control ⚠ - vpi_
free_ ⚠object - vpi_get⚠
- vpi_
get_ ⚠str - vpi_
get_ ⚠time - vpi_
get_ ⚠value - vpi_
handle_ ⚠by_ index - vpi_
handle_ ⚠by_ name - vpi_
iterate ⚠ - vpi_
printf ⚠ - vpi_
put_ ⚠value - vpi_
register_ ⚠cb - vpi_
remove_ ⚠cb - vpi_
scan ⚠
Type Aliases§
- PLI_
BYTE8 - PLI_
INT32 - PLI_
UINT32 - vpiHandle
- Opaque simulator object handle (
vpiHandle).