The original intent was that all modules were nested modules, and the top level module was called $root. Nested modules were also a way to deal with the problems of having a global module namespace in Verilog-1995. Now that $root has disappeared as a declarative scope, and configuration libraries in V2001 have addressed the issues of global module namespaces, I see no reason for using nested modules. Dave > -----Original Message----- > From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On > Behalf Of Bresticker, Shalom > Sent: Monday, December 03, 2007 10:37 PM > To: Steven Sharp; sv-bc@server.eda.org > Subject: RE: [sv-bc] Hierarchical resolution in nested modules > > I did not found anything about it. Nested modules are from Superlog, > though. > > I did find another issue about nested modules. > > I had asked whether it was legal to instantiate a nested module before > its definition. > Dave Rich said yes (http://www.eda-stds.org/sv-bc/hm/4854.html). Steven > Sharp questioned that (http://www.eda-stds.org/sv-bc/hm/4857.html). > > I found such an example in the SV 3.1a LRM (Section 18.5): > > module m3(...); > m1 i1(...); // instantiates the local m1 declared below > m2 i4(...); // instantiates m2 - no local declaration > module m1(...); ... endmodule // nested module declaration, > // m1 module name is in m3's name space > endmodule > > However, this example was removed in 1800-2005. I don't know why. > > Shalom > > > > > >It is not even clear from the LRM that it is legal to instantiate a > > >nested module from a scope which is lexically nested within > > the scope > > >where the nested module is declared. I don't object to it, > > but the LRM > > >does not make it clear that it is allowed. > > > > An intermediate interpretation of that text would be that it > > is legal, but names cannot be bound lexically to the outer > > module in that case. > > > > Whether it is illegal, legal but cannot bind lexically, or > > legal but binds from the point of instantiation, the text > > does not appear to support Gord's interpretation. > > > > Does someone know the original intent? > --------------------------------------------------------------------- > Intel Israel (74) Limited > > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). Any review or distribution > by others is strictly prohibited. If you are not the intended > recipient, please contact the sender and delete all copies. > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Dec 3 23:57:46 2007
This archive was generated by hypermail 2.1.8 : Mon Dec 03 2007 - 23:58:18 PST