Version 1.0 Verilog-A Language Reference Manual E-2
System Tasks and Functions
E.2 $dist_ functions
Syntax:
Figure E-1: : Syntax for the probabilistic distribution functions
All parameters to the system functions are integer values. For the exponential, poisson,
chi-square, t, and erlang functions, the parameters mean, degree of freedom, and k_stage
must be greater than 0.
Each of these functions returns a pseudo-random number whose characteristics are
described by the function name. That is, $dist_uniform returns random numbers
uniformly distributed in the interval specified by its parameters.
For each system function, the seed parameter is an in-out parameter; that is, a value is
passed to the function and a different value is returned. The system functions will always
return the same value given the same seed. This facilitates debugging by making the
operation of the system repeatable. The argument for the seed parameter should be an
integer variable that is initialized by the user and only updated by the system function.
This will ensure that the desired distribution is achieved.
All functions return a real value.
In the $dist_uniform function, the start and end parameters are integer inputs which
bound the values returned. The start value should be smaller than the end value.
The mean parameter, used by $dist_normal, $dist_exponential, $dist_poisson, and
$dist_erlang, is an integer input which causes the average value returned by the function
to approach the value specified.
The standard deviation parameter used with the $dist_normal function is an integer
input which helps determine the shape of the density function. Larger numbers for
standard deviation will spread the returned values over a wider range. With a mean of 0
and standard deviation of 1, $dist_normal generates gaussian distribution.
The degree of freedom parameter used with the $dist_chi_square and $dist_t functions
is an integer input which helps determine the shape of the density function. Larger
numbers will spread the returned values over a wider range.
$dist_uniform (seed, start, end) ;
$dist_normal (seed, mean, standard_deviation) ;
$dist_exponential (seed, mean) ;
$dist_poisson (seed, mean) ;
$dist_chi_square (seed, degree_of_freedom) ;
$dist_t (seed, degree_of_freedom) ;
$dist_erlang (seed, k_stage, mean) ;