----------------------------------------------------------------------------------
-- Company: 
-- Engineer: 
-- 
-- Create Date:    09:54:16 05/12/2012 
-- Design Name: 
-- Module Name:    comp7 - Behavioral 
-- Project Name: 
-- Target Devices: 
-- Tool versions: 
-- Description: 
--
-- Dependencies: 
--
-- Revision: 
-- Revision 0.01 - File Created
-- Additional Comments: 
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity comp is
    Port ( comp_input : in  STD_LOGIC_VECTOR (11 downto 0);
           comp_threshold : in  STD_LOGIC_VECTOR (11 downto 0);
			  clk : in std_logic;
           comp_output : out  STD_LOGIC);
end comp;

architecture Behavioral of comp is

begin
  countercompare : process(clk)
  begin
    if (comp_input = comp_threshold) then
	   comp_output <= '1';
	 elsif (comp_input < comp_threshold) then
	   comp_output <= '0';
	 end if;
  end process;

end Behavioral;

