Shalom, > next() is defined for enum variables, not enum constants. I guess you're right, but this is indeed a severe, unnecessary and irritating restriction. Just imagine if "+" were not defined over integer constants but only variables... parameter n_bits = 8; logic [n_bits-1:0]; // oops, can't do that but now it seems we have typedef enum {A,B,C} E; parameter E mode = B; initial $display (mode.name()); // can't do that :-( parameter next_mode = B.next(); // nor that :-( System functions echoing the methods' behaviours would be just as good, if there's some implementation difficulty about applying methods to things that aren't variables. Users could write constant functions, but that seems unfortunate. -- 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 Fri Feb 8 07:57:40 2008
This archive was generated by hypermail 2.1.8 : Fri Feb 08 2008 - 07:59:48 PST