System random functions

LRM §14.10.

System random functions generate a random number.

Syntax:

$random [ (seed) ];
$dist_chi_square(seed, degree_of_freedom);
$dist_erlang(seed, k_stage, mean);
$dist_exponential(seed, mean);
$dist_normal(seed, mean, deviation);
$dist_poisson(seed, mean);
$dist_t(seed, degree_of_freedom);
$dist_uniform(seed, start, end);

Description:

$random returns a random 32-bit signed integer. Seed controls the numbers that $random returns. The seed must be a reg, integer or time variable.

The $dist_ functions returns pseudo-random values whose characteristics are described by the function name. The seed is an inout parameter and must be an integer.

Example:

A = $random(2);