Re: [sv-ec] RE: [sv-bc] Query related to method 'get_inst_coverage()'

From: David Scott <david_scott_at_.....>
Date: Thu May 31 2007 - 16:53:03 PDT
Strictly speaking, the latest LRM offers a clarification on this:

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 your case, "cov" is the name of the covergroup variable, and the covergroup type name is not accessible.  This implies that "cov::" should not work for access to the built-in static methods like get_coverage().

This is a significant change to IEEE Std 1800-2005.

Dave


Warmke, Doug wrote:
Sandeep,

The LRM states that for such a covergroup embedded in a class,
there is automatically one instance created, whose name is
identical to the covergroup name.

Thus the call to "cov.get_inst_coverage()" is legal in your example.

Regards,
Doug

  
-----Original Message-----
From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org]
    
On Behalf Of Sandeep Dasgupta
  
Sent: Thursday, May 31, 2007 6:14 AM
To: sv-ac@server.eda-stds.org; sv-bc@server.eda-stds.org;
    
sv-ec@server.eda-stds.org
  
Cc: Sandeep Dasgupta
Subject: [sv-bc] Query related to method 'get_inst_coverage()'

Hi,

I have the following three queries for your kind consideration,

1.Consider the test case,
    module A  ;
    class B;
          covergroup cov;
          endgroup
         function void fun(  );
            if(  cov.get_inst_coverage > 0 ) begin
            end
        endfunction
    endclass
    endmodule

As per IEEE Std 1800-2005, section 18.7,
The coverage method get_inst_coverage is not a static method .
"the get_inst_coverage() method returns the coverage of the specific
instance on which it is invoked; thus, it can  only be invoked via the
    
.
  
operator."
But in the above case it has been invoked on a covergroup, cov. So it
seems to violate the LRM.
But most of the simulators let the test case  pass.So please suggest
what would be the ideal behaviour.

Thanks and Regards,
Sandeep Dasgupta.



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
    


  


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean. Received on Thu May 31 16:53:35 2007

This archive was generated by hypermail 2.1.8 : Thu May 31 2007 - 16:53:48 PDT