RE: [sv-bc] When are constant expressions evaluated?

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Sun Feb 11 2007 - 10:24:26 PST
>Is there any significance to the legality of a default value of the
parameter,
>or only to the actual instantiated values? 

The default value of a parameter is itself a constant expression, so
cannot in general be evaluated until elaboration time, because it may
depend on the actual instantiated values of other parameters.

For example, in the following, even the types of P and Q are not known
until elaboration time

       parameter M = 6;
       parameter N = 10;
       parameter [M-1:0] P = N + 2;
       parameter Q = N + M;
         
-- Brad

[ In reply to http://www.eda-stds.org/sv-bc/hm/5485.html .]


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Feb 11 10:25:03 2007

This archive was generated by hypermail 2.1.8 : Sun Feb 11 2007 - 10:25:21 PST