Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. library ieee; use ieee.std_logic_1164.all;
  2. entity Controller is port(
  3. S: in std_logic;
  4. IR: in std_logic_vector (1 downto 0);
  5. IR_LD: out std_logic;
  6. MSA: out std_logic_vector (1 downto 0);
  7. MSB: out std_logic_vector (1 downto 0);
  8. MSC: out std_logic_vector (2 downto 0)
  9. );
  10. end Controller;
  11. architecture behavior of Controller is
  12. begin
  13. IR_LD <=
  14. (NOT S);
  15. MSC(2) <=
  16. (S AND IR(1));
  17. MSC(1) <=
  18. (S AND IR(1) AND IR(0));
  19. MSC(0) <=
  20. (S AND IR(1));
  21. MSB(1) <=
  22. ((NOT S) OR IR(1) OR IR(0));
  23. MSB(0) <=
  24. (S AND (NOT IR(1)) AND (NOT IR(0)));
  25. MSA(1) <=
  26. (S AND IR(1));
  27. MSA(0) <=
  28. ((NOT S) OR IR(1) OR (NOT IR(0)));
  29. end behavior;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement