Advertisement
Guest User

Untitled

a guest
May 24th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. entity ffjk is
  4. port(
  5. J,K: in std_logic;
  6. Q,NQ: buffer std_logic
  7. );
  8. end ffjk;
  9. architecture flipflop of ffjk is
  10. begin
  11. process (J,K)
  12. begin
  13. if J ='0' and K='0' then
  14. Q <= Q;
  15. NQ <= NOT Q;
  16. end if;
  17. if J ='0' and K='1' then
  18. Q <= '0';
  19. NQ <= '1';
  20. end if;
  21. if J ='1' and K='0' then
  22. Q <= '1';
  23. NQ <= '0';
  24. end if;
  25. if J ='1' and K='1' then
  26. Q <= NOT Q;
  27. NQ <= NOT Q;
  28. end if;
  29.  
  30. end process;
  31. end flipflop;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement