Advertisement
Guest User

Untitled

a guest
May 17th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.35 KB | None | 0 0
  1. LIBRARY ieee;
  2. USE ieee.std_logic_1164.all;
  3.  
  4. ENTITY Lab7b IS
  5.     PORT (
  6.         SW : in STD_LOGIC_VECTOR(2 downto 0);
  7.         LEDR : buffer STD_LOGIC_VECTOR(1 downto 0));
  8. END Lab7b;
  9.  
  10. ARCHITECTURE Structure OF Lab7b IS
  11.     SIGNAL e: STD_LOGIC;
  12. BEGIN
  13.     e <= SW(2);
  14.     LEDR(0) <= NOT((SW(0) nand e) and LEDR(1));
  15.     LEDR(1) <= NOT((SW(1) nand e) and LEDR(0));
  16. END Structure;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement