我正在尝试用非常快的时钟编写异步数字系统。输入由两个开关和一个按钮确定,以允许输入输入。每个输入确定允许传递到另一个状态。我用的是digilent basys2板的内部时钟B8。我似乎正确地到达了第二个州,但我无法到达其他州。行为模拟给出了预期的结果。这是我的实现,
entity states is
Port ( X : in STD_LOGIC;
Y : in STD_LOGIC;
clock : in STD_LOGIC;
input : in STD_LOGIC);
end states;
architecture Behavioral of state is
signal FF : STD_LOGIC_VECTOR (2 downto 0):="000";
begin
process(clock)
begin
if(rising_edge(clock)) then
if(input='1') then
FF(0)<= (((FF(1)) and (FF(2)) and (not X) and Y) or (FF(0)));
FF(1)<= (((not FF(0)) and (not FF(1)) and (FF(2)) and X and (not Y));
FF(2)<= (((not FF(0)) and (not FF(1)) and (not FF(2)) and X and Y)
or ((not FF(0)) and (FF(1)) and (not FF(2)) and (not X) and (not Y)));
Z <= (((not FF(0)) and (FF(1)) and (FF(2)) and (not X) and Y) or (FF(0)));
end if;
end if;
end process;
end Behavioral;
这是董事会的任务,
NET "clock" LOC = "B8" ;
NET "input" LOC = "C11" ;
NET "X" LOC = "L3" ;
NET "Y" LOC = "P11" ;
为什么模拟会给出预期的结果,但板上的测试却没有。我会很感激你的帮助。