[sv-cc] Updated coverage errata 12/5/2003


Subject: [sv-cc] Updated coverage errata 12/5/2003
From: Joao Geada (Joao.Geada@synopsys.com)
Date: Fri Dec 05 2003 - 08:34:41 PST


Coverage errata update as of 12/5/2003

######################################################################
* 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)
     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 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:

-----+------------+-------------------------+-------------------------+-------------------------+
     | vpiCovered | vpiAssertAttemptCovered | vpiAssertSuccessCovered | vpiAssertFailureCovered |
-----+------------+-------------------------+-------------------------+-------------------------+
anevr| false | false | false | false |
aundf| false | true | false | false |
afail| false | true | false | true |
apass| 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 : Fri Dec 05 2003 - 08:36:20 PST