EDITOR’S NOTE: I changed “reg”
to “logic” — it seemed more appropriate in a SystemVerilog manual.
EDITOR’S NOTE: I changed “anevr” to “anvr” — to match the label
in the code above (it could be the error is in the code, and “anevr” in the the table is
correct).
Returns the number of
covered items of the given coverage type in the given instance. Coverage type
is one of the coverage type properties described in Section 29.4.2. For
example, given coverage type vpiStatementCoverage, this call would return the number of covered
statements in the instance pointed by instance_handle.
vpi_get(vpiCovered, assertion_handle)
vpi_get(vpiCovered, statement_handle)
vpi_get(vpiCovered, signal_handle)
vpi_get(vpiCovered, fsm_handle)
vpi_get(vpiCovered, fsm_state_handle)
Returns whether the item referenced by the handle has been covered. For handles that can contain multiple coverable
entities, such as statement, fsm and signal handles,
the return value indicates how many of the entities have been covered.
— For assertion handle,
the coverable entities are assertions
— For statement
handle, the entities are statements
— For signal
handle, the entities are individual signal bits
— For fsm handle, the entities are fsm
states
For assertions, vpiCovered implies
that the assertion has been attempted, has succeeded at least once and has never
failed. More detailed coverage information can be obtained for assertions by
the following queries:
EDITOR’S NOTE:
After adding the new text, example and table, the rest of this subsection seems
place. The following paragraph seems to refer to the prototypes that come
before all the new text.
Returns whether the item referenced by the handle has been covered. For handles that can contain multiple coverable
entities, such as statement, fsm and signal handles,
the return value indicates how many of the entities have been covered.
— For
assertion handle, the coverable entities are assertions
— For
statement handle, the entities are statements
— For signal
handle, the entities are individual signal bits
— For fsm handle,
the entities are fsm states
The number of times an item has been covered can be obtained by the
vpiCoveredCount property:
vpi_get(vpiCoveredCount, assertion_handle)