我正在为modelsim上的jk触发器编写vhdl代码,并且当我尝试模拟它时出现错误:错误:在时间0 ns时达到迭代限制。JK触发器在VHDL中调试迭代极限错误Modelsim
我不确定它是什么意思,但我已经查看了很多我的源代码中的错误没有成功。任何人都可以猜测问题可能是什么?
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触发器触发器下降沿触发]
看到图像:http://i.stack.imgur.com/J3m1J.gif
请参阅图像 –
尝试模拟JUST您的SR锁存器,看看您是否看到同样的错误。 – Russell