ffa_ch3_shifts.kv 1
ffa_ch3_shifts.kv 2
ffa_ch3_shifts.kv 3
ffa_ch3_shifts.kv 4
ffa_ch15_gcd.kv 5
ffa_ch3_shifts.kv 6
ffa_ch3_shifts.kv 7
ffa_ch3_shifts.kv 8
ffa_ch3_shifts.kv 9
ffa_ch3_shifts.kv 10
ffa_ch3_shifts.kv 11
ffa_ch3_shifts.kv 12
ffa_ch3_shifts.kv 13
ffa_ch3_shifts.kv 14
ffa_ch3_shifts.kv 15
ffa_ch3_shifts.kv 16
ffa_ch3_shifts.kv 17
ffa_ch3_shifts.kv 18
ffa_ch3_shifts.kv 19
ffa_ch2_logicals.kv 20 with Word_Ops; use Word_Ops;
ffa_ch2_logicals.kv 21
ffa_ch2_logicals.kv 22
ffa_ch2_logicals.kv 23 package body FZ_Basic is
ffa_ch2_logicals.kv 24
ffa_ch2_logicals.kv 25
ffa_ch2_logicals.kv 26
ffa_ch2_logicals.kv 27
ffa_ch2_logicals.kv 28
ffa_ch5_egypt.kv 29
ffa_ch5_egypt.kv 30 function FZ_Bitness(N : in FZ) return Bit_Count is
ffa_ch5_egypt.kv 31 begin
ffa_ch5_egypt.kv 32 return N'Length * Words.Bitness;
ffa_ch5_egypt.kv 33 end FZ_Bitness;
ffa_ch5_egypt.kv 34
ffa_ch5_egypt.kv 35
ffa_ch13_measure_... 36
ffa_ch13_measure_... 37 function FZ_Bitness_Log2(N : in FZ) return Positive is
ffa_ch13_measure_... 38 W : Bit_Count := N'Length;
ffa_ch13_measure_... 39 R : Positive := 1;
ffa_ch13_measure_... 40 begin
ffa_ch13_measure_... 41 while W > 1 loop
ffa_ch13_measure_... 42 W := W / 2;
ffa_ch13_measure_... 43 R := R + 1;
ffa_ch13_measure_... 44 end loop;
ffa_ch13_measure_... 45 return R - 1;
ffa_ch13_measure_... 46 end FZ_Bitness_Log2;
ffa_ch13_measure_... 47
ffa_ch13_measure_... 48
ffa_ch2_logicals.kv 49
ffa_ch2_logicals.kv 50 procedure FZ_Clear(N : out FZ) is
ffa_ch2_logicals.kv 51 begin
ffa_ch2_logicals.kv 52 N := (others => 0);
ffa_ch2_logicals.kv 53 end FZ_Clear;
ffa_ch2_logicals.kv 54
ffa_ch2_logicals.kv 55
ffa_ch4_ffacalc.kv 56
ffa_ch4_ffacalc.kv 57 procedure WBool_To_FZ(V : in WBool; N : out FZ) is
ffa_ch4_ffacalc.kv 58 begin
ffa_ch4_ffacalc.kv 59 FZ_Clear(N);
ffa_ch4_ffacalc.kv 60 FZ_Set_Head(N, V);
ffa_ch4_ffacalc.kv 61 end WBool_To_FZ;
ffa_ch4_ffacalc.kv 62
ffa_ch4_ffacalc.kv 63
ffa_ch2_logicals.kv 64
ffa_ch2_logicals.kv 65 procedure FZ_Set_Head(N : out FZ; Source : in Word) is
ffa_ch2_logicals.kv 66 begin
ffa_ch2_logicals.kv 67 N(N'First) := Source;
ffa_ch2_logicals.kv 68 end FZ_Set_Head;
ffa_ch2_logicals.kv 69
ffa_ch2_logicals.kv 70
ffa_ch2_logicals.kv 71
ffa_ch2_logicals.kv 72 function FZ_Get_Head(N : in FZ) return Word is
ffa_ch2_logicals.kv 73 begin
ffa_ch2_logicals.kv 74 return N(N'First);
ffa_ch2_logicals.kv 75 end FZ_Get_Head;
ffa_ch2_logicals.kv 76
ffa_ch2_logicals.kv 77
ffa_ch2_logicals.kv 78
ffa_ch2_logicals.kv 79 procedure FZ_Swap(X : in out FZ; Y : in out FZ) is
ffa_ch3_shifts.kv 80 T : FZ(X'Range);
ffa_ch2_logicals.kv 81 begin
ffa_ch2_logicals.kv 82 T := X;
ffa_ch2_logicals.kv 83 X := Y;
ffa_ch2_logicals.kv 84 Y := T;
ffa_ch2_logicals.kv 85 end FZ_Swap;
ffa_ch2_logicals.kv 86
ffa_ch2_logicals.kv 87
ffa_ch2_logicals.kv 88
ffa_ch2_logicals.kv 89 procedure FZ_Mux(X : in FZ; Y : in FZ; Result : out FZ; Sel : in WBool) is
ffa_ch2_logicals.kv 90 begin
ffa_ch2_logicals.kv 91 for i in X'Range loop
ffa_ch2_logicals.kv 92 Result(i) := W_Mux(X(i), Y(i), Sel);
ffa_ch2_logicals.kv 93 end loop;
ffa_ch2_logicals.kv 94 end FZ_Mux;
ffa_ch2_logicals.kv 95
ffa_ch2_logicals.kv 96 end FZ_Basic;