Jonathan, the hiding of the parameters is something that I did not address. I put a ballot comment for that issue that we dicussed at the EC meeting and we decided to put if off. My ballot comment was that localparams could be further qualified as local or protected. That is an enhancement to my proposal of 2575. It is surely something that can be added later to do what you describe. For now, since currently unqualified, all parameters are public. Note that the difference between localparams and parameters of a module is that localparams cannot be overriden by a module instantiation or a class specialization. In addition to that, localparams could be qualified as local or protected so that their access from outside the class where they are defined can be limited. Francoise ' -----Original Message----- From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of jonathan.bromley@doulos.com Sent: Wednesday, May 06, 2009 4:49 AM To: sv-ec@eda.org Subject: RE: [sv-ec] Definition of access for class parameters. [Gord] > I don't see any reason to limit access to value parameters via ".". [Arturo] > I appreciate what you're saying, but allowing parameters does create > several subtle issues that don't exist with const properties. For > example, a parameter cannot be passed by reference [...] Originally I was very much in favour of "handle.param" access to value parameters, but Arturo's argument about pass-by-ref seems to me to be compelling. Users who want to read parameter values via a handle can easily clone the parameter into a const or static const member. I also agree with Arturo that users will find it simpler to understand and remember the rule that class parameters (of any kind) must be accessed using ::. I'm also (again speaking as a user) slightly disappointed to see the proposal making all class [local]parameters be public. I can easily imagine a situation where I want to create some localparam in a class (so that I can use it to size arrays) but don't want client code to see it. On the other hand, this is something that could be added as an extension later, and it certainly isn't a show-stopper. Thanks -- Jonathan Bromley Consultant Doulos - Developing Design Know-how VHDL * Verilog * SystemVerilog * SystemC * PSL * Perl * Tcl/Tk * Project Services Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK Tel: + 44 (0)1425 471223 Email: jonathan.bromley@doulos.com Fax: +44 (0)1425 471573 http://www.doulos.com ------------------------------------------------------------------------ -------- Doulos Ltd is registered in England and Wales with company no. 3723454 Its registered office is 4 Brackley Close, Bournemouth International Airport, Christchurch, BH23 6SE, UK. This message may contain personal views which are not the views of Doulos, unless specifically stated. -- 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 Wed May 6 07:35:18 2009
This archive was generated by hypermail 2.1.8 : Wed May 06 2009 - 07:35:51 PDT