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
  • Datapath Synthesis14
  • Area, Power and Test14
  • Verification, ECO and Handoff15
  • Flows and Debugging15
    • Scripted Flows and Regression
    • Debugging QoR
      • The QoR Debug Method
      • Reading Reports to Localise
      • Constraint Causes
      • RTL Structure Causes
      • Fanout, Black Boxes and Classifying Paths
    • Simulation-Synthesis Mismatch
  • Interview and Judgment11
Loading lesson

‹Debugging QoR
  1. Topics
  2. Logic Synthesis
  3. Flows and Debugging
  4. Debugging QoR
  5. RTL Structure Causes

Part 8 · Flows and Debugging · Intermediate

RTL Structure Causes

Latches, deep priority chains, and unshared arithmetic that set depth.

On this page

    Unintended latches

    A combinational block that misses an assignment on some path keeps its old value. The tool builds storage, and timing through it turns murky.

    The cure is structural: assign every output on every path, or move the storage into an explicit clocked block.

    Shape

    Sign

    Fix

    Missing else or default

    Latch cell in the report on a combinational block

    Add the missing default assignment.

    Partial case coverage

    Latch on one select value only

    Cover all values or add a default arm.

    Read-before-write

    Feedback loop through the block

    Order writes before reads, or register the state.

    Deep priority logic

    A nested if-else chain tests requests one at a time. The last request waits behind every earlier test, so depth grows with the request count.

    The runnable Yosys block below builds an 8-request chain and pins its 7 mux stages with an assertion. The balanced depth beside it is hand arithmetic.

    yosys
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    read_verilog <<EOV
    module prio_chain(input wire [7:0] req, output wire [2:0] idx);
    assign idx = req[0] ? 3'd0 : req[1] ? 3'd1 : req[2] ? 3'd2 : req[3] ? 3'd3 : req[4] ? 3'd4 : req[5] ? 3'd5 : req[6] ? 3'd6 : 3'd7;
    endmodule
    EOV
    hierarchy -check -top prio_chain
    proc
    opt_clean
    select -assert-count 7 t:$mux
    log PASS: 8-line priority chain holds 7 mux stages
    Diagram
    chain stages = 8 requests - 1 = 7 mux stages (pinned by the block above)
    balanced tree depth = ceil(log2(8)) = 3 stages
    saved stages = 7 - 3 = 4 stages

    Restructuring into a tree, a case decode, or a one-hot select removes stages. Exact gains vary between tools and libraries.

    Unshared arithmetic

    Two adders that never fire together still cost two adders unless the source shares them. Area reports show the same operator repeated side by side.

    Sharing helps only when the operations exclude each other in time. Forcing it elsewhere adds muxing without removing area.

    Pattern

    Report sign

    Fix

    Two adds, one per branch

    Two adder cells of the same width

    Compute once into a shared adder under a select.

    Add then subtract on one path

    Chained arithmetic on the worst path

    Reorder or pipeline the datapath instead.

    Common mistakes

    Common pitfall

    Flattening a priority chain into parallel logic without keeping the priority changes the function. Prove the restructure equivalent before trusting its timing.

    Interview

    Likely probes: depth arithmetic and the latch tell.

    • An 8-deep priority chain holds 7 mux stages; a balanced tree needs 3.

    • A latch means a combinational block missed an assignment somewhere.

    • Repeated operators mean the source never shared them, not that the tool failed.

    Check yourself An 8-request priority chain shows 7 mux stages. What does a balanced tree need?

    Three stages, since ceil of log2 of 8 is 3. Restructuring can save 4 stages here.

    Check yourself A combinational block infers a latch on one select value. What is the structural cause?

    That value has no assignment, so the output must hold state. Cover it with a default or a full case.

    Related topics

    • Constraint causes

    • Resource sharing and arithmetic inference

    • Latch inference

    Previous

    122 / 139

    Next: Fanout, Black Boxes and Classifying Paths

    Up next

    Up nextFanout, Black Boxes and Classifying Paths

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • The QoR Debug Method
    • Reading Reports to Localise