Advertisement
Guest User

Untitled

a guest
May 26th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3. use IEEE.STD_LOGIC_ARITH.ALL;
  4. use IEEE.STD_LOGIC_UNSIGNED.ALL;
  5.  
  6. entity cw2vhdl is
  7. Port (Ai : in STD_LOGIC;
  8. Bi : in STD_LOGIC;
  9. Pwe : in STD_LOGIC;
  10. SW1 : in STD_LOGIC;
  11. Pwy : out STD_LOGIC;
  12. Wyn : out STD_LOGIC);
  13. end cw2vhdl;
  14.  
  15. architecture Behavioral of cw2vhdl is
  16. begin
  17. Wyn <= (((not Ai) and (not Bi) and Pwe) or ((not Ai) and Bi and (not Pwe)) or(Ai and Bi and Pwe) or (Ai and (not Bi) and (not Pwe)));
  18.  
  19. Pwy <= ((Bi and Pwe) or (Ai and Bi) or (Ai and Pwe)) when SW1 = '0'
  20. else ((not Ai) and Bi or ((not Ai) and (not Pwe)) or (Bi and Pwe));
  21. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement