aboutsummaryrefslogtreecommitdiff
path: root/src/eq8b.vhd
blob: bff04f211df8c8094d2b222cba8dbb4d469c1474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.numeric_std.all;

entity eq8b is
	port (
		A, B: in std_logic_vector(7 downto 0);
		Equal: out std_logic);
-- check if A = B
end eq8b;

architecture Behavioral of eq8b is
	signal X: std_logic_vector(7 downto 0); -- XOR temp
begin
	X <= (A xor B); -- bitwise and
	Equal <= not (X(0) or X(1) or X(2) or X(3) or X(4) or X(5) or X(6) or X(7)); -- nor all bits
end Behavioral;