Doug, By "implicit process" I meant a process that is not explicitly initiated by user code, such as a continuous assign. I consider a fork/join (in any flavor) as an explicit process, regardless of whether it happens in a constructor or some other task. I strongly disagree with the your new wording, in particular the restriction on fork/join_* in any procedural code within the package. That restriction would make it illegal to write any kind of monitor or time-consuming transactor in a package. Are you really suggesting we disallow something like: package p; event ev; task wait_for_ev(); @ev; endtask endpackage Your suggested wording does remove the ambiguity, but it might render packages useless for many applications. Ultimately, I don't understand if there's even a problem with code residing in packages creating processes. Is there a problem? I'd be happy to write a proposal to reword the paragraph, but I'd like to understand the issues. Arturo -----Original Message----- From: Warmke, Doug [mailto:doug_warmke@mentor.com] Sent: Tuesday, May 16, 2006 7:50 AM To: Arturo Salz; Rich, Dave; Brad Pierce; sv-ec@eda.org Subject: RE: [sv-ec] RE: [sv-bc] Final blocks in packages Arturo, The LRM doesn't mention the term "implicit process". By that, do you mean a dynamic process created in the class constructor code? If so, I think the LRM already covers this, although it could be worded better. From 19.2: Packages must not contain any processes. Therefore, wire declarations with implicit continuous assignments are not allowed. This could be changed to: Packages shall not contain any processes, whether static or dynamic. Therefore the use of any continuous assignment (whether implicit or explicit) is not allowed. Neither is the use of fork/join_none or fork/join_any in procedural code declared in a package. In a certain way I don't like the detailing in the last two sentences, since it's not strictly necessary, and might be construed as an inclusive list of forbidden constructs. However, in the absence of those sentences I could see potential ambiguity, so I prefer to have them than not have them. Note that since packages can't include hierarchical references to any non-package items, the final sentence is sufficient to forbid all dynamic process creation by any code executed from within a package. If someone wants to take a swag at writing a better version of this paragraph, I would turn it into a proposal and submit a Mantis item for it. Note that I'd still like to see final blocks in packages as an exception to this rule, for the reasons mentioned in http://www.eda.org/sv-bc/hm/4421.html. Regards, Doug > -----Original Message----- > From: owner-sv-ec@server.eda.org > [mailto:owner-sv-ec@server.eda.org] On Behalf Of Arturo Salz > Sent: Monday, May 15, 2006 2:06 PM > To: Rich, Dave; Brad Pierce; sv-ec@server.eda.org > Subject: RE: [sv-ec] RE: [sv-bc] Final blocks in packages > > Dave is correct. The LRM allows any type data of initialization in > packages. It does not distinguish class constructors from any > other type > of function. The LRM does disallow processes within packages, but the > language is unclear since it does not specify what "contain a process" > means. Does it mean a task containing statements that can fork off a > process, or does it mean implicitly initializing a process --- as, for > example, described by the following sentence regarding continuous > assignments. Prohibiting any sort of process from within a package may > be too restrictive and perhaps arbitrary. This language is in need of > clarification. > > As for Doug's original question, initializing class variables in > packages is definitely useful, though most of the time the objects are > not created --- instead, they are initialized to null. There are some > uses for starting processes from within a class; typically > some sort of > monitor. But that type of implicit process creation is rare because > typically tests exhibit other order dependencies --- e.g., the > environment and configuration must be initialized first. Usually, > transactors are started under explicit user control. > Therefore, I think > that a restriction to disallow implicit process creation with packages > is not a bad thing at this time. As Doug wrote, if we discover a use > model that requires such a feature, we can consider relaxing this > restriction. > > Arturo > > -----Original Message----- > From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of > Rich, Dave > Sent: Monday, May 15, 2006 1:25 PM > To: Brad Pierce; sv-ec@eda.org > Subject: [sv-ec] RE: [sv-bc] Final blocks in packages > > 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 Thu May 18 23:03:10 2006
This archive was generated by hypermail 2.1.8 : Thu May 18 2006 - 23:03:32 PDT