Subject: [sv-cc] Updated Coverage errata
From: Joao Geada (Joao.Geada@synopsys.com)
Date: Wed Nov 26 2003 - 12:58:03 PST
######################################################################
* section 28.2.1, "Predefined coverage constants in SystemVerilog", page 256
replace SV_COV_QUERY define with SV_COV_CHECK
before:
-- Coverage control
`define SV_COV_START 0
`define SV_COV_STOP 1
`define SV_COV_RESET 2
`define SV_COV_QUERY 3
after:
-- Coverage control
`define SV_COV_START 0
`define SV_COV_STOP 1
`define SV_COV_RESET 2
`define SV_COV_CHECK 3
######################################################################
* section 28.2.2.1, "$coverage_control", page 257.
clarify behavior of coverage control options
before:
This function enables, disables, resets or queries the availability of
coverage information for the specified portion of the hierarchy.
after:
This function is used to control or query coverage availability in the specified
portion of the hierarchy. The following control options are available:
`SV_COV_START
If possible, starts collecting coverage information in the specified
hierarchy. No effect if coverage is already being collected. Note that
coverage is automatically started at the beginning of simulation for
all portions of the hierarchy enabled for coverage.
`SV_COV_STOP
Stops collecting coverage information in the specified
hierarchy. No effect if coverage is not being collected.
`SV_COV_RESET
Resets all available coverage information in the specified
hierarchy. No effect if coverage not available.
`SV_COV_CHECK
Checks if coverage information can be obtained from the specified
hierarchy. Note the possibility of having coverage information does
imply that coverage is being collected, as the coverage could have been
stopped.
The return value is a `defined name, with the value indicating the success
of the action.
`SV_COV_OK
On a check operation, denotes that coverage fully available in the
specified hierarchy. For all other operations, represents successfull
and complete execution of the desired operation.
`SV_COV_ERROR
On all operations, means that the control operation failed
without any effect, typically due to errors in arguments, such as
a non-existing module.
`SV_COV_NOCOV
On a check or start operation, denotes that coverage is not
available at any point in the specified hierarchy.
`SV_COV_PARTIAL
On a check or start operation, denotes that coverage is only
partially available in the specified hierarchy.
The table below describes the possible return values for each of the
coverage control options:
-------------+-------------+--------------+--------------+----------------+
| SV_COV_OK | SV_COV_ERROR | SV_COV_NOCOV | SV_COV_PARTIAL |
-------------+-------------+--------------+--------------+----------------+
SV_COV_START | success | bad args | no coverage |partial coverage|
SV_COV_STOP | success | bad args | - | - |
SV_COV_RESET | success | bad args | - | - |
SV_COV_CHECK |full coverage| bad args | no coverage |partial coverage|
-------------+-------------+--------------+--------------+----------------+
######################################################################
* section 28.2.2.5, "$coverage_save", page 260
correct description of "name" argument
before:
This function saves the current state of coverage to the tool's
coverage database and associates it with the file named name. This
file name shall not contain any directory specification or extensions.
after:
This function saves the current state of coverage to the tool's
coverage database and associates it with the given name. This name
will be mapped in an implementation-specific way into some file or set
of files in the coverage database.
######################################################################
* section 28.3.2, "Specifying the part-select that holds the current state", page 261
first paragraph, replace all occurrences of "cmView" with "coverage tool"
before:
A part-select of a vector signal can be used to hold the current state
of the FSM. When cmView displays or reports FSM coverage data, it
names the FSM after the signal that holds the current state. If a
part-select holds the current state in the user's FSM, the user needs
to also specify a name for the FSM that cmView can use.
after:
A part-select of a vector signal can be used to hold the current state
of the FSM. When a coverage tool displays or reports FSM coverage
data, it names the FSM after the signal that holds the current
state. If a part-select holds the current state in the user's FSM, the
user needs to also specify a name for the FSM for the coverage tool to use.
######################################################################
* section 28.4.3, "Obtaining coverage information", page 264
extend description of assertion coverage to address all the coverage
properties available with assertions
before:
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 28.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)
after:
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 28.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)
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)
vpi_get(vpiAssertSuccessCovered, assertion_handle)
vpi_get(vpiAssertFailureCovered, assertion_handle)
which respectively indicate that the assertion has been attempted,
succeeded or failed at least once. Note that an assertion can only
succeed or fail if it has been attempted at least once and it is
possible for any given assertion to both succeed and fail numerous
times in a single simulation run. Consider the following example:
module covtest;
bit on = 1, off = 0;
reg clk;
initial begin
clk = 0;
forever begin
#10;
clk = ~clk;
end
end
always @(false) begin
never: assert(on ##1 on); // this assertion will never be attempted
end
always @(posedge clk) begin
try: assert (on ##[1:$] off); // assertion will not terminate
fail: assert (on ##1 off); // assertion will always fail on 2nd tick
pass: assert (on ##1 on); // assertion will succeed on each attempt
end
endmodule
For this example, the assertions will have the following coverage results:
-----+------------+-------------------------+-------------------------+-------------------------+
| vpiCovered | vpiAssertAttemptCovered | vpiAssertSuccessCovered | vpiAssertFailureCovered |
-----+------------+-------------------------+-------------------------+-------------------------+
never| false | false | false | false |
try | false | true | false | false |
fail | false | true | false | true |
pass | true | true | true | false |
-----+------------+-------------------------+-------------------------+-------------------------+
==============================================================================
Joao Geada, PhD Principal Engineer Verif Tech Group
Synopsys, Inc TEL: (508) 263-8083
377 Simarano Drive, Suite 300, FAX: (508) 263-8069
Marlboro, MA 01752, USA
==============================================================================
This archive was generated by hypermail 2b28 : Wed Nov 26 2003 - 12:59:21 PST