Correct. 1364-2005 allows using certain system functions in constant expressions (math functions, conversion functions), but their arguments have to be constant, just as in user-defined constant functions. The functions $bits is part of SystemVerilog. $sizeof does not exist. Maybe you mean $size, which is one of the SystemVerilog array querying functions. SystemVerilog allows $bits and array querying functions in constant expressions. However, neither Verilog nor SystemVerilog allow random or distribution functions in constant expressions, even if their arguments are constant. Shalom > -----Original Message----- > From: owner-verilog-ams@eda.org [mailto:owner-verilog- > ams@eda.org] On Behalf Of Geoffrey.Coram > Sent: Monday, January 30, 2006 4:29 PM > To: Sri Chandra > Cc: verilog-ams > Subject: Re: monte carlo and distribution functions > > Sri - > I'm not sure that LRM 2.2 is clear about using system functions > in > parameter initialization. Verilog 1364-2005, I think, started > allowing > this for a few "constant" functions, such as $bits, $sizeof -- > and > all the math functions $sin, $cos, $tan. But in 1364-2005, the > arguments have to be constant_expressions, which rules out > integer variables. > > -Geoffrey > > > Sri Chandra wrote: > > > > Hi Geoffrey, > > > > I thought allowing integer variables as seed is already fixed > in LRM2.2. > > If you look at section 10.3 it now accepts integers, > parameters and > > constant numbers. > > > > As far as the default expression for parameters are > concerned, random > > and distribution calls are allowed as default as long as the > parameters > > specified are constant expression (parameters or fixed > constants). So in > > this context one wouldnt be able to use integer variable as a > seed. > > > > cheers, > > SriReceived on Mon Jan 30 09:08:48 2006
This archive was generated by hypermail 2.1.8 : Mon Jan 30 2006 - 09:09:08 PST