Wednesday, December 23, 2009

VHDL code for JK Flip Flop

library ieee;
use ieee.std_logic_1164.all;

entity bejoy_jkff is
port(j,k,clk:in std_logic;q,q1,z:inout std_logic);
end bejoy_jkff;

architecture arc of bejoy_jkff is
begin
process(clk)
begin

if clk='1' then
z<=(j and (not q)) or ((not k) and q);
q<=z after 5ns;
q1<=not z after 5ns;

end if;
end process;
end arc;

7 comments:

  1. thanks for posting this

    ReplyDelete
    Replies
    1. thank you for posting dude !!!!

      Delete
  2. When J=1 & K=1, how will the values toggle?

    ReplyDelete
  3. stfu nigga!
    thanks anyways

    ReplyDelete