Jonathan, The answer depends on how one triggers the data sampling. If sampling is done by explicit calls to the sample method then data collection stops as soon as the object becomes unreachable (you can't call it's sample method anymore). If the covergroup defines a coverage event then coverage will stop at some unspecified time when the object is garbage collected. To avoid over-collecting data in such situations, it is a good practice to explicitly call the stop method just prior to setting the reference to null. Arturo -----Original Message----- From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On Behalf Of Jonathan Bromley Sent: Monday, May 15, 2006 2:35 PM To: sv-bc@server.eda.org Subject: [sv-bc] for sv-ec: Persistence of covergroup instances I tried to send this to sv-ec but don't seem to be able to post anything there, so I wonder if someone who uses both sv-bc and sv-ec could kindly forward it for me? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If a tree falls in the forest... Suppose I have a class that instantiates a covergroup. I then instantiate an object of the class type, and so get an instance of the covergroup in it. The covergroup begins to collect data. I have exactly one reference to this object. Suppose I now set the reference to null. When does coverage data collection stop? I can't find an answer in the LRM. Reasonable answers include: 1) At some unspecified time in the future when the object is garbage-collected. 2) Never; the fact that the object contains a covergroup means that there's an implicit reference to it and it will not be garbage collected. 3) As soon as the object becomes unreachable, i.e. at the time when I set to null the only reference to it. Can some kind person tell me what I've missed? -- Jonathan Bromley, Consultant DOULOS - Developing Design Know-how VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK Tel: +44 (0)1425 471223 Email: jonathan.bromley@doulos.com Fax: +44 (0)1425 471573 Web: http://www.doulos.com This e-mail and any attachments are confidential and Doulos Ltd. reserves all rights of privilege in respect thereof. It is intended for the use of the addressee only. If you are not the intended recipient please delete it from your system, any use, disclosure, or copying of this document is unauthorised. The contents of this message may contain personal views which are not the views of Doulos Ltd., unless specifically stated.Received on Mon May 15 09:54:04 2006
This archive was generated by hypermail 2.1.8 : Mon May 15 2006 - 09:54:10 PDT