Well, I just got word from the compiler vendor that they fixed the problem. However, I still wonder, is it clear from the LRM that if all arguments to the math functions are constants, the return value is also going to be a constant? Correct me if I am wrong, but I don't recall any of this mentioned in the LRM (section 4.2). There is a lot about integer/real, but I didn't see anything on constant/variable. Should something like this be described in this area to avoid any confusions? Thanks, Arpad ===================================================== -----Original Message----- From: owner-verilog-ams@eda.org [mailto:owner-verilog-ams@eda.org] On Behalf Of Muranyi, Arpad Sent: Monday, November 14, 2005 9:15 AM To: geoffrey.coram@analog.com Cc: Verilog-AMS LRM Committee Subject: RE: Constant initialization question Sorry, I wasn't clear on the way I wrote my message, all of the functions give the same error (not just min/max). Arpad ============================================ -----Original Message----- From: geoffrey.coram@analog.com [mailto:geoffrey.coram@analog.com] Sent: Monday, November 14, 2005 9:11 AM To: Muranyi, Arpad Cc: Verilog-AMS LRM Committee Subject: Re: Constant initialization question Arpad - Since built_in_function(const_arg_list) is a "constant_expression" (as is constant_array_expression) per the LRM, I think the compiler is wrong to give you an error. It's curious that min gives you a problem whereas ceil does not ... 1364-2005 spent some time looking at various functions -- including user-defined ones -- as to which ones, when operating on constant expressions, would return constant expressions. I think they went as far as to define a list of functions allowed in parameter declarations. -Geoffrey "Muranyi, Arpad" wrote: > > Hello everyone, > > I would like to ask a question about initializing > constants. > > I am getting compiler errors when I write something > like this: > > parameter real Min_t = min(min(min(Tr1[1], Tr2[1]), Tf1[1]), Tf2[1]); > > Where Tr1, Tr2, Tf1, Tf2 are array parameters, i.e. > constants. The error complains that the initialization > is not static. I have other similar statements in which > I use ceil, arithmetic, etc..., but all with constant > arguments. > > In my opinion, the result of all these math functions > should be constants, since the arguments are also all > constant. Is this allowed according to the LRM? Is > this a compiler bug? > > Thanks, > > ArpadReceived on Mon Nov 14 11:28:21 2005
This archive was generated by hypermail 2.1.8 : Mon Nov 14 2005 - 11:28:40 PST