ffa_ch2_logicals.kv 1 with Word_Ops; use Word_Ops;
ffa_ch2_logicals.kv 2
ffa_ch2_logicals.kv 3
ffa_ch2_logicals.kv 4 package body FZ_Basic is
ffa_ch2_logicals.kv 5
ffa_ch2_logicals.kv 6
ffa_ch2_logicals.kv 7
ffa_ch2_logicals.kv 8
ffa_ch2_logicals.kv 9
ffa_ch2_logicals.kv 10
ffa_ch2_logicals.kv 11 procedure FZ_Clear(N : out FZ) is
ffa_ch2_logicals.kv 12 begin
ffa_ch2_logicals.kv 13 N := (others => 0);
ffa_ch2_logicals.kv 14 end FZ_Clear;
ffa_ch2_logicals.kv 15 pragma Inline_Always(FZ_Clear);
ffa_ch2_logicals.kv 16
ffa_ch2_logicals.kv 17
ffa_ch2_logicals.kv 18
ffa_ch2_logicals.kv 19 procedure FZ_Set_Head(N : out FZ; Source : in Word) is
ffa_ch2_logicals.kv 20 begin
ffa_ch2_logicals.kv 21 N(N'First) := Source;
ffa_ch2_logicals.kv 22 end FZ_Set_Head;
ffa_ch2_logicals.kv 23 pragma Inline_Always(FZ_Set_Head);
ffa_ch2_logicals.kv 24
ffa_ch2_logicals.kv 25
ffa_ch2_logicals.kv 26
ffa_ch2_logicals.kv 27 function FZ_Get_Head(N : in FZ) return Word is
ffa_ch2_logicals.kv 28 begin
ffa_ch2_logicals.kv 29 return N(N'First);
ffa_ch2_logicals.kv 30 end FZ_Get_Head;
ffa_ch2_logicals.kv 31 pragma Inline_Always(FZ_Get_Head);
ffa_ch2_logicals.kv 32
ffa_ch2_logicals.kv 33
ffa_ch2_logicals.kv 34
ffa_ch2_logicals.kv 35 procedure FZ_Swap(X : in out FZ; Y : in out FZ) is
ffa_ch2_logicals.kv 36 T : FZ(X'Range) := X;
ffa_ch2_logicals.kv 37 begin
ffa_ch2_logicals.kv 38 T := X;
ffa_ch2_logicals.kv 39 X := Y;
ffa_ch2_logicals.kv 40 Y := T;
ffa_ch2_logicals.kv 41 end FZ_Swap;
ffa_ch2_logicals.kv 42 pragma Inline_Always(FZ_Swap);
ffa_ch2_logicals.kv 43
ffa_ch2_logicals.kv 44
ffa_ch2_logicals.kv 45
ffa_ch2_logicals.kv 46 procedure FZ_Mux(X : in FZ; Y : in FZ; Result : out FZ; Sel : in WBool) is
ffa_ch2_logicals.kv 47 begin
ffa_ch2_logicals.kv 48 for i in X'Range loop
ffa_ch2_logicals.kv 49 Result(i) := W_Mux(X(i), Y(i), Sel);
ffa_ch2_logicals.kv 50 end loop;
ffa_ch2_logicals.kv 51 end FZ_Mux;
ffa_ch2_logicals.kv 52 pragma Inline_Always(FZ_Mux);
ffa_ch2_logicals.kv 53
ffa_ch2_logicals.kv 54 end FZ_Basic;