Advertisement
Guest User

demux

a guest
Jan 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.std_logic_1164.all;
  3. use IEEE.numeric_std.all;
  4.  
  5. architecture behavior of demux is
  6.  
  7. begin
  8. process (SEL, IN1) is begin
  9. if(SEL = "00") then
  10. OUT1<=IN1;
  11. OUT2<="00000000";
  12. OUT3<="00000000";
  13. OUT4<="00000000";
  14. elsif(SEL = "01") then
  15. OUT2<=IN1;
  16. OUT1<="00000000";
  17. OUT3<="00000000";
  18. OUT4<="00000000";
  19. elsif(SEL = "10") then
  20. OUT3<=IN1;
  21. OUT2<="00000000";
  22. OUT1<="00000000";
  23. OUT4<="00000000";
  24. elsif(SEL = "11") then
  25. OUT4<=IN1;
  26. OUT2<="00000000";
  27. OUT3<="00000000";
  28. OUT1<="00000000";
  29. else
  30. OUT1<="00000000";
  31. OUT2<="00000000";
  32. OUT3<="00000000";
  33. OUT4<="00000000";
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. end if;
  42. end process;
  43.  
  44. end behavior;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement