【发布时间】:2016-02-25 17:09:20
【问题描述】:
我试图在 ISE 中使用 Isim Simulator 测试 VHDL 项目。行为模拟工作正常,而 Post-Route 会产生很多此类错误:
警告:/X_FF PULSE WIDTH High VIOLATION ON RST; 预期:= 1.794 ns;观察到:=1.369 ns。
为什么会出现这个错误?我该如何解决? 我试图在我的 Basys2 板上加载相关比特流,但它不起作用。可能是由于这个模拟错误吗?谢谢
控制单元代码:
type state is (IDLE, INIT, LSHIFT, ADD, SUB, SETQ);
signal curr, nxt : state := IDLE;
begin
p0: process(clock, reset_n_in)
begin
if reset_n_in = '0' then
curr <= IDLE;
elsif rising_edge(clock) then
curr <= nxt;
end if;
end process;
fsm : process (curr, start,reset_n_in,fine_conteggio,S)
begin
-- if reset_n_in = '0' then
-- reset_n_out <='0';
-- else
-- reset_n_out <='1';
-- end if;
done <='0';
en_write_Q <= '0';
en_shift <= '0';
en_M <= '0';
incrementa_conteggio <= '0';
en_write_S_A <= '0';
carica_operando_Q <= '0';
subtract <= '0';
case curr is
when IDLE =>
if start = '1' then
reset_n_out <='0';
done <='0';
nxt <= INIT;
else
nxt <= IDLE;
end if;
if fine_conteggio = '1' then
done <='1';
nxt <= IDLE;
end if;
when INIT =>
en_M <= '1';
en_write_S_A <= '1';
en_write_Q <= '1';
reset_n_out <='1';
carica_operando_Q <= '1';
nxt <= LSHIFT;
when LSHIFT =>
en_shift <= '1';
nxt <= SUB;
when SUB =>
subtract <= '1';
en_write_S_A <= '1';
nxt <= SETQ;
when ADD =>
en_write_S_A <= '1';
if fine_conteggio = '0' then
incrementa_conteggio <= '1';
nxt <= LSHIFT;
else
nxt <= IDLE;
end if;
when SETQ =>
en_write_Q <= '1';
if S = '1' then
nxt <= ADD;
else
if fine_conteggio = '0' then
incrementa_conteggio <='1';
nxt <= LSHIFT;
else
nxt <= IDLE;
end if;
end if;
end case;
end process;
【问题讨论】:
-
如果没有任何代码和刺激,我们无法帮助您......
-
至少从它自己的错误消息中我可以看出你没有遵守输入 RST 的保持时间
-
我的项目中有很多代码。因为篇幅原因我没有发。但是,如果这有帮助,我可以毫无问题地发布它。
-
关于错误信息,您的复位脉冲太短。您如何生成重置?
-
@Paebbels 我添加了我的项目的代码。它应该做恢复部门。然而,复位信号在顶层实体中,并且在测试台中始终设置为零。
标签: vhdl simulation fpga xilinx xilinx-ise