Module Vpi
In: lib/ruby-vpi/vpi.rb

A utility layer which transforms the VPI interface into one that is more suitable for Ruby.

Methods

Classes and Modules

Class Vpi::Handle
Class Vpi::S_vpi_time
Class Vpi::S_vpi_value

Constants

INTEGER_BITS = 32   Number of bits in PLI_INT32.
INTEGER_LIMIT = 2 ** INTEGER_BITS   Lowest upper bound of PLI_INT32.
INTEGER_MASK = INTEGER_LIMIT - 1   Bit-mask capable of capturing PLI_INT32.
Handle = SWIG::TYPE_p_unsigned_int   handles

External Aliases

vpi_register_cb -> vpi_register_cb_old
vpi_remove_cb -> vpi_remove_cb_old
initialize -> old_initialize

Public Class methods

Public Instance methods

Advances the simulation by the given number of steps.

Simulates the design under test according to RubyVpi.init_bench.

Returns the current simulation time as an integer.

This is a Ruby version of the vpi_register_cb C function. It is identical to the C function, except for the following differences:

  • This method accepts a block (callback handler) which is executed whenever the callback occurs.
  • This method overwrites the cb_rtn and user_data fields of the given S_cb_data object.

[Validate]