David,
EN-30, EN-31: keep changes
made by editor. They are both good
EN-30: change from reg to logic in example.
OK
EN-31: change from anevr to anvr in table.
OK
EN-32 is a bit more
complicated and will be coming later today in a separate email.
Joao
==============================================================================
Synopsys, Inc
TEL: (508) 263-8083
I sent
it yesterday...
Joao
==============================================================================
Joao
Geada, PhD
Principal Engineer Verif Tech Group
Synopsys,
Inc
TEL: (508) 263-8083
==============================================================================
-----Original
Message-----
From: Joao
Geada [mailto:joao@synopsys.com]
Sent:
To: David
Smith
Subject: SV
LRM draft 3 EN 32
David,
below is
how section 29.4.3 should read. The specific correction is moving the paragraph
and attached
list that
is below table 29-3 all the way up such that it is immediately below the vpi_get(vpiCovered,...)
function
set.
If I am permitted a small further correction, please add the
following sentence immediately below
the
table:
"The number of times an item has been covered can be obtained
by the obtaining
the vpiCoveredCount property from a handle:"
I've taken the liberty of also inserting that sentence into the
text below (in underlined blue)
Joao
29.4.3 Obtaining coverage information
To
obtain coverage information, the vpi_get() function is extended
with additional VPI properties that can
be obtained from existing handles:
vpi_get(<coverageType>, instance_handle)
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 vpiStatement-
Coverage,
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:
vpi_get(vpiAssertAttemptCovered, assertion_handle)
Returns
the number of times the assertion has been attempted.
vpi_get(vpiAssertSuccessCovered, assertion_handle)
Returns
the number of times the assertion has succeeded non-vacuously or, if assertion
handle corresponds to a
cover sequence, the number of times the sequence
has been matched. Refer to Section 17.7.11 and 17.12 for
the definition of vacuity.
vpi_get(vpiAssertVacuousSuccessCovered, assertion_handle)
Returns
the number of times the assertion has succeeded vacuously. Refer to Section
17.7.11 and 17.12 for the
definition of vacuity.
vpi_get(vpiAssertFailureCovered, assertion_handle)
Returns
the number of times the assertion has failed. For any assertion, the number of
attempts that have not
yet reached any conclusion (success or failure)
can be derived from the formula:
in progress = attempts - (successes +
vacuous success + failures)
The
example below illustrates some of these queries:
module covtest;
bit on = 1, off = 0;
reg logic clk;
initial begin
clk = 0;
forever begin
#10;
clk = ~clk;
end
end
always @(false) begin
anvr: assert(on ##1 on); // assertion will not be attempted
end
always @(posedge clk) begin
aundf: assert (on ##[1:$] off); // assertion will not pass or fail
afail: assert (on ##1 off); // assertion will always fail on 2nd tick
apass: assert (on ##1 on); // assertion will succeed on each attempt
end
endmodule
For
this example, the assertions will have the following coverage results:
Table
29-3
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)
vpi_get(vpiCoveredCount, statement_handle)
vpi_get(vpiCoveredCount, signal_handle)
vpi_get(vpiCoveredCount, fsm_handle)
vpi_get(vpiCoveredCount, fsm_state_handle)
==============================================================================
Joao
Geada, PhD
Principal Engineer Verif Tech Group
Synopsys,
Inc
TEL: (508) 263-8083
==============================================================================