Shalom, Geoffrey, For LRM2.2, based on request for device modeling we allowed the usage of $random and distribution functions as part of parameter initialization. As Geoffrey mentions, the expressions (arguments) for this would have to be constant or null (in the case of random i think you dont need any arguments at all). So this might be useful to be considered as part of the merged LRM2.3 syntax (LRM 2.2 + 1364-2005) so that we dont regress back on 2.2 version of AMS. My reference to allowing integer variables as part of the distribution functions was not with regards to parameter initialization. In LRM2.1 the seed argument had to be parameter or decimal number which we extended to integers (when used within analog begin-end). regards, Sri Bresticker, Shalom wrote: > 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, >>>Sri > >Received on Mon Jan 30 16:14:01 2006
This archive was generated by hypermail 2.1.8 : Mon Jan 30 2006 - 16:14:22 PST