raw
ffa_ch2_logicals.kv     1 package body FZ_BitOp is
ffa_ch2_logicals.kv 2
ffa_ch2_logicals.kv 3 -- Result := X & Y
ffa_ch2_logicals.kv 4 procedure FZ_And(X : in FZ; Y : in FZ; Result : out FZ) is
ffa_ch2_logicals.kv 5 begin
ffa_ch2_logicals.kv 6 for i in X'Range loop
ffa_ch2_logicals.kv 7 Result(i) := X(i) and Y(i);
ffa_ch2_logicals.kv 8 end loop;
ffa_ch2_logicals.kv 9 end FZ_And;
ffa_ch2_logicals.kv 10 pragma Inline_Always(FZ_And);
ffa_ch2_logicals.kv 11
ffa_ch2_logicals.kv 12
ffa_ch2_logicals.kv 13 -- N := N & W, W is a word
ffa_ch2_logicals.kv 14 procedure FZ_And_W(N : in out FZ; W : in Word) is
ffa_ch2_logicals.kv 15 begin
ffa_ch2_logicals.kv 16 N(N'First) := N(N'First) and W;
ffa_ch2_logicals.kv 17 end FZ_And_W;
ffa_ch2_logicals.kv 18 pragma Inline_Always(FZ_And_W);
ffa_ch2_logicals.kv 19
ffa_ch2_logicals.kv 20
ffa_ch2_logicals.kv 21 -- Result := X | Y
ffa_ch2_logicals.kv 22 procedure FZ_Or(X : in FZ; Y : in FZ; Result : out FZ) is
ffa_ch2_logicals.kv 23 begin
ffa_ch2_logicals.kv 24 for i in X'Range loop
ffa_ch2_logicals.kv 25 Result(i) := X(i) or Y(i);
ffa_ch2_logicals.kv 26 end loop;
ffa_ch2_logicals.kv 27 end FZ_Or;
ffa_ch2_logicals.kv 28 pragma Inline_Always(FZ_Or);
ffa_ch2_logicals.kv 29
ffa_ch2_logicals.kv 30
ffa_ch2_logicals.kv 31 -- N := N | W, W is a word
ffa_ch2_logicals.kv 32 procedure FZ_Or_W(N : in out FZ; W : in Word) is
ffa_ch2_logicals.kv 33 begin
ffa_ch2_logicals.kv 34 N(N'First) := N(N'First) or W;
ffa_ch2_logicals.kv 35 end FZ_Or_W;
ffa_ch2_logicals.kv 36 pragma Inline_Always(FZ_Or_W);
ffa_ch2_logicals.kv 37
ffa_ch2_logicals.kv 38
ffa_ch2_logicals.kv 39 -- Result := X ^ Y
ffa_ch2_logicals.kv 40 procedure FZ_Xor(X : in FZ; Y : in FZ; Result : out FZ) is
ffa_ch2_logicals.kv 41 begin
ffa_ch2_logicals.kv 42 for i in X'Range loop
ffa_ch2_logicals.kv 43 Result(i) := X(i) xor Y(i);
ffa_ch2_logicals.kv 44 end loop;
ffa_ch2_logicals.kv 45 end FZ_Xor;
ffa_ch2_logicals.kv 46 pragma Inline_Always(FZ_Xor);
ffa_ch2_logicals.kv 47
ffa_ch2_logicals.kv 48
ffa_ch2_logicals.kv 49 -- N := N ^ W, W is a word
ffa_ch2_logicals.kv 50 procedure FZ_Xor_W(N : in out FZ; W : in Word) is
ffa_ch2_logicals.kv 51 begin
ffa_ch2_logicals.kv 52 N(N'First) := N(N'First) xor W;
ffa_ch2_logicals.kv 53 end FZ_Xor_W;
ffa_ch2_logicals.kv 54 pragma Inline_Always(FZ_Xor_W);
ffa_ch2_logicals.kv 55
ffa_ch2_logicals.kv 56
ffa_ch2_logicals.kv 57 -- NotN := ~N
ffa_ch2_logicals.kv 58 procedure FZ_Neg(N : in FZ;
ffa_ch2_logicals.kv 59 NotN : out FZ) is
ffa_ch2_logicals.kv 60 begin
ffa_ch2_logicals.kv 61 for i in N'Range loop
ffa_ch2_logicals.kv 62 NotN(i) := not N(i);
ffa_ch2_logicals.kv 63 end loop;
ffa_ch2_logicals.kv 64 end FZ_Neg;
ffa_ch2_logicals.kv 65 pragma Inline_Always(FZ_Neg);
ffa_ch2_logicals.kv 66
ffa_ch2_logicals.kv 67 end FZ_BitOp;