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
      • Interview: Sequential and Pipelines
      • Interview: FSM and Control
        • Choosing an FSM Encoding from Timing
        • Moore vs Mealy Outputs
        • Proving an FSM Correct
        • The Controller and Datapath Split
      • 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: FSM and Control

Part 9 · Senior · Senior

Interview: FSM and Control

Four senior interview answers on FSM encoding, output timing, proof, and controller-datapath splits.

  • 4topics
  • 4lessons

Topics in this section

  1. 1Choosing an FSM Encoding from Timing1 lesson
  2. 2Moore vs Mealy Outputs1 lesson
  3. 3Proving an FSM Correct1 lesson
  4. 4The Controller and Datapath Split1 lesson
On this page

    This topic turns four common senior interview questions into model answers and finite RTL checks.

    Decision

    Rule of thumb

    Encoding

    Compare binary and one-hot in implementation reports. Arbitrary async status needs a snapshot handshake; Gray needs an audited one-bit sequence.

    Output style

    Glitch-sensitive boundary: registered output. Same-cycle local reaction: Mealy. Moore decode alone is not necessarily glitch-free.

    Proof

    Show reachability, return to IDLE, and illegal-code recovery.

    Structure

    The controller issues commands. The datapath owns the registers. Status flows back.

    Lessons in this topic

    4 lessons, about 20 min

    1. 1Choosing an FSM Encoding from TimingYou can choose between binary, one-hot and Gray from a timing report, let the tool re-encode an enum, and confirm the result afterwards.6 min
    2. 2Moore vs Mealy OutputsYou can draw the one-cycle gap between a Mealy and a Moore output, and decide which to register before a port.5 min
    3. 3Proving an FSM CorrectYou can check reachability, bounded return to IDLE and illegal-code recovery for a small FSM, and state the input assumptions behind each claim.4 min
    4. 4The Controller and Datapath SplitYou can draw the controller and datapath boundary, say who drives each signal, and signal completion instead of assuming a latency.5 min
    Check yourself An FSM output decode sits on the critical path in STA. What is the first change to try?

    Re-encode the state (often one-hot on FPGA) or register the outputs, then re-run STA. The report picks the encoding, not dogma.

    Interview

    Strong senior answers name the trade-off, the evidence (STA, simulation), and the check that would catch a mistake.

    Revision sheet

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

    Choosing an FSM Encoding from Timing

    • Write the FSM as an enum and let synthesis re-encode it; confirm in the report and re-run STA.

    • Do not use bit tests such as state[1] outside the FSM; export decoded flags.

    • A default-to-IDLE only defines RTL behaviour; recovery needs safe-FSM controls and fault checks.

    Rule of thumb: the report decides the encoding, per FSM.

    Moore vs Mealy Outputs

    • Moore depends on state alone; Mealy also depends on live inputs. Moore is not automatically registered.

    • A combinational Moore decode can still glitch just after an edge.

    • Chained Mealy outputs add up their combinational delay across the chain.

    Rule of thumb: register any output whose consumer needs a glitch-free control.

    Proving an FSM Correct

    • Reach each state through legal inputs first; forcing the state register hides reset and encoding bugs.

    • Liveness holds only under the assumption that an awaited response eventually arrives.

    • State and transition coverage back the claim; line coverage does not.

    Rule of thumb: a default branch specifies RTL behaviour for unused codes, not silicon recovery.

    The Controller and Datapath Split

    • The controller issues commands and reads only status flags; the datapath owns the data registers.

    • Exactly one block drives each signal, and mutually exclusive commands never assert together.

    • Status comparators sit on the controller's critical path, and STA must cover them.

    Rule of thumb: for variable latency, poll done_o instead of counting cycles.

    Practise it

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

    • Practice question: One-hot vs binary encoding trade-offs and pitfalls

    • Practice question: Mixed encoding hazards when tools re-encode automatically

    • Code lab: One-hot control FSM

    • Practice question: FSM output encoding: registered vs combinational hazards

    • Code lab: Moore three-state FSM

    • 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. Timing choices use explicitly illustrative budgets; implemented fault recovery remains a separate signoff obligation.

    PreviousNext: Choosing an FSM Encoding from Timing

    Up next

    Up nextChoosing an FSM Encoding from Timing

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Interview: Combinational and Arithmetic
    • Interview: Sequential and Pipelines
    • Interview: Timing and STA