异步复位,同步释放

关于异步复位同步释放的原理不再赘述,直接贴 verilog 代码如下:

 1 module reset_sync (clk, rst_n, rst_n_sync);
 2     input    clk;
 3     input    rst_n;
 4     output   rst_n_sync;
 5     //reg      rst_n_sync;
 6 
 7     parameter RST_WIDTH = 3; //一般两级D触发器即可极大降低亚稳态
 8     reg  [RST_WIDTH-1:0]    rst_dff;
 9     
10     // asynchronous reset synchronous release
11     always @(posedge clk or negedge rst_n)
12         if (!rst_n) 
13             rst_dff  <= {RST_WIDTH{1'b0}};
14         else 
15             rst_dff  <= {rst_dff[RST_WIDTH-2:0], 1'b1};
16     
17     assign rst_n_sync = rst_dff[RST_WIDTH-1];
18 
19 endmodule

综合出的  3 级同步器 RTL 如下图:

 

 

 

 

参考:https://blog.csdn.net/times_poem/article/details/51866520

           https://www.cnblogs.com/yfwblog/p/4793118.html

           https://blog.csdn.net/u011729865/article/details/49281713

           http://www.52-ic.com/?p=423

           https://blog.csdn.net/qq_27712865/article/details/47858997

posted @ 2018-12-27 23:34  纟彖氵戋  阅读(262)  评论(0编辑  收藏  举报