You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
538 B

2 years ago
  1. module zutils_reset_sig_gen (
  2. input clk, //clock input
  3. input rst_n, //asynchronous reset input, low active
  4. output reg rst_n_out
  5. );
  6. reg [31:0] counter = 0;
  7. always @(posedge clk or negedge rst_n) begin
  8. if (!rst_n) begin
  9. counter <= 0;
  10. rst_n_out <= 0;
  11. end else begin
  12. if (counter < 10) begin
  13. rst_n_out <= 0;
  14. counter <= counter + 1;
  15. end else if (counter == 10) begin
  16. counter <= counter;
  17. rst_n_out <= 1;
  18. end
  19. end
  20. end
  21. endmodule