sync.v
来自「一个小的UART,可以做为设计参考」· Verilog 代码 · 共 41 行
V
41 行
//
// SYNC.v
//
// Jeung Joon Lee
// www.cmosexod.com
// 8/02/01
//
// This is a double-rank synchronizer
//
module sync (
clk_in,
sys_rst_l,
d,
q
);
input clk_in;
input sys_rst_l;
input d;
output q;
reg pipe1, pipe2;
always @(posedge clk_in or negedge sys_rst_l)
if (~sys_rst_l) begin
pipe1 <= 0;
pipe2 <= 0;
end else begin
pipe1 <= d;
pipe2 <= pipe1;
end
assign q = pipe2;
endmodule
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?