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.
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.
| ns | Event | rst_n | Q |
|---|---|---|---|
| 5 | E0 stores 31 | 1 | 31 |
| 7 | First assertion | 0 | 00 |
| 9 | Release | 1 | 00 |
| 15 | E1 stores 52 | 1 | 52 |
| 19 | Second assertion | 0 | 00 |
| 25 | E2 with reset still active | 0 | 00 |
| 27 | Release | 1 | 00 |
| 35 | E3 stores A6 | 1 | A6 |
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
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)