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_asynchas an asynchronous, active-low reset,rst_n: it clears the momentrst_nfalls, without waiting for the clock.q_synchas a synchronous, active-high reset,srst: it clears on a rising edge wheresrstis 1, and ignoressrstbetween 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.