Section 18 Coverage

In 18.4 REPLACE

 

A coverage point creates a hierarchical scope and can be optionally labeled. If the label is specified, then it designates the name of the coverage point. This name can be used to add this coverage point to a cross coverage specification or to access the methods of the coverage point. If the label is omitted and the coverage point is associated with a single variable, then the variable name becomes the name of the coverage point. Otherwise, an implementation can generate a name for the coverage point only for the purposes of coverage reporting, that is, generated names cannot be used within the language.

 

WITH

 

A coverpoint declaration declares an anonymous coverpoint type and a instance variable of the anonymous type. The coverpoint variable is initialized with an instance of the coverpoint type. If specified, the  cover_point_identifier defines the name of the coverpoint variable. If the cover_point_identifier is omitted and the coverpoint expression is a simple name, the simple name defines the name of the coverpoint variable. Otherwise, an implementation may generate a name for the coverpoint variable only for the purposes of coverage reporting, that is, generated names cannot be used within the language. A non-generated coverpoint name can be used to reference the coverpoint in a cross coverage declaration or to access the methods and properties of the coverpoint.

 

In 18.5 REPLACE

 

The label for a cross declaration provides an optional name. The label also creates a hierarchical scope for the bins defined within the cross.

 

WITH

 

A cross declaration declares an anonymous cross type and a instance variable of the anonymous cross type. The cross variable is initialized with an instance of the cross type. If specified, the  cross_identifier defines the name of the cross variable. Otherwise, an implementation may generate a name for the cross variable only for the purposes of coverage reporting, that is, generated names cannot be used within the language. A non-generated cross name can be used to access the methods and properties of the cross.

 

 

In Syntax 18-4 of 18.5 and in A.2.11 REPLACE

 

[ cover_point_identifier : ] cross list_of_coverpoints [ iff ( expression ) ] select_bins_or_empty

WITH

                [ cross_identifier : ] cross list_of_coverpoints [ iff ( expression ) ] select_bins_or_empty

 

In A.9.3 ADD

 

                cross_identifier ::= identifier

 

In 18.6 MODIFY

 

The identifier option is a built-in member of any coverage group every covergroup, coverpoint and cross (see 18.9 for a description).

 

 

In 18.6.1 MODIFY

 

The identifier type_option is a built-in, static member of any coverage group every covergroup, coverpoint and cross (see 18.9 for a description).

 

In 18.9 (first paragraph) MODIFY

 

The type and type_option option and type_option members of a covergroup, coverpoint, and cross are implicitly declared structures with the following composition:

 

 

 

In 18.6 MODIFY

 

Option assignment statements in the covergroup definition are evaluated at the time that the covergroup is instantiated. The per_instance option can only be set in the covergroup definition. Other instance specific options can be set assigned procedurally after a covergroup has been instantiated. The syntax is as follows:

 

 

In 18.6 DELETE Syntax 18-5

 

coverage_option_assignment ::=                                                                      // not in Annex A

instance_name.option.option_name = expression ;

| instance_name.covergroup_item_identifier.option.option_name = expression ;

 

 

 

In 18.6.1 MODIFY

 

The strobe type option can only be set in the covergroup definition. Other type options can be set assigned procedurally at any time during simulation. The syntax is as follows:

 

In 18.6.1  DELETE Syntax 18-6

 

coverage_type_option_assignment ::=                                                           // not in Annex A

  covergroup_name::type_option.option_name = expression ;

| covergroup_name::covergroup_item_identifier::type_option.option_name = expression ;

 


In 18.6.1 (the example following Syntax 18-6) REPLACE

 

covergroup gc @(posedge clk) ;

   a : coverpoint a_var;

   b : coverpoint b_var;

endgroup

...

gc::type_option.comment = "Here is a comment for covergroup g1";

// Set the weight for coverpoint "a" of covergroup g1

gc::a::type_option.weight = 3;

gc g1 = new;

WITH

 

class MyClass;

 

  covergroup gc @(posedge clk) ;

     a : coverpoint a_var;

     b : coverpoint b_var;

  endgroup

  ...

    gc.type_option.comment = "Here is a comment for covergroup gc";

    // Set the type weight for coverpoint "a" of covergroup gc

    gc.a.type_option.weight = 3;

 

endclass

 

 

In A.2.11 and 18.2 Syntax 18-1 REPLACE

 

                | type_option.member_identifier = expression

 

WITH

 

| type_option.member_identifier = constant_expression

 

 

In 18.2 MODIFY

 

A covergroup can contain one or more coverage points. A coverage point can be cover a variable or an expression. Each coverage point includes a set of bins a …

 In 18.3 MODIFY

 

An embedded covergroup can define a coverage model for protected and local class properties without any changes to the class data encapsulation. Class members can become coverage points be used in coverpoint expressions or can be used in other coverage constructs, such as conditional guards or option initialization.

In 18.4 MODIFY

 

A covergroup can contain one or more coverage points. A coverage point can be an integral variable or specifies an integral expression that is to be covered. Each coverage point includes a set of bins associated with it’s the sampled values or its value transitions of the covered expression. The bins can be explicitly defined by the user or automatically created by SystemVerilog. The syntax for specifying coverage points is given below.