Files
IEEE754Adder/SpecialCasesCheck.vhd

45 lines
675 B
VHDL
Raw Normal View History

2019-08-17 17:41:27 +02:00
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
2019-08-17 18:45:31 +02:00
entity SpecialCasesCheck is
2019-08-29 15:12:25 +02:00
2019-08-17 17:41:27 +02:00
port(
2019-08-29 15:12:25 +02:00
X, Y : in std_logic_vector(31 downto 0);
IS_NAN, IS_ZERO : out std_logic
2019-08-17 17:41:27 +02:00
);
2019-08-29 15:12:25 +02:00
2019-08-17 18:45:31 +02:00
end SpecialCasesCheck;
2019-08-17 17:41:27 +02:00
2019-08-17 18:45:31 +02:00
architecture SpecialCasesCheckArch of SpecialCasesCheck is
2019-08-29 15:12:25 +02:00
2019-08-17 19:22:19 +02:00
component NaNCheck is
2019-08-29 15:12:25 +02:00
2019-08-17 18:45:31 +02:00
port(
2019-08-29 15:12:25 +02:00
X, Y : in std_logic_vector(31 downto 0);
IS_NAN : out std_logic
2019-08-17 18:45:31 +02:00
);
2019-08-29 15:12:25 +02:00
2019-08-17 18:45:31 +02:00
end component;
2019-08-17 17:41:27 +02:00
2019-08-24 14:39:01 +02:00
component ZeroCheck is
2019-08-29 15:12:25 +02:00
2019-08-24 14:39:01 +02:00
port(
2019-08-29 15:12:25 +02:00
X, Y : in std_logic_vector(31 downto 0);
IS_ZERO : out std_logic
2019-08-24 14:39:01 +02:00
);
2019-08-29 15:12:25 +02:00
2019-08-24 14:39:01 +02:00
end component;
2019-08-29 15:12:25 +02:00
2019-08-17 18:45:31 +02:00
begin
2019-08-29 15:12:25 +02:00
2019-08-17 19:22:19 +02:00
NC: NaNCheck
2019-08-29 15:12:25 +02:00
port map (X => X, Y => Y, IS_NAN => IS_NAN);
2019-08-24 14:39:01 +02:00
ZC: ZeroCheck
2019-08-29 15:12:25 +02:00
port map (X => X, Y => Y, IS_ZERO => IS_ZERO);
2019-08-17 18:45:31 +02:00
end SpecialCasesCheckArch;
2019-08-17 17:41:27 +02:00