VHDL Code for External Light Control Using Relays

This page provides VHDL source code for controlling external lights using relays.

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
library unisim;
use unisim.vcomponents.all;

entity light is
    Port (
        cntrl1, cntrl2 : in STD_LOGIC;
        led : out STD_LOGIC
    );
end light;

architecture Behavioral of light is
begin
    led <= cntrl1 or cntrl2;
end behavioral;