14 lines
441 B
Systemverilog
14 lines
441 B
Systemverilog
`timescale 1ns/1ps
|
|
// Asynchronous assertion, synchronous release in each destination clock.
|
|
module reset_sync (
|
|
input wire clk,
|
|
input wire arst_n,
|
|
output wire rst
|
|
);
|
|
(* ASYNC_REG = "TRUE", SHREG_EXTRACT = "NO" *) reg [1:0] release_pipe;
|
|
always @(posedge clk or negedge arst_n)
|
|
if (!arst_n) release_pipe <= 2'b00;
|
|
else release_pipe <= {release_pipe[0], 1'b1};
|
|
assign rst = ~release_pipe[1];
|
|
endmodule
|