The request to add back the required use of the static keyword in certain cases is mantis 1556. I believe Peter Flake had an action item to address this issue after SV3.0, but he never got around to it before he retired, so the sentence got dropped. (I hear it was a short lived retirement :) http://www.eda-stds.org/svdb/bug_view_page.php?bug_id=0001556 > -----Original Message----- > From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org] On > Behalf Of Steven Sharp > Sent: Sunday, September 24, 2006 2:00 PM > To: sv-bc@server.eda.org; sv-ec@server.eda.org > Subject: [sv-ec] static variable initializers > > In section 11.6, there is text that says that variables declared in > a fork..join/join_any/join_none block shall be initialized whenever > execution enters their scope. > > This text used to say "Automatic variables" in an earlier draft, but > this changed to just "Variables" in the standard. This seems to imply > that static variables declared there would also be initialized at that > time. It is bad enough that the text just says variables, but the > actual dropping of "automatic" from the older draft really seems to > imply a change. I assume that this was a mistake, and that the word > "automatic" should be added back. Section 6.4 still says that statics > should be initialized at the start of simulation. > > The paragraph also says that reference arguments can be used in the > initialization values of variables in such blocks. This only makes > sense for initializers executed on entry. If static variables are > initialized at the start of simulation, it would make no sense for the > initializer to refer to a reference argument at that point. So that > should specify automatic variables also. > > I would also like to raise with the SV-EC another issue with static > variable initializers. There used to be a requirement inserted by the > SV-BC that a static variable with an initializer had to be declared with > an explicit "static" keyword. This requirement was deliberate, to help > avoid users becoming confused and thinking that the initializer would be > executed every time the block was entered. This confusion could easily > happen, given that identical syntax could be either a static or automatic > variable declaration, depending on context. Apparently this requirement > was removed by the SV-EC, without the SV-BC being aware of it. We need > to understand why this was done. > > Steven Sharp > sharp@cadence.comReceived on Sun Sep 24 21:23:31 2006
This archive was generated by hypermail 2.1.8 : Sun Sep 24 2006 - 21:24:03 PDT