Francoise Martinolle wrote: > The LRM does not say explicitly that declarations such as constraints, > covergroups > of a base class are visible in the derived class. A class property is > (in the syntax) > a data_declaration. So all data declarations including type declarations > are inherited but what > about other declarations? > > > class Packet; > typedef int t1; > localparam p1; > covergroup cg1; > endcovergroup > constraint ct1...; > class innerclassPacket; > endclass > endclass > > class LinkedPacket extends Packet; > t1 x; // ok > localparam p2 = p1; // can you refer to p1? > // can you refer to cg1, ct1 and innerclassPacket here? > > endclass > > The LRM section 8.12 says: > > "Now, all of the methods and class properties of Packet are part of > LinkedPacket (as if they were defined > in LinkedPacket), and LinkedPacket has additional class properties and > methods." My opinion is that any declaration in the base type is visible in the derived type. However, I'm not sure how well that plays with the assertions constructs. I am pretty sure it is sound for covergroups. > By the way data_declaration allows for package imports and I thought we > disallowed package imports > inside class declarations. So there should be a note specifying this or > we need to change > the production of class_property to list all of data declarations items > except the package import. Yes, that is Mantis 1609. That was passed at EC but failed (with one negative) on a Champions email ballot. At the last meeting EC modified the proposal's form slightly to account for the feedback and re-approved 1609. That should come up for approval at the next Champions meeting. Gord -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Sat Sep 8 08:42:31 2007
This archive was generated by hypermail 2.1.8 : Sat Sep 08 2007 - 08:42:44 PDT