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

  • Logic Synthesis Glossary
  • Logic Synthesis Cheatsheet
  • Synthesis Foundations14
  • Logic Optimisation and Mapping20
  • Constraints and Timing15
  • Sequential, FSM and Memory19
    • Flops, Resets and Enables
      • D Flop Inference
      • Enables: Mux or Clock Enable
      • Synchronous and Asynchronous Reset
      • Reset-less Flops and Initial Values
      • Mapping Flops to Library Cells
    • FSM Synthesis
    • Memory and Macro Inference
    • Retiming and Pipelining
  • Datapath Synthesis14
  • Area, Power and Test14
  • Verification, ECO and Handoff15
  • Flows and Debugging15
  • Interview and Judgment11
Loading lesson

‹Flops, Resets and Enables
  1. Topics
  2. Logic Synthesis
  3. Sequential, FSM and Memory
  4. Flops, Resets and Enables
  5. Synchronous and Asynchronous Reset

Part 4 · Sequential, FSM and Memory · Intermediate

Synchronous and Asynchronous Reset

Sync reset gives $sdff and async reset gives $adff, with set alike.

On this page

    Two reset idioms

    Testing reset inside the clocked block infers a synchronous reset. The reset is then just another data input sampled on the edge.

    Adding reset to the sensitivity list infers an asynchronous reset. The flop clears the moment reset asserts, with no clock needed.

    Idiom

    Sensitivity list

    Generic cell

    if (rst) q <= 1'b0; else q <= d;

    @(posedge clk)

    $sdff

    if (rst) q <= 1'b0; else q <= d;

    @(posedge clk or posedge rst)

    $adff

    if (set) q <= 1'b1; else q <= d;

    Either of the above

    Same family with the constant flipped

    What Yosys builds

    The first script infers a synchronous-reset flop and pins its family. It asserts one $sdff cell and no other flop type.

    yosys
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    read_verilog <<EOV
    module top(input clk, input rst, input d, output reg q);
    always @(posedge clk) if (rst) q <= 1'b0; else q <= d;
    endmodule
    EOV
    hierarchy -check -top top
    proc
    opt
    select -assert-count 1 t:$sdff
    select -assert-none t:$dff
    select -assert-none t:$dffe
    select -assert-none t:$adff
    log PASS: sync reset flop infers one $sdff cell

    The second script infers an asynchronous-reset flop. It asserts one $adff cell and no other flop type.

    yosys
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    read_verilog <<EOV
    module top(input clk, input rst, input d, output reg q);
    always @(posedge clk or posedge rst) if (rst) q <= 1'b0; else q <= d;
    endmodule
    EOV
    hierarchy -check -top top
    proc
    select -assert-count 1 t:$adff
    select -assert-none t:$dff
    select -assert-none t:$dffe
    select -assert-none t:$sdff
    log PASS: async reset flop infers one $adff cell

    Choosing between them

    Synchronous reset is timed exactly like data, so it needs no special timing treatment. Its cost is effect latency: nothing happens until the next active edge.

    Asynchronous reset acts without a clock, which suits power-on and error recovery. Its release must be synchronized to the clock, or some flops leave reset on different edges.

    Property

    Synchronous reset

    Asynchronous reset

    Takes effect

    On the next active clock edge

    At once, with no clock

    Timing treatment

    Like ordinary data

    Needs recovery and removal checks at release

    Extra logic

    A mux input on the data path

    A dedicated pin on the flop

    Common mistakes

    An async reset released by combinational logic can stagger across flops. That skew is a functional bug that only some testbenches catch.

    Common pitfall

    Deasserting an asynchronous reset near a clock edge violates recovery time on some flops and not others. The design then wakes in a mixed state. Synchronize the release and check recovery and removal like setup and hold.

    Interview

    Likely probes: naming the cell from the idiom and the release problem.

    • Reset inside the block is $sdff; reset in the sensitivity list is $adff.

    • Set variants use the same families with the loaded constant flipped.

    • Async reset buys clock-free action and pays with a synchronized release.

    Check yourself A flop must clear even when the clock is stopped. Which idiom, and which cell?

    The asynchronous idiom with reset in the sensitivity list. It infers $adff.

    Check yourself The reset expression moves from the sensitivity list into the clocked block. What changes in the netlist?

    The $adff becomes an $sdff. Clearing now waits for a clock edge and is timed like data.

    Related topics

    • Enables: Mux or Clock Enable

    • Reset-less Flops and Initial Values

    • RTL: Reset Strategies

    Previous

    54 / 139

    Next: Reset-less Flops and Initial Values

    Up next

    Up nextReset-less Flops and Initial Values

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • D Flop Inference
    • Mapping Flops to Library Cells