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 07:43:52 2007
This archive was generated by hypermail 2.1.8 : Thu May 31 2007 - 07:44:12 PDT