Package: RandomBasePkg
- File: RandomBasePkg.vhd
Description
comment out following 2 lines with VHDL-2008. Leave in for VHDL-2002
library ieee_proposed ; -- remove with VHDL-2008
use ieee_proposed.standard_additions.all ; -- remove with VHDL-2008
Constants
Name | Type | Value | Description |
---|---|---|---|
OSVVM_RANDOM_ALERTLOG_ID | AlertLogIDType | OSVVM_ALERTLOG_ID | |
NULL_INTV | integer_vector (NULL_RANGE_TYPE) | (others => 0) |
Types
Name | Type | Description |
---|---|---|
RandomSeedType | --------------------------------------------------------------- RandomSeedType - Abstract the type for randomization | |
RandomDistType | (NONE, UNIFORM, FAVOR_SMALL, FAVOR_BIG, NORMAL, POISSON) |
--------------------------------------------------------------- - Distribution Types and read/write procedures |
RandomParmType |
Functions
- Uniform (Result : out real ;
Seed : inout RandomSeedType) return ()
Description
Uniform
Generate a random number with a Uniform distribution
Required by RandomPkg. All randomization is derived from here.
Value produced must be either:
0 <= Value < 1 or 0 < Value < 1
Current version uses ieee.math_real.Uniform
This abstraction allows higher precision version
of a uniform distribution to be used provided
- to_string (A : RandomSeedType) return string
Description
- RandomSeedType IO
- write (variable L: inout line ;
A : RandomSeedType ) return ()
- read (variable L: inout line ;
A : out RandomSeedType ;
good : out boolean ) return ()
- read (variable L: inout line ;
A : out RandomSeedType ) return ()
- to_string (A : RandomDistType) return string
Description
RandomParm IO
- write (variable L : inout line ;
A : RandomDistType ) return ()
- read (variable L : inout line ;
A : out RandomDistType ;
good : out boolean ) return ()
- read (variable L : inout line ;
A : out RandomDistType ) return ()
- to_string (A : RandomParmType) return string
- write (variable L : inout line ;
A : RandomParmType ) return ()
- read (variable L : inout line ;
A : out RandomParmType ;
good : out boolean ) return ()
- read (variable L : inout line ;
A : out RandomParmType ) return ()
- Scale (A,
Min,
Max : real) return real
Description
- Randomization Support
- Scale - Scale a value to be within a given range
- FavorSmall, FavorBig - Distribution Support
- RemoveExclude
- Scale (A : real ;
Min,
Max : integer) return integer
- FavorSmall (A : real) return real
- FavorBig (A : real) return real
- to_time_vector (A : integer_vector ;
Unit : time) return time_vector
- to_integer_vector (A : time_vector ;
Unit : time) return integer_vector
- RemoveExclude (A,
Exclude : integer_vector ;
variable NewA : out integer_vector ;
variable NewALength : inout natural ) return ()
- inside (A : real ;
Exclude : real_vector) return boolean
- RemoveExclude (A,
Exclude : real_vector ;
variable NewA : out real_vector ;
variable NewALength : inout natural ) return ()
- inside (A : time ;
Exclude : time_vector) return boolean
- RemoveExclude (A,
Exclude : time_vector ;
variable NewA : out time_vector ;
variable NewALength : inout natural ) return ()