RE: [sv-ec] Query on get_coverage()

From: Swapnajit Chakraborti <swapnaj_at_.....>
Date: Mon Sep 01 2008 - 22:19:19 PDT
Hi Saurabh,

Thanks for your explanation. So, as per your interpretation,
cgi.get_coverage() would return type coverage and not instance coverage.
That's exactly what I want to clarify. Typically, when somebody uses
instance e.g. cgi with a method, the expectation is that the method has
something to do with instance and not the type. 

Does, anybody has some other comment regarding this?

Regds,
Swapnajit

-----Original Message-----
From: Saurabh Sharma 
Sent: Tuesday, September 02, 2008 10:26 AM
To: Swapnajit Chakraborti
Cc: sv-ec@eda.org
Subject: Re: [sv-ec] Query on get_coverage()

Hi Swapnajit,

As stated in the text quoted get_coverage() is a static method.

In the case when it is called on covergroup instance i.e
cgi.get_coverage();

Applying the OOPS concepts it should return the cumulative coverage of
the Type of covergroup Instance on which it is invoked.

Thanks
Saurabh

Swapnajit Chakraborti wrote:

> Please note the following excerpt from P1800-2009, draft6:
>  
> "The get_coverage() method returns the cumulative (or type) coverage, 
> which considers the contribution of all instances of a particular 
> coverage item; and it is a static method that is available on both 
> types (via the
> :: operator) and instances (using the . operator). In contrast, 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."
>  
> The above para mentions that get_coverage() can be used with 
> covergroup instance also. So, in the following example, would both 
> get_coverage() and get_inst_coverage() report same numbers? If they 
> are same, what is the justification of allowing get_coverage() for 
> instances?
>  
> cg cgi = new;
> cgi.get_coverage();
> cgi.get_inst_coverage();
>  
> Thx,
> Swapnajit
>
> --
> This message has been scanned for viruses and dangerous content by 
> *MailScanner* <http://www.mailscanner.info/>, 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 Mon Sep 1 22:20:07 2008

This archive was generated by hypermail 2.1.8 : Mon Sep 01 2008 - 22:20:21 PDT