ffa_ch5_egypt.kv 1
ffa_ch5_egypt.kv 2
ffa_ch5_egypt.kv 3
ffa_ch5_egypt.kv 4
ffa_ch5_egypt.kv 5
ffa_ch5_egypt.kv 6
ffa_ch5_egypt.kv 7
ffa_ch5_egypt.kv 8
ffa_ch5_egypt.kv 9
ffa_ch5_egypt.kv 10
ffa_ch5_egypt.kv 11
ffa_ch5_egypt.kv 12
ffa_ch5_egypt.kv 13
ffa_ch5_egypt.kv 14
ffa_ch5_egypt.kv 15
ffa_ch5_egypt.kv 16
ffa_ch5_egypt.kv 17
ffa_ch5_egypt.kv 18
ffa_ch5_egypt.kv 19
ffa_ch5_egypt.kv 20 with Words; use Words;
ffa_ch9_exodus.kv 21 with Word_Ops; use Word_Ops;
ffa_ch9_exodus.kv 22 with W_Mul; use W_Mul;
ffa_ch5_egypt.kv 23
ffa_ch5_egypt.kv 24
ffa_ch5_egypt.kv 25 package body FZ_Mul is
ffa_ch5_egypt.kv 26
ffa_ch9_exodus.kv 27
ffa_ch9_exodus.kv 28 procedure FZ_Mul_Comba(X : in FZ;
ffa_ch9_exodus.kv 29 Y : in FZ;
ffa_ch9_exodus.kv 30 XY_Lo : out FZ;
ffa_ch9_exodus.kv 31 XY_Hi : out FZ) is
ffa_ch5_egypt.kv 32
ffa_ch9_exodus.kv 33
ffa_ch9_exodus.kv 34 L : constant Word_Index := X'Length;
ffa_ch7_turbo_egy... 35
ffa_ch9_exodus.kv 36
ffa_ch9_exodus.kv 37 LP : constant Word_Index := 2 * L;
ffa_ch5_egypt.kv 38
ffa_ch9_exodus.kv 39
ffa_ch9_exodus.kv 40 A2, A1, A0 : Word := 0;
ffa_ch9_exodus.kv 41
ffa_ch9_exodus.kv 42
ffa_ch9_exodus.kv 43 XY : FZ(0 .. LP - 1);
ffa_ch9_exodus.kv 44
ffa_ch9_exodus.kv 45
ffa_ch9_exodus.kv 46 subtype ColXY is Word_Index range XY'Range;
ffa_ch9_exodus.kv 47
ffa_ch9_exodus.kv 48
ffa_ch9_exodus.kv 49 procedure Col(N : in ColXY; U : in ColXY; V : in ColXY) is
ffa_ch9_exodus.kv 50
ffa_ch9_exodus.kv 51
ffa_ch9_exodus.kv 52 Lo, Hi : Word;
ffa_ch9_exodus.kv 53
ffa_ch9_exodus.kv 54
ffa_ch9_exodus.kv 55 C : WBool;
ffa_ch9_exodus.kv 56
ffa_ch9_exodus.kv 57
ffa_ch9_exodus.kv 58 Sum : Word;
ffa_ch9_exodus.kv 59
ffa_ch9_exodus.kv 60 begin
ffa_ch9_exodus.kv 61
ffa_ch9_exodus.kv 62
ffa_ch9_exodus.kv 63
ffa_ch9_exodus.kv 64 for j in U .. V loop
ffa_ch9_exodus.kv 65
ffa_ch9_exodus.kv 66
ffa_ch9_exodus.kv 67 Mul_Word(X(X'First + j),
ffa_ch9_exodus.kv 68 Y(Y'First - j + N),
ffa_ch9_exodus.kv 69 Lo, Hi);
ffa_ch9_exodus.kv 70
ffa_ch9_exodus.kv 71
ffa_ch9_exodus.kv 72
ffa_ch9_exodus.kv 73
ffa_ch9_exodus.kv 74 Sum := A0 + Lo;
ffa_ch9_exodus.kv 75 C := W_Carry(A0, Lo, Sum);
ffa_ch9_exodus.kv 76 A0 := Sum;
ffa_ch9_exodus.kv 77
ffa_ch9_exodus.kv 78
ffa_ch9_exodus.kv 79 Sum := A1 + Hi + C;
ffa_ch9_exodus.kv 80 C := W_Carry(A1, Hi, Sum);
ffa_ch9_exodus.kv 81 A1 := Sum;
ffa_ch9_exodus.kv 82
ffa_ch9_exodus.kv 83
ffa_ch9_exodus.kv 84 A2 := A2 + C;
ffa_ch9_exodus.kv 85
ffa_ch9_exodus.kv 86 end loop;
ffa_ch9_exodus.kv 87
ffa_ch9_exodus.kv 88
ffa_ch9_exodus.kv 89 XY(N) := A0;
ffa_ch9_exodus.kv 90
ffa_ch9_exodus.kv 91
ffa_ch9_exodus.kv 92 A0 := A1;
ffa_ch9_exodus.kv 93 A1 := A2;
ffa_ch9_exodus.kv 94 A2 := 0;
ffa_ch9_exodus.kv 95
ffa_ch9_exodus.kv 96 end Col;
ffa_ch9_exodus.kv 97 pragma Inline_Always(Col);
ffa_ch5_egypt.kv 98
ffa_ch5_egypt.kv 99 begin
ffa_ch5_egypt.kv 100
ffa_ch9_exodus.kv 101
ffa_ch9_exodus.kv 102 for i in 0 .. L - 1 loop
ffa_ch9_exodus.kv 103
ffa_ch9_exodus.kv 104 Col(i, 0, i);
ffa_ch9_exodus.kv 105
ffa_ch9_exodus.kv 106 end loop;
ffa_ch9_exodus.kv 107
ffa_ch9_exodus.kv 108
ffa_ch9_exodus.kv 109 for i in L .. LP - 2 loop
ffa_ch9_exodus.kv 110
ffa_ch9_exodus.kv 111 Col(i, i - L + 1, L - 1);
ffa_ch5_egypt.kv 112
ffa_ch5_egypt.kv 113 end loop;
ffa_ch5_egypt.kv 114
ffa_ch9_exodus.kv 115
ffa_ch9_exodus.kv 116 XY(XY'Last) := A0;
ffa_ch5_egypt.kv 117
ffa_ch9_exodus.kv 118
ffa_ch9_exodus.kv 119 XY_Lo := XY(0 .. L - 1);
ffa_ch9_exodus.kv 120 XY_Hi := XY(L .. XY'Last);
ffa_ch9_exodus.kv 121
ffa_ch9_exodus.kv 122 end FZ_Mul_Comba;
ffa_ch9_exodus.kv 123 pragma Inline_Always(FZ_Mul_Comba);
ffa_ch9_exodus.kv 124
ffa_ch5_egypt.kv 125 end FZ_Mul;