Skip to content

Instantly share code, notes, and snippets.

@ktbarrett
Created December 11, 2021 23:37
Show Gist options
  • Save ktbarrett/ec497d85e9e01ae8268b2f9f0210d49c to your computer and use it in GitHub Desktop.
Save ktbarrett/ec497d85e9e01ae8268b2f9f0210d49c to your computer and use it in GitHub Desktop.
* simulator control (enums or separate functions?)
* SHUTDOWN
* RESTART (new addition)
* logging
* levels
* TRACE
* DEBUG
* INFO
* WARNING
* ERROR
* CRITICAL
* native logger log
* native logger set level
* register log handler
* clear log handler
* log handler log
* LOG_ macros
* handle
* types (changed from cocotb's gpi)
* UNKNOWN
* MODULE // (S)V module, VHDL entities and component instantiations
* BLOCK // if generates, process blocks
* GENARRAY // for generates
* LOGIC // std_logic(_vector), vpiNet, vpiReg, vpiRegArray, vpiNetArray
* INTEGER // VHDL integer, natural, positive, (S)V integer
* REAL // real
* STRING // string
* ENUM // SV and VHDL custom enum types (that aren't std_logic)
* PHYSICAL // SV and VHDL time, VHDL custom physical types
* ARRAY // arrays, packed or unpacked, of any non-logic type, and multidimentional logic arrays
* STRUCTURE // VHDL records and SV classes
* get by full path name
* get child by name
* get child by index
* release
* iterate
* children
* drivers? (doesn't seem strictly necessary for a testbench)
* loads? (doesn't seem strictly necessary for a testbench)
* get info
* full path name
* is const
* is indexable? (ARRAY and GENARRAY are indexable, nothing else is, not sure this is necessary)
* type
* native type name string
* left bound
* right bound
* size? (we have left and right bound)
* definition name? (doesn't seem strictly necessary for a testbench)
* definition file? (doesn't seem strictly necessary for a testbench)
* enum literal names (new addition)
* physical type unit names and multiplier (new addition)
* get value
* int
* binstr
* string
* real
* set value
* action
* DEPOSIT
* FORCE
* RELEASE
* int
* binstr
* string
* real
* compare? (potential new addition)
* get parent? (potential new addition)
* timing
* register StartOfSimTime cb (new addition)
* register Shutdown cb (new addition)
* register NextTimeStep cb
* register Timer cb
* register ReadWrite cb
* register ReadOnly cb
* register ValueChange cb
* RISING
* FALLING
* EITHER
* deregister callback
* get callback userdata
REMOVE:
gpi_print_registered_impl (there should be no trace of "impl"s on the GPI interface, they should be totally encapsulated)
gpi_has_registered_impl
QUESTIONS:
* How to best describe enum and physical literals
* Do we treat time values separate from physical?
* Are we okay with handling logic / logic arrays like we are? Is there a better way?
@marlonjames
Copy link

With the restart capability, there is the question of handle validity. The VPI/VHPI handles will be invalidated, but new handles for static objects (modules, blocks, signals, etc) can be re-acquired after restart without invalidating the "handle" given to the GPI user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment