JK Flip-Flop
CODE
library IEEE;
use IEEE STD_LOGIC_1164.all;
entity JKFF is
port(j, k, clk, rst :in STD_LOGIC;
q, qb:out STD_LOGIC);
end JKFF;
architecture Behavioral of JKFF is
begin
process(j, k, clk, rst)
begin
if rst='1' then
q<='0';
qb<='0';
elsif (clk'event and clk='1' )then
if(j/=k) then
q<=j;
qb<=not j;
elsif(s='1' and r='1') then
q<='not j';
qb<='j';end if;
end if;
end process;
end Behavioral;
0 Comments