我正在为modelsim上的jk触发器编写vhdl代码,当我尝试模拟它时出现错误:错误:在时间0 ns达到迭代限制。
我不确定这意味着什么,但我已经查看了我的大部分源代码中的错误,但没有成功。谁能猜出问题可能是什么?
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 触发器下降沿触发]
见图片:http: //i.stack.imgur.com/J3m1J.gif