跨时钟域信号时序分析问题
时间:10-02
整理:3721RD
点击:
FPGA型号,spartan-627M时钟下产生的40ms计时器,然后做了一个10ms的脉冲信号
process(clk_27)
begin
if rising_edge(clk_27) then
case (cnt_40ms) is
when xx | xx | xx | xx =>
sig1 <= '1';
when others =>
sig1 <= '0';
end case;
end if;
end process;
然后这个信号在59m时钟下需要使用启动一个状态机,使用如下;
process(clk_59)
begin
if rising_edge(clk_59) then
sig1_reg1 <= sig1;
sig1_reg2 <= sig1_reg1;
sig1_reg3 <= sig1_reg2;
sig1_rise <= (not sig1_reg3) and reg2;
end if;
end process;
process(clk_59)
begin
if rising_edge(clk_59) then
case state is ----状态机
when idle =>
if sig1_rise = '1' then
state <= s0;
else
state <= idle;
end if;
when s0 =>
.......
end case;
end if;
end process
上述所有信号均有复位,只是这没有写了;
这样布局布线后时序分析报告显示clk_59的最小周期为20000多ns 。报的
sig1_reg1 <= sig1这条路径建立保持时间不足,搞不明白为什么;把
if sig1_rise = '1' then屏蔽之后就正常了,clk_59的最小周期为4ns多,但屏蔽了怀疑这条路径就被优化了。
查看布局布线结果,两个寄存器离的挺近的,应该不是布线延时的原因,布线延时也应该到不了这个量级,状态机的状态也只有三四个,信号也就这一个地方用到了;
改过一个版本将该信号驱动别的逻辑而不是这个状态机,现象差不多,还是20000多ns;
换过ISE版本测试,效果一样;
时序分析报告是ISE自动产生的;
求大神指点,这是ISE时序分析的bug还是什么原因 。
代码敲的有点问题,除了第一个进程用的是27m时钟,后面用的都是同一个59m时钟
为啥没人呢 。
I didn't approve your design as this totally asynthonous design. It is not reliable for digital circuit. But at current design, you should consider multi-cycle constraints to sure all data pathes to satisfy timing requirement.
