Asynchronous reset

Assert reset between two clock edges and observe how Q updates in RTL. Then examine recovery and removal requirements at release and how to synchronize that release separately in each clock domain.

Reuse the two low reset pulses from the synchronous example. The first, from 7 to 9 ns, lies between rising edges. With active-low asynchronous reset, when does Q clear?

A falling reset edge can trigger the clear

The block responds to a falling rst_n as well as posedge clk. With rst_n=0, RTL clears Q to 00 in that simulation time slot. Raising rst_n releases reset. The next rising clock edge can then capture D.

The falling rst_n at 19 ns clears Q to 00. The next rising clock edge is at 25 ns.
19 ns is the event time in the RTL simulation.

Add the falling reset edge to the event control

negedge rst_n enables clearing between clock edges. if (!rst_n) also handles a rising clock edge that occurs while reset remains low.

module asynchronous_reset8 (
    input  logic       clk,
    input  logic       rst_n,
    input  logic [7:0] d,
    output logic [7:0] q
);
    always_ff @(posedge clk or negedge rst_n) begin
        if (!rst_n)
            q <= 8'h00;
        else
            q <= d;
    end
endmodule

Read both assertions and both releases

These pulses are the same as in the synchronous-reset example. The data is hexadecimal. Q is the value observed after the event.

nsEventrst_nQ
5E0 stores 31131
7First assertion000
9Release100
15E1 stores 52152
19Second assertion000
25E2 with reset still active000
27Release100
35E3 stores A61A6
Q clears at 7 and 19 ns with the falling reset edges, then stays at 00 when reset releases at 9 and 27 ns.
The falling reset edge clears Q. A rising clock edge resumes sampling.

Physical flip-flops have recovery and removal requirements. Release before a rising edge needs enough recovery time. Release after a rising edge must wait for the minimum removal interval. A common design asserts reset asynchronously and synchronizes release separately with each domain’s own clock. Domains can leave reset at different times. A crossing protocol must allow for this interval. This single-domain RTL trace checks the event order.

Replay the lab

Extract the executable lab on Linux or WSL and run bash run.sh. Icarus Verilog 12.0 checked 8 timed observations. The archive contains the RTL, testbench, log, VCD and generic Yosys structure. The synchronous and asynchronous labs use the same input schedule. Check physical release timing against the target cells and constraints. Continue with F07 on registers, F14 on clocks and reset.

Interactive lab

Store 31 and then pull rst_n low. Observe what happens on release and at the next rising edge.

Stored Q
Show the last eight observations

    Teaching film

    Read the transcript

    Run the RTL yourself

    Extract the lab and follow the commands in its README. Compare the simulated outputs and waveform with your predictions from the interactive lab.

    Download Asynchronous reset RTL (.zip)

    Check your understanding

    1. rst_n falls at 7 ns after the previous rising edge stored 31. What happens?
    2. At 9 ns, rst_n goes high. What does Q do at release?
    3. What timing requirements apply near the sampling edge when an asynchronous reset is released?
    4. Clock domains A and B share an external reset. How should release be synchronized?
    5. Reset is asserted at 19 ns and released at 27 ns. D has held A6 since 17 ns. When is it first captured?