Section 18.3 Using covergroup in classes


REPLACE

 

When a covergroup is defined within a class and no explicit variables of that covergroup are declared in

the class, then a variable with the same name as the coverage group is implicitly declared, e.g, in the above

example, a variable cov1 (of the embedded coverage group) is implicitly declared. Whether the coverage

group variable is implicitly or explicitly declared, each class contains exactly one variable of each embedded

coverage group. Each embedded coverage group thus becomes part of the class, tightly binding the class

properties to the coverage definition. Declaring multiple variables of the same embedded coverage group

shall result in a compiler error.

WITH

A covergroup declaration within a class is an embedded covergroup declaration. An embedded covergroup declaration declares an anonymous covergroup type and an instance variable of the anonymous type. The covergroup_identifier defines the name of the instance variable. In the above example, a variable cov1 (of the anonymous coverage group) is implicitly declared.

 

 

Section 18.2  - Syntax 18-1—Covergroup syntax

REPLACE

| [ covergroup_variable_identifier ] = new [ ( list_of_arguments ) ]15

 

WITH

|  covergroup_variable_identifier  [ = new [ ( list_of_arguments ) ] ]

 

 

DELETE note 15

 

15. It shall be legal to omit the covergroup_variable_identifier from a covergroup instantiation is within a class that has no other instantiation of the covergroup.