RTL Design #4 · 2026-09-27 · Resets · Easy · about 10 min

Asynchronous and synchronous resets

two_resets has two flops that capture d on every rising edge of clk:

  • q_async has an asynchronous, active-low reset, rst_n: it clears the moment rst_n falls, without waiting for the clock.
  • q_sync has a synchronous, active-high reset, srst: it clears on a rising edge where srst is 1, and ignores srst between edges.

The current design.sv gets both wrong. Fix it.

Write and run your answer in the browser. The hidden tests check it, and it’s free.