Skip to main content

Crate vpi

Crate vpi 

Source
Expand description

Safe and ergonomic wrappers for selected Verilog VPI APIs.

Macros§

count_idents
Counts macro expression arguments at compile time.
mcd_println
Formats and writes a line to an MCD.
printf
format!-style wrapper around [printf].
startup_routines
Declares the vlog_startup_routines symbol required by VPI simulators.

Structs§

Callback
Raw callback registration descriptor.
CbData
Safe callback data passed to Rust closures.
Edge
Edge sensitivity mask values.
Handle
Wrapper around a raw VPI object handle.
HandleIterator
Iterator over VPI scan results from vpi_iterate/vpi_scan.
MCD
Multi-channel descriptor used by VPI for output streams.
PutValueFlags
Flags controlling behavior of vpi_put_value.
SimulatorInfo
Simulator metadata reported by vpi_get_vlog_info.
StrengthEncoding
Drive-strength and charge encoding flags.
StrengthValue
Scalar logic value plus drive strengths.
Timescale
Represents a module’s timescale information
VPIError
Rich error information returned by vpi_chk_error.

Enums§

CbReason
VPI callback reasons used when registering simulator callbacks.
ConstType
Literal/constant encoding type.
Control
Simulator control operations for vpi_control.
Direction
Port direction classification.
ErrorState
Simulation phase/state where an error occurred.
FuncType
Function return type classification.
NetType
Net type classification for net objects.
ObjectType
VPI object and relation kinds used with handle traversal APIs.
OpType
Operation subtype for expression objects.
PrimType
Primitive instance subtype.
Property
VPI property identifiers used with vpi_get and vpi_get_str.
ScalarValue
4-state scalar encodings used by VPI.
Severity
Error severity levels reported by VPI.
SysFuncType
System function return type classification.
TchkType
Timing check subtype.
Time
Time value representation used by VPI APIs.
Value
High-level value representation returned from or written to VPI objects.
ValueType
VPI value format tags used with vpi_get_value and related APIs.

Statics§

MCD_STDOUT
Standard output MCD descriptor.

Functions§

check_error
Alias of chk_error for consistency with rust-vhpi
chk_error
Checks whether the simulator has a pending VPI error.
control
Invokes vpi_control with the selected operation.
get_top_module_timescales
Returns timescale information for top-level modules.
printf
Prints a message through the simulator’s vpi_printf.
register_cb
Registers a global callback not tied to a specific object handle.
register_cb_with_time
Registers a time-based callback.
remove_cb
Removes a previously registered callback.
simulator_info
Returns simulator invocation metadata from vpi_get_vlog_info.
simulator_name
Returns the simulator product name.
simulator_version
Returns the simulator version string.
string_to_ascii_cstring
Converts a Rust string into a 7-bit ASCII CString.
vector_value_to_scalar_vector
Convert VPI vector values to a vector of scalar values