Stu, > A question just came up in a class that I'm teaching as to > why we have not added a .size method to fixed size arrays. We already have something of a farrago with the assorted method and systf syntax for various built-in things. Any change at this stage would likely open a big can of worms. If we allow fixed_size_array.size(), then why not .increment(), .left() and so forth? What would happen if you have a packed struct with a member called "size"? (Is that legal?) The packed struct is also a vector, so presumably it has a size... Method-like syntax has the benefit that it reduces pollution of the systf namespace and consequent risk of collision with user-defined PLI names. Apart from that, it is just a different way of writing a function call. Take your pick at the Alice's Restaurant that is SystemVerilog. -- Jonathan Bromley, Consultant DOULOS - Developing Design Know-how VHDL * Verilog * SystemC * e * 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 Web: http://www.doulos.com The contents of this message may contain personal views which are not the views of Doulos Ltd., unless specifically stated. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Mar 27 07:44:50 2008
This archive was generated by hypermail 2.1.8 : Thu Mar 27 2008 - 07:46:08 PDT