Advertisement
Guest User

sjkdbfjkdsahfb

a guest
Jan 18th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.all;
  3. entity decoder1 is
  4. port(
  5. a : in STD_LOGIC_VECTOR(1 downto 0);
  6. b : out STD_LOGIC_VECTOR(3 downto 0)
  7. );
  8. end decoder1;
  9. architecture bhv of decoder1 is
  10. begin
  11. process(a)
  12. begin
  13. if (a="00") then
  14. b <= "0001";
  15. elsif (a="01") then
  16. b <= "0010";
  17. elsif (a="10") then
  18. b <= "0100";
  19. else
  20. b <= "1000";
  21. end if;
  22. end process;
  23. end bhv;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement