Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------------------------------------------------------------
- -- Company:
- -- Engineer:
- --
- -- Create Date: 23:53:22 02/20/2014
- -- Design Name:
- -- Module Name: Switch_led - 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;
- use IEEE.std_logic_ARITH.ALL;
- use IEEE.std_logic_UNSIGNED.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 Switch_led is
- port(
- Switch_0: in std_logic;
- Switch_1: in std_logic;
- Switch_2: in std_logic;
- Switch_3: in std_logic;
- Switch_4: in std_logic;
- Switch_5: in std_logic;
- Switch_6: in std_logic;
- Switch_7: in std_logic;
- BTN_3: in std_logic;
- Led_0: out std_logic;
- Led_1: out std_logic;
- Led_2: out std_logic;
- Led_3: out std_logic;
- Led_4: out std_logic;
- Led_5: out std_logic;
- Led_6: out std_logic;
- Led_7: out std_logic
- );
- end Switch_led;
- architecture Behavioral of Switch_led is
- begin
- Process(Switch_0, Switch_1, Switch_2, Switch_3, Switch_4, Switch_5, Switch_6 , Switch_7, BTN_3)
- begin
- if BTN_3 = '1' then
- Led_0 <= '0';
- Led_1 <= '0';
- Led_2 <= '0';
- Led_3 <= '0';
- Led_4 <= '0';
- Led_5 <= '0';
- Led_6 <= '0';
- Led_7 <= '0';
- else
- end if;
- if Switch_0 = '1' then
- Led_0 <= '1';
- else
- Led_0 <= '0';
- end if;
- if Switch_1 = '1' then
- Led_1 <= '1';
- else
- Led_1 <= '0';
- end if;
- if Switch_2 = '1' then
- Led_2 <= '1';
- else
- Led_2 <= '0';
- end if;
- if Switch_3 = '1' then
- Led_3 <= '1';
- else
- Led_3 <= '0';
- end if;
- if Switch_4 = '1' then
- Led_4 <= '1';
- else
- Led_4 <= '0';
- end if;
- if Switch_5 = '1' then
- Led_5 <= '1';
- else
- Led_5 <= '0';
- end if;
- if Switch_6 = '1' then
- Led_6 <= '1';
- else
- Led_6 <= '0';
- end if;
- if Switch_7 = '1' then
- Led_7 <= '1';
- else
- Led_7 <= '0';
- end if;
- end process;
- end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement