OpenCores
URL https://opencores.org/ocsvn/datetime/datetime/trunk

Subversion Repositories datetime

[/] [datetime/] [trunk/] [rtl/] [verilog/] [sync2s.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 robfinch
// two stage synchronizer
2
 
3
module sync2s(rst, clk, i, o);
4
        input rst;
5
        input clk;
6
        input i;
7
        output o;
8
 
9
        reg [1:0] s;
10
        always @(posedge clk)
11
                if (rst)
12
                        s <= 0;
13
                else
14
                        s <= {s[0],i};
15
 
16
        assign o = s[1];
17
 
18
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.