【发布时间】:2013-10-03 02:20:05
【问题描述】:
我正在为 modelsim 上的 jk-flip-flop 编写 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 负边沿触发]
【问题讨论】:
标签: vhdl