Hi Steven, Even 'e' is a constant like parameter - parameter enum {A, B, C} e = A; then also I think 'next' should not be a constant, because the result will depend on the no. of call which is not constant. What do you think? Regards Surya -------- Original Message -------- Subject: Re:[sv-bc] Constant method calls From: Steven Sharp <sharp@cadence.com> To: Greg.Jaxon@synopsys.com, spsaha@cal.interrasystems.com Cc: sharp@cadence.com, sarani@cal.interrasystems.com, sv-bc@eda.org, sv-ec@eda.org Date: Saturday, February 09, 2008 6:56:05 AM >> From: Surya Pratik Saha <spsaha@cal.interrasystems.com> >> > > >> module top; >> enum {A, B, C} e; >> initial begin >> for (int i = 0; i < e.next(); i ++) begin:b >> reg[e.next(): 0] r; >> end >> end >> endmodule >> > > Surya, e.next cannot be a constant expression because e is not a > constant. The case that could possibly be allowed would be something > like A.next, whose result would be the constant B (if it is legal to > apply an enum method to an enum literal, which is unclear). > > Steven Sharp > sharp@cadence.com > > > > > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Fri Feb 8 22:10:16 2008
This archive was generated by hypermail 2.1.8 : Fri Feb 08 2008 - 22:10:45 PST