Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations36
  • Combinational Design25
  • Sequential Design27
    • Flip-Flops and Registers
      • Edge-Triggered State Elements
      • D Flip-Flop with Asynchronous Reset
      • Synchronous Reset and Register Enable
      • Clock Enable vs Gated Clock
      • A Hold Violation, Worked
    • Counters and Timers
    • Shift Registers and LFSRs
    • Pipelining
    • Stalls, Bubbles and Hazards
    • Retiming
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Flip-Flops and Registers
  1. Topics
  2. RTL Design
  3. Sequential Design
  4. Flip-Flops and Registers
  5. D Flip-Flop with Asynchronous Reset

Part 3 · Sequential · Intermediate

D Flip-Flop with Asynchronous Reset

An asynchronous reset acts at once, and its release is synchronized through two flops.

On this page

    Why this matters

    An asynchronous reset is safe to assert at any time but dangerous to release near a clock edge: some flops leave reset one edge earlier than others and the design wakes up inconsistent.

    After this lesson you can: write a flop with asynchronous reset, explain recovery and removal, and draw the reset synchroniser that gives asynchronous assertion with synchronous release.

    Asynchronous reset

    An asynchronous reset forces the flop to its reset value at once, without waiting for the clock. It appears in the sensitivity list beside the clock edge.

    dff_arst.sv
    1
    2
    3
    4
    5
    6
    7
    8
    module dff_arst (
      input  logic clk, rst_n, d,
      output logic q
    );
      always_ff @(posedge clk or negedge rst_n)
        if (!rst_n) q <= 1'b0;                // reset wins: no clock needed
        else        q <= d;
    endmodule

    Asynchronous versus synchronous, side by side

    The waveform simulates both styles in one testbench. The reset drops just after a falling clock edge, so the asynchronous flop clears at once while the synchronous one waits.

    • Early slots: both flops capture d of 1, so both q outputs read 1.

    • Reset assertion: rst_n falls between edges, and the asynchronous q clears at once.

    • Same slot: the synchronous q still reads 1 until the next rising edge.

    • Later slots: after release, both flops capture d of 1 again.

    Release must be synchronous

    Assertion at any time is safe, but release near an edge is dangerous. Some flops can then leave reset on different edges, so the design wakes inconsistently.

    The release edge has recovery and removal times, like setup and hold. The standard recipe is asynchronous assertion with synchronous release.

    Reset asserted asynchronously, held, and released synchronously so all flops leave reset together.
    The standard recipe: assert asynchronously, release synchronously.

    The reset synchronizer

    A two-flop synchronizer handles the release edge. The incoming arst_n holds both flops in reset.

    After release, a 1 shifts through two flops in simulation. The output rst_n nominally deasserts on a clock edge two edges later. The second flop lowers the chance that metastability reaches the output but cannot remove it. Real designs must still meet recovery and removal times, check MTBF, and balance the reset tree. See the reset strategies and synchronizer lessons for those details.

    Asynchronous reset

    Notes

    Assert

    Immediate

    Useful when the clock may be stopped or not yet running

    Release

    Must be synchronized

    Use the two-flop reset synchronizer per clock domain

    Hardware

    Flops with an async-reset pin

    Slightly larger cell, no extra logic on D

    Glitches on reset

    Dangerous: a glitch resets the design

    Drive the source from a flop, not from combinational logic, then feed each clock domain through its own reset synchronizer

    Common mistakes

    Reset needs a clean driver and a synchronized release.

    Common pitfall

    Never create a reset from combinational logic. A glitch on rst_n would reset live flops at a random moment. Register the source so only clean transitions leave it, then pass it through a reset synchronizer in each clock domain for async assert with sync release. A plain register alone does not synchronize release into another domain, and it cannot assert while its clock is stopped.

    Interview

    “How do you safely release an asynchronous reset?” Answer: with a reset synchronizer: asynchronous assertion, synchronous deassertion, one per clock domain.

    Check yourself Why does the testbench release arst_n away from a clock edge, and why does rst_n still stay low for two edges afterwards?

    Releasing near an edge would test the recovery/removal window, which RTL simulation does not model. After release, the first flop captures a 1 on the next edge and the second one on the edge after, so in simulation the downstream reset nominally deasserts two edges later, on a clock edge. That latency is nominal only; it shows reduced risk in RTL, not a physical guarantee.

    Testbench

    The reset synchronizer with a testbench that checks instant assertion and release two edges later.

    reset_sync.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    module reset_sync (
      input  logic clk, arst_n,
      output logic rst_n
    );
      logic meta;
      always_ff @(posedge clk or negedge arst_n)
        if (!arst_n) begin meta <= 1'b0; rst_n <= 1'b0; end   // assert asynchronously
        else         begin meta <= 1'b1; rst_n <= meta;     end // release on a clock edge, two flops deep
    endmodule
    

    Remember

    • Asynchronous reset clears Q at once, without waiting for a clock edge.

    • Release has recovery and removal times, like setup and hold; RTL simulation does not model them.

    • Never build a reset from combinational logic. Use one reset synchroniser per clock domain.

    Rule of thumb: assert asynchronously, release synchronously.

    Keep going

    • Practice: Asynchronous-reset flip-flop: glitch-free reset and metastability

    • Practice: Debugging metastability from asynchronous reset deassertion

    • Code lab: D flip-flop with asynchronous reset

    • Interview: run a mock interview on this topic

    Related topics

    • Synchronous reset and enable

    • Reset strategies

    • A hold violation, worked (recovery and removal)

    Previous

    63 / 350

    Next: Synchronous Reset and Register Enable

    Up next

    Up nextSynchronous Reset and Register Enable

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Clock Enable vs Gated Clock
    • A Hold Violation, Worked
    One slot per clock edge. Reset drops just after the falling edge.clkdrst_nq (async reset)q (sync reset)
    Both flops capture d = 1. When reset falls between clock edges, the asynchronous flop clears immediately; the synchronous flop clears only at the next rising edge.