Add synchronizer module

This commit is contained in:
Graham Edgecombe 2017-12-06 08:22:30 +00:00
parent 3be5990b17
commit 998dd0f0ba

19
sync.sv Normal file
View file

@ -0,0 +1,19 @@
`ifndef SYNC
`define SYNC
module sync #(
parameter BITS = 1
) (
input clk,
input [BITS-1:0] in,
output [BITS-1:0] out
);
logic [BITS-1:0] metastable;
always_ff @(posedge clk) begin
metastable <= in;
out <= metastable;
end
endmodule
`endif