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
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
    • Low-Power RTL Hub
    • DFT and Scan Hub
    • Physical Awareness Hub
    • Waveform Debug Hub
    • STA and ECO Hub
    • RTL-to-Implementation Closure
    • DFT-Ready RTL
    • Capstone: Resilient Streaming Peripheral
    • Principal Design Review
    • Senior RTL Interview Questions & Model Answers
      • Interview: Combinational and Arithmetic
        • The latch inference trap
        • Signed arithmetic and width truncation
        • Parameterized RTL and carry-chain guards
        • Glitches on enables and combinational hazards
      • Interview: Sequential and Pipelines
      • Interview: FSM and Control
      • Interview: Timing and STA
      • Interview: CDC and Reset
      • Interview: Memories and Buses
      • Interview: Low-Power Design
      • Interview: Debug and ECO
      • Interview: Coding and Whiteboard
  • Glossary and Notation
Loading lesson

‹Senior RTL Interview Questions & Model Answers
  1. Topics
  2. RTL Design
  3. Senior & Interview
  4. Senior RTL Interview Questions & Model Answers
  5. Interview: Combinational and Arithmetic

Part 9 · Senior · Senior

Interview: Combinational and Arithmetic

Four senior interview questions on combinational and arithmetic RTL, with model answers and checked code.

  • 4topics
  • 4lessons

Topics in this section

  1. 1The latch inference trap1 lesson
  2. 2Signed arithmetic and width truncation1 lesson
  3. 3Parameterized RTL and carry-chain guards1 lesson
  4. 4Glitches on enables and combinational hazards1 lesson
On this page

    Senior interviews probe combinational RTL through failure modes. Each lesson supplies a model answer and finite functional checks.

    Lessons in this topic

    4 lessons, about 14 min

    1. 1The latch inference trapYou can spot every path that leaves an output unassigned, fix it with defaults first, and say how lint and a select sweep catch the rest.3 min
    2. 2Signed arithmetic and width truncationYou can size a signed sum to full precision, give the truncation flag condition, and explain why mixing signed and unsigned operands goes wrong.3 min
    3. 3Parameterized RTL and carry-chain guardsYou can size a parameterized adder with W plus $clog2(N) bits, separate output registration from internal pipelining, and reject illegal parameters.4 min
    4. 4Glitches on enables and combinational hazardsYou can explain where a mid-cycle glitch is harmless and where it is not, align an enable with its data, and say when a library ICG is required.4 min
    Check yourself Which contracts prevent latch, truncation, and enable bugs?

    Assign combinational outputs on every path, size results explicitly, and time enables with their associated data. Delaying an enable requires delaying or holding that data too; registration is not a universal requirement.

    Interview

    The strongest answer names the failure mode, the coding rule that prevents it, and the check that proves it: lint for latches, a width flag for truncation, and simulation for enables.

    Revision sheet

    The whole topic on one page, taken from each lesson's Remember box. Read it before an interview, or print it.

    The latch inference trap

    • A latch is inferred whenever a combinational output keeps its previous value on some path.

    • Defaults first covers incomplete if statements as well as the case; a default branch alone does not.

    • An intentional latch is coded as storage, never inferred by omission.

    Rule of thumb: assign every output at the top of the block, then override.

    Signed arithmetic and width truncation

    • Declare signed on the signals; the width and signedness of an expression are fixed before a cast.

    • An addition needs W plus one bits and a multiply needs the sum of the operand widths.

    • Truncation is exact only when the top two sum bits agree.

    Rule of thumb: signed on the signals, full width on the result, and a flag that fires exactly on overflow.

    Parameterized RTL and carry-chain guards

    • W + $clog2(N) bits is a safe unsigned sum width for N = 1 and for non-powers of two.

    • REG_OUT puts the whole addition cone before one register; it does not cut the cone.

    • Test full-scale vectors, and run illegal configurations as separate expected-failure jobs.

    Rule of thumb: keep the full-width sum, and find the actual critical cone in the timing report.

    Glitches on enables and combinational hazards

    • A synchronous enable only matters at the edge: a glitch that settles before setup changes nothing.

    • On a clock line or latch enable the same glitch is a runt edge or a transparent window.

    • If control is delayed, delay the data too, or hold the data through the later accepting edge.

    Rule of thumb: time the enable and its data together, and gate clocks only with a characterised ICG.

    Practise it

    • Mini project: the capstone: a resilient streaming peripheral, stage by stage

    • Practice question: Level-sensitive latch: when it is risky and how to code it safely

    • Practice question: Safe clock gating cell with a latch-based enable

    • Interview: run a mock interview on this topic

    How this was checked

    The benches were executed with Icarus Verilog 13.0 (2026-10-16) and print PASS. Latch inference, mapped arithmetic topology and physical enable/clock timing also need their respective lint and implementation reports.

    PreviousNext: The latch inference trap

    Up next

    Up nextThe latch inference trap

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Interview: Sequential and Pipelines
    • Interview: FSM and Control
    • Interview: Timing and STA