JayBawankar

dcfm j flipflop

Jul 20th, 2017
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.46 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. entity jk is
  6. port(inp:in std_logic_vector(2 downto 0);
  7.      Q:in std_logic_vector(0 downto 0);
  8.      r:out std_logic_vector(0 downto 0));
  9. end jk;
  10. architecture bev of jk is
  11. begin
  12. process(inp)
  13. begin
  14. case inp is
  15. when "000"=>r<=Q;
  16. when "101"=>r<="0";
  17. when "110"=>r<="1";
  18. when "111"=>r<=(not Q);
  19. when others=>r<="U";
  20. end case;
  21. end process;
  22. end bev;
Add Comment
Please, Sign In to add comment