异步复位的下降沿与时钟上升沿撞一起了,会怎么样?
专栏:ExASIC July 5, 2026, 5:14 p.m. 47 阅读
讨论:为什么后仿只需要检查复位释放时刻的recovery和removal

如下图,是一个典型的异步复位同步释放的电路。

image.png

在后仿时,应当要忽略sync1和sync2的recovery和removal的检查,加设no timing check,因为rstn是完全异步的。

BUT,后仿时,rstn的下降沿是不查的,即使与时钟上升沿靠得很近。只检查rstn的上升沿,即复位释放时刻与时钟的上升沿的关系。从verilog的仿真model可以看出来,如下,$recrem(posedge RB ...。为什么是这样的呢?因为DFF的复位生效时,即复位的下降沿,也可以说是低电平,是电平起作用。是组合逻辑与非门生效,与时钟上升沿无关。

$setuphold (posedge CK &&& adacond_RB == 1, posedge D &&& adacond_RB == 1, 0, 0, notifier,,, delayed_CK, delayed_D); 
$setuphold (posedge CK &&& adacond_RB == 1, negedge D &&& adacond_RB == 1, 0, 0, notifier,,, delayed_CK, delayed_D); 
$recrem (posedge RB &&& adacond_D == 1, posedge CK &&& adacond_D == 1, 0, 0, notifier,,, delayed_RB, delayed_CK); 
$width (posedge CK &&& adacond_D_AND_RB == 1, 0, 0, notifier); $width (negedge CK &&& adacond_D_AND_RB == 1, 0, 0, notifier); 
$width (posedge CK &&& adacond_NOT_D_AND_RB == 1, 0, 0, notifier); $width (negedge CK &&& adacond_NOT_D_AND_RB == 1, 0, 0, notifier); 
$width (negedge RB &&& adacond_CK_AND_D == 1, 0, 0, notifier); $width (negedge RB &&& adacond_CK_AND_NOT_D == 1, 0, 0, notifier); 
$width (negedge RB &&& adacond_NOT_CK_AND_D == 1, 0, 0, notifier); $width (negedge RB &&& adacond_NOT_CK_AND_NOT_D == 1, 0, 0, notifier);

595a7886-d081-49c2-be7f-54c88b1118f9.png

所以,即使sink_dff的复位生效也是异步的,很可能与时钟上升沿撞到一起,但是组合逻辑生效,与有无时钟上升沿无关。所以说也就无需检查rstn_sync的下降沿与时钟上升沿的关系。

总结:对于开始图中的sink_dff,不需要额外的no timing check,正常检查就好。因为工具只会检查复位释放时刻的recovery和removal违例,与真实电路需要相符。

注意事项:rstn_sync只能用于sink_dff的复位端,不能接到D端(不能放if条件里判断)。那就会遇到新的setup/hold的问题了。

感谢阅读,更多文章点击这里:【专栏:ExASIC】
公众号:【ExASIC】

分享数字集成电路设计中的经验和方法。分享让工作更轻松。

最新20篇 开设专栏