Skip to content

Instantly share code, notes, and snippets.

@ddribin
Created April 23, 2021 15:08
Show Gist options
  • Save ddribin/94659d97c59b44317e0fad734ed70c94 to your computer and use it in GitHub Desktop.
Save ddribin/94659d97c59b44317e0fad734ed70c94 to your computer and use it in GitHub Desktop.
Asynchronous Assertion, Synchronous De-assertion
module reset_sync(
output reg rst_sync,
input clk, rst_n
);
reg R1;
always @(posedge clk or negedge rst_n)
if(!rst_n) begin
R1 <= 1'b0;
rst_sync <= 1'b0;
end else begin
R1 <= 1'b1;
rst_sync <= R1;
end
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment