Module | VPI |
In: |
lib/ruby-vpi/core.rb
lib/ruby-vpi/core/callback.rb lib/ruby-vpi/core/struct.rb lib/ruby-vpi/core/scheduler.rb lib/ruby-vpi/core/handle.rb lib/ruby-vpi/core/edge.rb ruby-vpi-dynamic.rb |
This module encapsulates all functionality provided by the C-language Application Programming Interface (API) of the Verilog Procedural Interface (VPI). See the ext/vpi_user.h file for details.
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 | ||
VpiAlways | = | 1 | always construct | |
VpiAssignStmt | = | 2 | quasi-continuous assignment | |
VpiAssignment | = | 3 | procedural assignment | |
VpiBegin | = | 4 | block statement | |
VpiCase | = | 5 | case statement | |
VpiCaseItem | = | 6 | case statement item | |
VpiConstant | = | 7 | numerical constant or literal string | |
VpiContAssign | = | 8 | continuous assignment | |
VpiDeassign | = | 9 | deassignment statement | |
VpiDefParam | = | 10 | defparam | |
VpiDelayControl | = | 11 | delay statement (e.g. 10) | |
VpiDisable | = | 12 | named block disable statement | |
VpiEventControl | = | 13 | wait on event, e.g. @e | |
VpiEventStmt | = | 14 | event trigger, e.g. ->e | |
VpiFor | = | 15 | for statement | |
VpiForce | = | 16 | force statement | |
VpiForever | = | 17 | forever statement | |
VpiFork | = | 18 | fork-join block | |
VpiFuncCall | = | 19 | HDL function call | |
VpiFunction | = | 20 | HDL function | |
VpiGate | = | 21 | primitive gate | |
VpiIf | = | 22 | if statement | |
VpiIfElse | = | 23 | if-else statement | |
VpiInitial | = | 24 | initial construct | |
VpiIntegerVar | = | 25 | integer variable | |
VpiInterModPath | = | 26 | intermodule wire delay | |
VpiIterator | = | 27 | iterator | |
VpiIODecl | = | 28 | input/output declaration | |
VpiMemory | = | 29 | behavioral memory | |
VpiMemoryWord | = | 30 | single word of memory | |
VpiModPath | = | 31 | module path for path delays | |
VpiModule | = | 32 | module instance | |
VpiNamedBegin | = | 33 | named block statement | |
VpiNamedEvent | = | 34 | event variable | |
VpiNamedFork | = | 35 | named fork-join block | |
VpiNet | = | 36 | scalar or vector net | |
VpiNetBit | = | 37 | bit of vector net | |
VpiNullStmt | = | 38 | a semicolon. Ie. 10 ; | |
VpiOperation | = | 39 | behavioral operation | |
VpiParamAssign | = | 40 | module parameter assignment | |
VpiParameter | = | 41 | module parameter | |
VpiPartSelect | = | 42 | part-select | |
VpiPathTerm | = | 43 | terminal of module path | |
VpiPort | = | 44 | module port | |
VpiPortBit | = | 45 | bit of vector module port | |
VpiPrimTerm | = | 46 | primitive terminal | |
VpiRealVar | = | 47 | real variable | |
VpiReg | = | 48 | scalar or vector reg | |
VpiRegBit | = | 49 | bit of vector reg | |
VpiRelease | = | 50 | release statement | |
VpiRepeat | = | 51 | repeat statement | |
VpiRepeatControl | = | 52 | repeat control in an assign stmt | |
VpiSchedEvent | = | 53 | vpi_put_value() event | |
VpiSpecParam | = | 54 | specparam | |
VpiSwitch | = | 55 | transistor switch | |
VpiSysFuncCall | = | 56 | system function call | |
VpiSysTaskCall | = | 57 | system task call | |
VpiTableEntry | = | 58 | UDP state table entry | |
VpiTask | = | 59 | HDL task | |
VpiTaskCall | = | 60 | HDL task call | |
VpiTchk | = | 61 | timing check | |
VpiTchkTerm | = | 62 | terminal of timing check | |
VpiTimeVar | = | 63 | time variable | |
VpiTimeQueue | = | 64 | simulation event queue | |
VpiUdp | = | 65 | user-defined primitive | |
VpiUdpDefn | = | 66 | UDP definition | |
VpiUserSystf | = | 67 | user defined system task or function | |
VpiVarSelect | = | 68 | variable array selection | |
VpiWait | = | 69 | wait statement | |
VpiWhile | = | 70 | while statement | |
VpiAttribute | = | 105 | attribute of an object | |
VpiBitSelect | = | 106 | Bit-select of parameter, var select | |
VpiCallback | = | 107 | callback object | |
VpiDelayTerm | = | 108 | Delay term which is a load or driver | |
VpiDelayDevice | = | 109 | Delay object within a net | |
VpiFrame | = | 110 | reentrant task/func frame | |
VpiGateArray | = | 111 | gate instance array | |
VpiModuleArray | = | 112 | module instance array | |
VpiPrimitiveArray | = | 113 | vpiprimitiveArray type | |
VpiNetArray | = | 114 | multidimensional net | |
VpiRange | = | 115 | range declaration | |
VpiRegArray | = | 116 | multidimensional reg | |
VpiSwitchArray | = | 117 | switch instance array | |
VpiUdpArray | = | 118 | UDP instance array | |
VpiContAssignBit | = | 128 | Bit of a vector continuous assignment | |
VpiNamedEventArray | = | 129 | multidimensional named event | |
VpiIndexedPartSelect | = | 130 | Indexed part-select object | |
VpiGenScopeArray | = | 133 | array of generated scopes | |
VpiGenScope | = | 134 | A generated scope | |
VpiGenVar | = | 135 | Object used to instantiate gen scopes | |
VpiCondition | = | 71 | condition expression | |
VpiDelay | = | 72 | net or gate delay | |
VpiElseStmt | = | 73 | else statement | |
VpiForIncStmt | = | 74 | increment statement in for loop | |
VpiForInitStmt | = | 75 | initialization statement in for loop | |
VpiHighConn | = | 76 | higher connection to port | |
VpiLhs | = | 77 | left-hand side of assignment | |
VpiIndex | = | 78 | index of var select, bit-select, etc. | |
VpiLeftRange | = | 79 | left range of vector or part-select | |
VpiLowConn | = | 80 | lower connection to port | |
VpiParent | = | 81 | parent object | |
VpiRhs | = | 82 | right-hand side of assignment | |
VpiRightRange | = | 83 | right range of vector or part-select | |
VpiScope | = | 84 | containing scope object | |
VpiSysTfCall | = | 85 | task function call | |
VpiTchkDataTerm | = | 86 | timing check data term | |
VpiTchkNotifier | = | 87 | timing check notifier | |
VpiTchkRefTerm | = | 88 | timing check reference term | |
VpiArgument | = | 89 | argument to (system) task/function | |
VpiBit | = | 90 | bit of vector net or port | |
VpiDriver | = | 91 | driver for a net | |
VpiInternalScope | = | 92 | internal scope in module | |
VpiLoad | = | 93 | load on net or reg | |
VpiModDataPathIn | = | 94 | data terminal of a module path | |
VpiModPathIn | = | 95 | Input terminal of a module path | |
VpiModPathOut | = | 96 | output terminal of a module path | |
VpiOperand | = | 97 | operand of expression | |
VpiPortInst | = | 98 | connected port instance | |
VpiProcess | = | 99 | process in module | |
VpiVariables | = | 100 | variables in module | |
VpiUse | = | 101 | usage | |
VpiExpr | = | 102 | connected expression | |
VpiPrimitive | = | 103 | primitive (gate, switch, UDP) | |
VpiStmt | = | 104 | statement in process or task | |
VpiActiveTimeFormat | = | 119 | active $timeformat() system task | |
VpiInTerm | = | 120 | To get to a delay device‘s drivers. | |
VpiInstanceArray | = | 121 | vpiInstance arrays | |
VpiLocalDriver | = | 122 | local drivers (within a module | |
VpiLocalLoad | = | 123 | local loads (within a module | |
VpiOutTerm | = | 124 | To get to a delay device‘s loads. | |
VpiPorts | = | 125 | Module port | |
VpiSimNet | = | 126 | simulated net after collapsing | |
VpiTaskFunc | = | 127 | HDL task or function | |
VpiBaseExpr | = | 131 | Indexed part-select‘s base expression | |
VpiWidthExpr | = | 132 | Indexed part-select‘s width expression | |
VpiUndefined | = | -1 | undefined property | |
VpiType | = | 1 | type of object | |
VpiName | = | 2 | local name of object | |
VpiFullName | = | 3 | full hierarchical name | |
VpiSize | = | 4 | size of gate, net, port, etc. | |
VpiFile | = | 5 | File name in which the object is used | |
VpiLineNo | = | 6 | line number where the object is used | |
VpiTopModule | = | 7 | top-level module (boolean) | |
VpiCellInstance | = | 8 | cell (boolean) | |
VpiDefName | = | 9 | module definition name | |
VpiProtected | = | 10 | source protected module (boolean) | |
VpiTimeUnit | = | 11 | module time unit | |
VpiTimePrecision | = | 12 | module time precision | |
VpiDefNetType | = | 13 | default net type | |
VpiUnconnDrive | = | 14 | unconnected port drive strength | |
VpiHighZ | = | 1 | No default drive given | |
VpiPull1 | = | 2 | default pull1 drive | |
VpiPull0 | = | 3 | default pull0 drive | |
VpiDefFile | = | 15 | File name where the module is defined | |
VpiDefLineNo | = | 16 | line number for module definition | |
VpiDefDelayMode | = | 47 | Default delay mode for a module | |
VpiDelayModeNone | = | 1 | no delay mode specified | |
VpiDelayModePath | = | 2 | path delay mode | |
VpiDelayModeDistrib | = | 3 | distributed delay mode | |
VpiDelayModeUnit | = | 4 | unit delay mode | |
VpiDelayModeZero | = | 5 | zero delay mode | |
VpiDelayModeMTM | = | 6 | min:typ:max delay mode | |
VpiDefDecayTime | = | 48 | Default decay time for a module | |
VpiScalar | = | 17 | scalar (boolean) | |
VpiVector | = | 18 | vector (boolean) | |
VpiExplicitName | = | 19 | port is explicitly named | |
VpiDirection | = | 20 | direction of port: | |
VpiInput | = | 1 | input | |
VpiOutput | = | 2 | output | |
VpiInout | = | 3 | inout | |
VpiMixedIO | = | 4 | mixed input-output | |
VpiNoDirection | = | 5 | no direction | |
VpiConnByName | = | 21 | connected by name (boolean) | |
VpiNetType | = | 22 | net subtypes: | |
VpiWire | = | 1 | wire net | |
VpiWand | = | 2 | wire-and net | |
VpiWor | = | 3 | wire-or net | |
VpiTri | = | 4 | three-state net | |
VpiTri0 | = | 5 | pull-down net | |
VpiTri1 | = | 6 | pull-up net | |
VpiTriReg | = | 7 | tri state reg net | |
VpiTriAnd | = | 8 | three-state wire-and net | |
VpiTriOr | = | 9 | three-state wire-or net | |
VpiSupply1 | = | 10 | supply 1 net | |
VpiSupply0 | = | 11 | supply zero net | |
VpiNone | = | 12 | no default net type (1364-2001) | |
VpiUwire | = | 13 | unresolved wire net (1364-2005) | |
VpiExplicitScalared | = | 23 | explicitly scalared (boolean) | |
VpiExplicitVectored | = | 24 | explicitly vectored (boolean) | |
VpiExpanded | = | 25 | expanded vector net (boolean) | |
VpiImplicitDecl | = | 26 | implicitly declared net (boolean) | |
VpiChargeStrength | = | 27 | charge decay strength of net | |
VpiArray | = | 28 | variable array (boolean) | |
VpiPortIndex | = | 29 | Port index | |
VpiTermIndex | = | 30 | Index of a primitive terminal | |
VpiStrength0 | = | 31 | 0-strength of net or gate | |
VpiStrength1 | = | 32 | 1-strength of net or gate | |
VpiPrimType | = | 33 | prmitive subtypes: | |
VpiAndPrim | = | 1 | and gate | |
VpiNandPrim | = | 2 | nand gate | |
VpiNorPrim | = | 3 | nor gate | |
VpiOrPrim | = | 4 | or gate | |
VpiXorPrim | = | 5 | xor gate | |
VpiXnorPrim | = | 6 | xnor gate | |
VpiBufPrim | = | 7 | buffer | |
VpiNotPrim | = | 8 | not gate | |
VpiBufif0Prim | = | 9 | zero-enabled buffer | |
VpiBufif1Prim | = | 10 | one-enabled buffer | |
VpiNotif0Prim | = | 11 | zero-enabled not gate | |
VpiNotif1Prim | = | 12 | one-enabled not gate | |
VpiNmosPrim | = | 13 | nmos switch | |
VpiPmosPrim | = | 14 | pmos switch | |
VpiCmosPrim | = | 15 | cmos switch | |
VpiRnmosPrim | = | 16 | resistive nmos switch | |
VpiRpmosPrim | = | 17 | resistive pmos switch | |
VpiRcmosPrim | = | 18 | resistive cmos switch | |
VpiRtranPrim | = | 19 | resistive bidirectional | |
VpiRtranif0Prim | = | 20 | zero-enable resistive bidirectional | |
VpiRtranif1Prim | = | 21 | one-enable resistive bidirectional | |
VpiTranPrim | = | 22 | bidirectional | |
VpiTranif0Prim | = | 23 | zero-enabled bidirectional | |
VpiTranif1Prim | = | 24 | one-enabled bidirectional | |
VpiPullupPrim | = | 25 | pullup | |
VpiPulldownPrim | = | 26 | pulldown | |
VpiSeqPrim | = | 27 | sequential UDP | |
VpiCombPrim | = | 28 | combinational UDP | |
VpiPolarity | = | 34 | polarity of module path… | |
VpiDataPolarity | = | 35 | …or data path: | |
VpiPositive | = | 1 | positive | |
VpiNegative | = | 2 | negative | |
VpiUnknown | = | 3 | unknown (unspecified) | |
VpiEdge | = | 36 | edge type of module path: | |
VpiNoEdge | = | 0x00 | no edge | |
VpiEdge01 | = | 0x01 | 0 -> 1 | |
VpiEdge10 | = | 0x02 | 1 -> 0 | |
VpiEdge0x | = | 0x04 | 0 -> x | |
VpiEdgex1 | = | 0x08 | x -> 1 | |
VpiEdge1x | = | 0x10 | 1 -> x | |
VpiEdgex0 | = | 0x20 | x -> 0 | |
VpiPathType | = | 37 | path delay connection subtypes: | |
VpiPathFull | = | 1 | ( a *> b ) | |
VpiPathParallel | = | 2 | ( a => b ) | |
VpiTchkType | = | 38 | timing check subtypes: | |
VpiSetup | = | 1 | $setup | |
VpiHold | = | 2 | $hold | |
VpiPeriod | = | 3 | $period | |
VpiWidth | = | 4 | $width | |
VpiSkew | = | 5 | $skew | |
VpiRecovery | = | 6 | $recovery | |
VpiNoChange | = | 7 | $nochange | |
VpiSetupHold | = | 8 | $setuphold | |
VpiFullskew | = | 9 | $fullskew — added for 1364-2001 | |
VpiRecrem | = | 10 | $recrem — added for 1364-2001 | |
VpiRemoval | = | 11 | $removal — added for 1364-2001 | |
VpiTimeskew | = | 12 | $timeskew — added for 1364-2001 | |
VpiOpType | = | 39 | operation subtypes: | |
VpiMinusOp | = | 1 | unary minus | |
VpiPlusOp | = | 2 | unary plus | |
VpiNotOp | = | 3 | unary not | |
VpiBitNegOp | = | 4 | bitwise negation | |
VpiUnaryAndOp | = | 5 | bitwise reduction and | |
VpiUnaryNandOp | = | 6 | bitwise reduction nand | |
VpiUnaryOrOp | = | 7 | bitwise reduction or | |
VpiUnaryNorOp | = | 8 | bitwise reduction nor | |
VpiUnaryXorOp | = | 9 | bitwise reduction xor | |
VpiUnaryXNorOp | = | 10 | bitwise reduction xnor | |
VpiSubOp | = | 11 | binary subtraction | |
VpiDivOp | = | 12 | binary division | |
VpiModOp | = | 13 | binary modulus | |
VpiEqOp | = | 14 | binary equality | |
VpiNeqOp | = | 15 | binary inequality | |
VpiCaseEqOp | = | 16 | case (x and z) equality | |
VpiCaseNeqOp | = | 17 | case inequality | |
VpiGtOp | = | 18 | binary greater than | |
VpiGeOp | = | 19 | binary greater than or equal | |
VpiLtOp | = | 20 | binary less than | |
VpiLeOp | = | 21 | binary less than or equal | |
VpiLShiftOp | = | 22 | binary left shift | |
VpiRShiftOp | = | 23 | binary right shift | |
VpiAddOp | = | 24 | binary addition | |
VpiMultOp | = | 25 | binary multiplication | |
VpiLogAndOp | = | 26 | binary logical and | |
VpiLogOrOp | = | 27 | binary logical or | |
VpiBitAndOp | = | 28 | binary bitwise and | |
VpiBitOrOp | = | 29 | binary bitwise or | |
VpiBitXorOp | = | 30 | binary bitwise xor | |
VpiBitXNorOp | = | 31 | binary bitwise xnor | |
VpiBitXnorOp | = | vpiBitXNorOp | added with 1364-2001 | |
VpiConditionOp | = | 32 | ternary conditional | |
VpiConcatOp | = | 33 | n-ary concatenation | |
VpiMultiConcatOp | = | 34 | repeated concatenation | |
VpiEventOrOp | = | 35 | event or | |
VpiNullOp | = | 36 | null operation | |
VpiListOp | = | 37 | list of expressions | |
VpiMinTypMaxOp | = | 38 | min:typ:max: delay expression | |
VpiPosedgeOp | = | 39 | posedge | |
VpiNegedgeOp | = | 40 | negedge | |
VpiArithLShiftOp | = | 41 | arithmetic left shift (1364-2001) | |
VpiArithRShiftOp | = | 42 | arithmetic right shift (1364-2001) | |
VpiPowerOp | = | 43 | arithmetic power op (1364-2001) | |
VpiConstType | = | 40 | constant subtypes: | |
VpiDecConst | = | 1 | decimal integer | |
VpiRealConst | = | 2 | real | |
VpiBinaryConst | = | 3 | binary integer | |
VpiOctConst | = | 4 | octal integer | |
VpiHexConst | = | 5 | hexadecimal integer | |
VpiStringConst | = | 6 | string literal | |
VpiIntConst | = | 7 | HDL integer constant (1364-2001) | |
VpiBlocking | = | 41 | blocking assignment (boolean) | |
VpiCaseType | = | 42 | case statement subtypes: | |
VpiCaseExact | = | 1 | exact match | |
VpiCaseX | = | 2 | ignore X‘s | |
VpiCaseZ | = | 3 | ignore Z‘s | |
VpiNetDeclAssign | = | 43 | assign part of decl (boolean) | |
VpiFuncType | = | 44 | HDL function & system function type | |
VpiIntFunc | = | 1 | returns integer | |
VpiRealFunc | = | 2 | returns real | |
VpiTimeFunc | = | 3 | returns time | |
VpiSizedFunc | = | 4 | returns an arbitrary size | |
VpiSizedSignedFunc | = | 5 | returns sized signed value | |
VpiUserDefn | = | 45 | user defined system task/func(boolean) | |
VpiScheduled | = | 46 | object still scheduled (boolean) | |
VpiActive | = | 49 | reentrant task/func frame is active | |
VpiAutomatic | = | 50 | task/func obj is automatic | |
VpiCell | = | 51 | configuration cell | |
VpiConfig | = | 52 | configuration config file | |
VpiDecompile | = | 54 | decompile the object | |
VpiDefAttribute | = | 55 | Attribute defined for the obj | |
VpiDelayType | = | 56 | delay subtype | |
VpiModPathDelay | = | 1 | module path delay | |
VpiInterModPathDelay | = | 2 | intermodule path delay | |
VpiMIPDelay | = | 3 | module input port delay | |
VpiIteratorType | = | 57 | object type of an iterator | |
VpiLibrary | = | 58 | configuration library | |
VpiMultiArray | = | 59 | Object is a multidimensional array | |
VpiOffset | = | 60 | offset from LSB | |
VpiSaveRestartID | = | 62 | unique ID for save/restart data | |
VpiSaveRestartLocation | = | 63 | name of save/restart data file | |
VpiValid | = | 64 | reentrant task/func frame is valid | |
VpiModPathHasIfNone | = | 71 | Mod path has an ifnone statement | |
VpiIndexedPartSelectType | = | 72 | Indexed part-select type | |
VpiPosIndexed | = | 1 | +: | |
VpiNegIndexed | = | 2 | -: | |
VpiIsMemory | = | 73 | TRUE for a one-dimensional reg array | |
VpiStop | = | 66 | execute simulator‘s $stop | |
VpiFinish | = | 67 | execute simulator‘s $finish | |
VpiReset | = | 68 | execute simulator‘s $reset | |
VpiSetInteractiveScope | = | 69 | set simulator‘s interactive scope | |
VpiSuppressTime | = | 3 | delay structures | |
VpiHiZ | = | 0x01 | generic value | |
VpiSuppressVal | = | 13 | delay modes | |
VpiPureTransportDelay | = | 4 | force and release flags | |
VpiReleaseFlag | = | 6 | scheduled event cancel flag | |
VpiCancelEvent | = | 7 | bit mask for the flags argument to vpi_put_value() | |
VpiReturnEvent | = | 0x1000 | scalar values | |
VpiSysFunc | = | 2 | the subtypes are defined under the vpiFuncType property | |
VpiRun | = | 3 | error severity levels | |
VpiInternal | = | 5 | callback structures |
vpi_register_cb | -> | __callback__vpi_register_cb |
vpi_remove_cb | -> | __callback__vpi_remove_cb |
initialize | -> | __struct__initialize |
vpi_put_value | -> | __scheduler__vpi_put_value |
intercept all writes to VPI handles so that they can be applied later by the scheduler |
Returns the VpiCancelEvent constant: bit mask for the flags argument to vpi_put_value()
Returns the VpiSysFunc constant: the subtypes are defined under the vpiFuncType property
vpi_get_systf_info(VPI::Handle object, VPI::S_vpi_systf_data systf_data_p) returns nil
vpi_handle_by_multi_index(VPI::Handle obj, Integer num_index, Array index_array) returns VPI::Handle
vpi_handle_multi(Integer type, VPI::Handle refHandle1, VPI::Handle refHandle2, … ) returns VPI::Handle
vpi_put_value(VPI::Handle object, VPI::S_vpi_value value_p, VPI::S_vpi_time time_p, Integer flags) returns VPI::Handle
Wraps the given block inside an infinite loop and executes it inside a new concurrent process (see the VPI::process method).
Creates a new concurrent process, which will execute the given block with the given arguments, and returns it.
This is a Ruby version of the vpi_register_cb C function. It is identical to the C function, except for the following differences: