[sv-ec] Proposal for 1279, clarify covergroup, coverpoint and cross visibility

From: Ryan, Ray <Ray_Ryan_at_.....>
Date: Thu Apr 06 2006 - 15:47:22 PDT
The attached proposal for Mantis #1279 attempts to clarify the
declaration of a coverpoint or cross. Similar to the resolution of #1239
regarding embedded covergroups, this proposal defines a coverpoint or
cross declaration as declaring both
  - an anonymous type
  - and an instance variable of anonymous type. 
The name in the coverpoint or cross declaration is applied to the
instance variable.

With this definition, the visablility issues raised (in the errata
description) can be resolved using the regular verilog name resolution.
For the example in the errata:

    module mod;
        reg A, B, C;
        class CT;
            reg C;
            covergroup Cx;	// cannot be 'C' - already exists in
'CT'
                B : coverpoint A;	// declares anonymous type
covering mod.A
                                    // declares coverpoint var 'B' in
'Cx'
                coverpoint C;		// declares anonymous type
covering C in CT
						// declares coverpoint
var 'C' in 'Cx' 
                D : coverpoint A iff B;	// Illegal since 'B' is a
coverpoint.
            endgroup

            function new();
                Cx = new; // assign implicit covergroup var 'Cx'
            endfunction

            int A = A;
            int Z1 = C;
            int Z2 = Cx.option.weight;	// Invalid initializer (Cx is
NULL)
            int Z3 = Cx::type_option.weight;	// Illegal, 'Cx' is not
a type name
        endclass

        covergroup Bx;		// cannot be 'B' - already exists in
'mod'
            B : coverpoint B;	// declares anonymous type covering
'mod.B'
					// declares coverpoint var 'B'
in 'Bx'
        endgroup

        reg Y = C;

    endmodule

The proposal also avoids issues regarding the use of coverpoint or cross
types in other contexts. By making these anonymous types, is is clear
there is no other usage.

The proposal also removes the special psuedo-syntax descriptions for
accessing the 'option' and 'type_option' properties. These built-in
members of covergroup, coverpoint and cross types can be accessed using
the existing verilog syntax.


Ray

Received on Thu Apr 6 15:47:34 2006

This archive was generated by hypermail 2.1.8 : Thu Apr 06 2006 - 15:47:40 PDT