I'm writing vhdl code for a jk-flip-flop on modelsim and i get an error when i try to simulate it: Error: Iteration limit reached at time 0 ns.
I'm not sure what it means, but I've looked through much of my source code for errors to no success. Can anyone guess what the problem might be?
library ieee;
use ieee.std_logic_1164.all;
entity SRlatch is
port(S,R:in bit; Q : inout bit ; QN : inout bit := '1');
end SRlatch;
architecture structural of SRlatch is
begin
Q <= S nand QN;
QN <= R nand Q;
end;
entity JKFlipFlopStruct is
port(J,K,clk : in bit ; Q : inout bit ; QN : inout bit);
end JKFlipFlopStruct;
architecture structural of JKFlipFlopStruct is
component SRlatch is
port(S,R:in bit; Q : inout bit ; QN : inout bit := '1');
end component;
signal J0,K0,J1,K1,J2,K2 : bit;
begin
J0 <= not ( J and QN and clk) );
K0 <= not ( K and Q and clk) );
f1 : SRlatch port map ( J0,K0,J1,K1 );
J2 <= not ( J1 and (not clk) );
K2 <= not ( K1 and (not clk) );
f2 : SRlatch port map ( J2,K2,Q,QN );
end structural;
[JK Flop Flop negative edge triggered]
see image :http://i.stack.imgur.com/J3m1J.gif