我正在爲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