Responding to just sv-ec to keep the traffic down, I talked with Doug earlier today and we came to the conclusion that calling a constructor is no different than initializing any kind of variable with a function call, all of which is currently legal. What's currently illegal in a package is anything within the language that creates a thread. The PLI, of course, can do lots of things that can't be done through the source text. Dave > -----Original Message----- > From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On > Behalf Of Brad Pierce > Sent: Monday, May 15, 2006 12:40 PM > To: sv-ec@server.eda.org > Cc: sv-bc@server.eda.org > Subject: Re: [sv-bc] Final blocks in packages > > Doug, > > Is it legal today to initialize class variables in a package scope? > > -- Brad > > -----Original Message----- > From: Warmke, Doug [mailto:doug_warmke@mentor.com] > Sent: Monday, May 15, 2006 7:57 AM > To: Vreugdenhil, Gordon; Brad Pierce > Cc: sv-bc@eda.org > Subject: RE: [sv-bc] Final blocks in packages > > Hi all, > > One question that has come to my mind during this debate: > > How useful do folks feel it would be to allow the initialization > of class variables declared in package scope? > > I can personally envision some uses of that construct. > But I'm wondering if other people are already using it > or are planning on using it? If it turns out to be a very > useful or high demand feature, it will be worth investing > some time into exploring "threads in packages" more deeply. > > If folks don't care about it too much, then we should lower the > priority on the discussion. > > One thing to watch out for, though, is letting the barn door open > too early. If some implementations do allow the use of "new" in > package VDA's, then we will likely have to deal with all this at > some point in the future, and it could be thorny. > > Regards, > Doug > > > > > -----Original Message----- > > From: owner-sv-bc@server.eda.org > > [mailto:owner-sv-bc@server.eda.org] On Behalf Of Vreugdenhil, Gordon > > Sent: Wednesday, May 10, 2006 10:15 AM > > To: Brad Pierce > > Cc: sv-bc@server.eda.org > > Subject: Re: [sv-bc] Final blocks in packages > > > > > > > > Brad Pierce wrote: > > > > > Do variable declaration assignments in a package occur only if the > > > variable is imported? > > > > > > If the "variable" is imported? No - that would be far to fine a > > granularity to handle. Package dependencies are determined > > at the "package" level -- as far as I am concerned, if a package > > is used in the design (referenced in an import or included via > > some other vendor mechanism) then all of its initializations > > occur. A reference to the package is sufficient -- no actual > > import needs to occur. Obviously, as with any declaration, if the > > effect of the initialization is not observable in the design, > > an implementation can optimize such initialization away. > > > > > > Gord. > > > > > > > > > > > > > > > > -- Brad > > > > > > > > > > > > > > -------------------------------------------------------------- > > ---------- > > > > > > From: Rich, Dave [mailto:Dave_Rich@mentor.com] > > > Sent: Tuesday, May 09, 2006 6:40 PM > > > To: Brad Pierce; sv-bc@eda.org > > > Subject: RE: [sv-bc] Final blocks in packages > > > > > > > > > > > > Does someone have to import the package or refer to an item > > in a packed > > > for the final block to execute? I would think so; otherwise > > it would be > > > difficult to manage the exclusion of packages that you did > > not want to > > > execute. > > > > > > > > > > > > Independently of whether final blocks in packages are a > > "good idea", I > > > don't think it is a priority worth discussing right now. > > > > > > > > > > > > Dave > > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------- > > ---------- > > > > > > From: owner-sv-bc@server.eda.org > > [mailto:owner-sv-bc@server.eda.org] On > > > Behalf Of Brad Pierce > > > Sent: Tuesday, May 09, 2006 6:29 PM > > > To: sv-bc@server.eda.org > > > Subject: Re: [sv-bc] Final blocks in packages > > > > > > > > > > > > Following up on http://www.eda.org/sv-bc/hm/4421.html , > > does any extra > > > text need to be added to explain how final blocks in > > packages execute? > > > > > > > > > > > > In my opinion, no. I think it would be sufficient for a > > proposal only > > > to add final blocks to the 19.2 list of items that can be > > shared via > > > packages and in the BNF to move "final_construct" out of > > its current > > > locations and into "package_or_generate_item_declaration". > > > > > > > > > > > > Independently of whether final blocks in packages is a > > "good idea", does > > > the above seem like a sufficient way to modify the LRM if it were? > > > > > > > > > > > > -- Brad > > > > > > > > > > > > > > > > > > > > > > > > > -- > > -------------------------------------------------------------------- > > Gordon Vreugdenhil 503-685-0808 > > Model Technology (Mentor Graphics) gordonv@model.com > >Received on Mon May 15 13:25:02 2006
This archive was generated by hypermail 2.1.8 : Mon May 15 2006 - 13:25:09 PDT