Arturo, [does a covergroup instance go on collecting data even after its parent object has become unreachable?] > 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. Thanks, that makes very good sense. However, I find it faintly troubling. Coverage is just one way in which an object can have side-effects even when it's unreachable; I can think of a few others, and doubtless you can think of many more. I don't recall seeing any discussion of this in the LRM, and it's potentially a serious "gotcha!". (Usual caveat: please forgive me if it's there and I simply haven't noticed it.) And in the absence of any specific rules in the LRM, it *could* be argued that an object that has side-effects (by reaching into other parts of the simulation) should never be garbage collected, precisely because of those side-effects. -- 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 10:06:59 2006
This archive was generated by hypermail 2.1.8 : Mon May 15 2006 - 10:07:07 PDT