---------------------------------------------------------------------------------- -- Company: Cal Poly CPE 133 Project -- Engineer: -- -- Create Date: 11/13/2015 06:29:30 PM -- Design Name: -- Module Name: main_circuit - Behavioral -- Project Name: Solar Room Temperature Regulator -- Target Devices: -- Tool Versions: -- Description: This module determines whether the value A is less than or equal to the value B. -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use ieee.std_logic_unsigned.all; use IEEE.numeric_std.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 leaf cells in this code. --library UNISIM; --use UNISIM.VComponents.all; entity Compare is Port ( A : in STD_LOGIC_VECTOR (7 downto 0); -- The value that is being compared to another value. B : in STD_LOGIC_VECTOR (7 downto 0); -- The value that A is being compared with. LEQ : out STD_LOGIC; -- Outputs '1' is A is less than or equal to B. G : out STD_LOGIC); -- Outputs '1' is A is greater than to B. end Compare; architecture Behavioral of Compare is begin LEQ <= '1' when (A = B) or (A < B) else '0'; --The Boolean logic for determining whether A is less than or equal to B. G <= '1' when (A > B) else '0'; --The Boolean logic for determining whether A is greater than to B. end Behavioral;