Re: [sv-bc] Constant method calls

From: Steven Sharp <sharp_at_.....>
Date: Fri Feb 08 2008 - 17:26:05 PST
>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 17:26:38 2008

This archive was generated by hypermail 2.1.8 : Fri Feb 08 2008 - 17:27:14 PST