diff --git a/EqualCheck.vhd b/EqualCheck.vhd index 15cd1ba..7e50fc8 100644 --- a/EqualCheck.vhd +++ b/EqualCheck.vhd @@ -1,28 +1,42 @@ -library IEEE; -use IEEE.STD_LOGIC_1164.ALL; - -entity EqualCheck is - generic( BITCOUNT: integer := 8 ); - port( - X, Y: in std_logic_vector( (BITCOUNT-1) downto 0 ); - isEqual: out std_logic - ); -end EqualCheck; - -architecture EqualCheckArch of EqualCheck is - signal compVec: std_logic_vector( (BITCOUNT-1) downto 0 ); -begin - compVec <= X xor Y; - - res_compute: process (compVec) - variable res_tmp: std_logic; - begin - res_tmp := '0'; - for i in compVec'range loop - res_tmp := res_tmp or compVec(i); - end loop; - isEqual <= not res_tmp; - end process; - -end EqualCheckArch; - +library IEEE; +use IEEE.STD_LOGIC_1164.ALL; + +entity EqualCheck is + + generic( + BITCOUNT: integer := 8 + ); + + port( + X, Y : in std_logic_vector((BITCOUNT-1) downto 0); + IS_EQUAL : out std_logic + ); + +end EqualCheck; + +architecture EqualCheckArch of EqualCheck is + + signal COMP_VEC : std_logic_vector((BITCOUNT-1) downto 0); + +begin + + COMP_VEC <= X xor Y; + + RES_COMPUTE: process (COMP_VEC) + + variable RES_TMP : std_logic; + + begin + + RES_TMP := '0'; + + for i in COMP_VEC'range loop + RES_TMP := RES_TMP or COMP_VEC(i); + end loop; + + IS_EQUAL <= not RES_TMP; + + end process; + +end EqualCheckArch; + diff --git a/IEEE754Adder.xise b/IEEE754Adder.xise index 674c31d..da138d4 100644 --- a/IEEE754Adder.xise +++ b/IEEE754Adder.xise @@ -1,906 +1,444 @@ - - -
- - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- diff --git a/NaNCheck.vhd b/NaNCheck.vhd index 0fb9aa3..2f7bd3d 100644 --- a/NaNCheck.vhd +++ b/NaNCheck.vhd @@ -15,7 +15,7 @@ architecture NaNCheckArch of NaNCheck is component TypeCheck is port( - N : in std_logic_vector(31 downto 0); + N : in std_logic_vector(30 downto 0); NAN, INF : out std_logic ); @@ -31,10 +31,10 @@ architecture NaNCheckArch of NaNCheck is begin xCheck: TypeCheck - port map (N => X, NAN => X_NAN, INF => X_INF); + port map (N => X(30 downto 0), NAN => X_NAN, INF => X_INF); yCheck: TypeCheck - port map (N => Y, NAN => Y_NAN, INF => Y_INF); + port map (N => Y(30 downto 0), NAN => Y_NAN, INF => Y_INF); X_SIGN <= X(31); Y_SIGN <= Y(31); diff --git a/TypeCheck.vhd b/TypeCheck.vhd index a2fda1b..77b4d20 100644 --- a/TypeCheck.vhd +++ b/TypeCheck.vhd @@ -4,7 +4,7 @@ use IEEE.STD_LOGIC_1164.ALL; entity TypeCheck is port( - N : in std_logic_vector(31 downto 0); + N : in std_logic_vector(30 downto 0); NAN, INF : out std_logic ); diff --git a/equalCheck.vhd b/equalCheck.vhd deleted file mode 100644 index eb1ec98..0000000 --- a/equalCheck.vhd +++ /dev/null @@ -1,44 +0,0 @@ -library IEEE; -use IEEE.STD_LOGIC_1164.ALL; - -entity EqualCheck is - - generic( - BITCOUNT: integer := 8 - ); - - port( - X, Y : in std_logic_vector((BITCOUNT-1) downto 0); - IS_EQUAL : out std_logic - ); - -end EqualCheck; - -architecture EqualCheckArch of EqualCheck is - - signal COMP_VEC : std_logic_vector((BITCOUNT-1) downto 0); - - - -begin - - COMP_VEC <= X xor Y; - - RES_COMPUTE: process (COMP_VEC) - - variable RES_TMP : std_logic; - - begin - - RES_TMP := '0'; - - for i in COMP_VEC'range loop - RES_TMP := RES_TMP or COMP_VEC(i); - end loop; - - IS_EQUAL <= not RES_TMP; - - end process; - -end EqualCheckArch; -