mt_prng 1
mt_prng 2
mt_prng 3
mt_prng 4 with Interfaces; use Interfaces;
mt_prng 5
mt_prng 6 package MT is
mt_prng 7
mt_prng 8 subtype U32 is Interfaces.Unsigned_32;
mt_prng 9
mt_prng 10
mt_prng 11 N : constant := 624;
mt_prng 12 M : constant := 397;
mt_prng 13 MATRIX_MASK: constant U32 := 16#9908_b0df#;
mt_prng 14 UPPER_MASK : constant U32 := 16#8000_0000#;
mt_prng 15 LOWER_MASK : constant U32 := 16#7fff_ffff#;
mt_prng 16
mt_prng 17
mt_prng 18 type State_Type is Array( 0 .. N-1 ) of U32;
mt_prng 19
mt_prng 20
mt_prng 21 KEY_LEN : constant := 4;
mt_prng 22 type Init_Array_Type is Array( 0 .. KEY_LEN - 1 ) of U32;
mt_prng 23
mt_prng 24
mt_prng 25 No_Init_Exception : exception;
mt_prng 26
mt_prng 27
mt_prng 28 procedure Init_Genrand(Seed : in U32);
mt_prng 29
mt_prng 30
mt_prng 31 procedure Init_Genrand(Seed : in Init_Array_Type);
mt_prng 32
mt_prng 33
mt_prng 34 function Gen_U32 return U32;
mt_prng 35
mt_prng 36
mt_prng 37 function Get_State return State_Type;
mt_prng 38
mt_prng 39
mt_prng 40 private
mt_prng 41
mt_prng 42 State : State_Type;
mt_prng 43
mt_prng 44
mt_prng 45 Mti_Flag : U32 := N + 1;
mt_prng 46
mt_prng 47 end MT;