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. Reset-less Flops and Initial Values

Part 4 · Sequential, FSM and Memory · Intermediate

Reset-less Flops and Initial Values

Why datapath flops skip reset, and what initial values really mean.

On this page

    Why datapath flops skip reset

    Reset costs a pin, routing and area on every flop that carries it. Wide datapaths therefore reset only what correctness needs: state, valid flags and control.

    Data registers that are always written before they are read need no reset. Their first useful value comes from a load, not from power-up.

    What Yosys builds

    The script below mixes one reset-less bit with one sync-reset bit. It asserts one $dff beside one $sdff, proving the two families coexist in one module.

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

    Area of the choice

    The program below prices reset against reset-less registers in teaching-library units. Its five self-checks repeat the hand arithmetic exactly.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    import sys
    
    DFF = 8.0
    DFFR = 10.0
    
    def reg_area(bits, reset):
        cell = DFFR if reset else DFF
        return bits * cell
    
    checks = [
        (reg_area(32, False), 256.0),
        (reg_area(32, True), 320.0),
        (reg_area(64, False), 512.0),
        (reg_area(64, True), 640.0),
        (reg_area(64, True) - reg_area(64, False), 128.0),
    ]
    
    for i in range(len(checks)):
        got, want = checks[i]
        if abs(got - want) > 1e-9:
            print("FAIL: check " + str(i + 1) + " got " + str(got) + " want " + str(want))
            sys.exit(1)
    
    print("PASS: reset-less datapath areas match hand arithmetic on 5 checks")
    Diagram
    course.lib EXAMPLE areas: DFF = 8 units, DFFR = 10 units
    64-bit datapath without reset: 64 x 8 = 512 units
    64-bit datapath with reset: 64 x 10 = 640 units
    saving = 640 - 512 = 128 units = 128 / 640 = 20% of the reset version

    Initial values and X

    An initial assignment sets the simulation value at time zero. Whether it reaches hardware depends on the target: some FPGA flows honour it while an ASIC flow has no such cell.

    A flop with no reset reads unknown (x) in simulation until its first load. Silicon powers up to an unpredictable but resolved 0 or 1, so any bit read before its first write is still a real bug.

    Common mistakes

    Common pitfall

    Resetting the datapath but not its valid flag leaves stale data marked valid after reset. Reset the control that says the data is meaningful, even when the data bits themselves skip reset.

    Interview

    Likely probes: which flops may skip reset and what initial guarantees.

    • Data written before read may skip reset; state and valid flags keep it.

    • initial sets simulation start and guarantees nothing about ASIC power-up.

    • Simulation shows x; silicon powers up to an unpredictable but resolved 0 or 1, so reading before the first write is still a real bug.

    Check yourself A 64-bit pipeline register is always loaded before its output is used. What does adding a reset cost in course.lib units?

    128 extra units: 640 with reset against 512 without. The saving is 20% of the reset version.

    Check yourself Simulation shows x on a reset-less data bus for the first cycles, then valid data. Is the design broken?

    Not necessarily. If the consumer ignores the bus until its valid flag asserts, the x window is harmless. If anything reads it first, that read is a bug.

    Related topics

    • Synchronous and Asynchronous Reset

    • Mapping Flops to Library Cells

    • Retiming and Pipelining

    • Simulation-Synthesis Mismatch

    Previous

    55 / 139

    Next: Mapping Flops to Library Cells

    Up next

    Up nextMapping Flops to Library Cells

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • D Flop Inference
    • Enables: Mux or Clock Enable