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
    • Controller and Datapath
    • Moore vs Mealy
    • State Encoding
    • Multi-Cycle Sequencers
      • The Sequencer Mindset
      • Shift-Add Multiply
      • Memory Read Sequencer with Latency
      • Sequencer Robustness
    • UART Transmitter
    • Memory Controller
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹FSM & Control
  1. Topics
  2. RTL Design
  3. FSM & Control
  4. Multi-Cycle Sequencers

Part 4 · FSM & Control · Intermediate

Multi-Cycle Sequencers

Sequencers that spread one operation over several cycles to save area and ease timing.

  • 4topics
  • 4lessons

Topics in this section

  1. 1The Sequencer Mindset1 lesson
  2. 2Shift-Add Multiply1 lesson
  3. 3Memory Read Sequencer with Latency1 lesson
  4. 4Sequencer Robustness1 lesson
On this page

    Some operations are too large for one clock period. A sequencer spreads them over several cycles, trading latency for area and clock speed.

    Operation

    One cycle

    Sequenced

    8×8 multiply

    A full array of adders

    One adder, 8 steps (this topic)

    Memory read

    Not possible if the RAM has latency

    Issue, wait, capture

    Division, CRC over a block, packet parsing

    Large combinational logic

    A loop in an FSM

    Lessons in this topic

    4 lessons, about 17 min

    1. 1The Sequencer MindsetYou can plan a multi-cycle sequencer from an interface table and a cycle table, and say what busy, done and the result show after reset and between operations.4 min
    2. 2Shift-Add MultiplyYou can build a shift-add multiplier, state its latency from acceptance to done, and say when the next start is accepted.4 min
    3. 3Memory Read Sequencer with LatencyYou can build a read sequencer with a parameterised wait, and work out from the edge table when the data is available and when a consumer samples it.4 min
    4. 4Sequencer RobustnessYou can add a handshake, a timeout, an abort and a drain state to a sequencer, and state the contract it needs from the other side.5 min

    Interview

    Typical prompts: “Multiply two numbers using only an adder”, “Interface a block to a RAM with 2-cycle read latency”, and “What happens if the memory never answers?”. All three appear in this topic.

    Check yourself An 8-bit shift-add multiplier needs one adder and 8 iterations. What is the trade-off compared with a combinational 8×8 array multiplier?

    The sequenced version is much smaller (one adder and a few registers) but done is observed 9 edges after acceptance, and a new multiply can start only every 10 cycles. The array multiplier has one-cycle throughput but uses roughly 8 adders' worth of logic with a long combinational path.

    Revision sheet

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

    The Sequencer Mindset

    • Capture the operands in registers on start, because the caller may change the inputs during the operation.

    • Pin down done: a pulse or a level, and whether the result is valid in the same cycle or the next.

    • Load N and count down to zero when N varies. A zero-detect is cheaper than a comparison with a stored N.

    Rule of thumb: write the cycle table before the states.

    Shift-Add Multiply

    • Acceptance is edge 0, iterations run at edges 1 to W, and the product and done follow edge W. The earliest next acceptance is edge W + 2.

    • done marks a valid product, and !busy marks readiness for a new operation. They are different signals.

    • The multiplicand register must be 2W bits wide, or the high bits are silently dropped.

    Rule of thumb: count latency from the acceptance edge and say which edge a consumer samples on.

    Memory Read Sequencer with Latency

    • Issue the address, wait L - 1 cycles, then capture. Data is available L + 1 periods after acceptance and the consumer samples at L + 2.

    • Register done together with the data. A combinational done can announce a result a cycle before the data register holds it.

    • Make the latency a parameter and test several values.

    Rule of thumb: if the RAM output register changes, the sequencer's latency parameter changes with it.

    Sequencer Robustness

    • Wait for rvalid rather than counting cycles, and bound every wait with a timeout or a proof of termination.

    • A timeout is a failure report. The ERR state keeps busy high until the peer is quiet and recover is asserted.

    • DRAIN absorbs a late answer after an abort. Without it, the aborted word lands in the next read.

    Rule of thumb: design for the whole protocol, not only the happy path.

    Practise it

    • Mini project: an SPI master, controller and datapath

    • Practice question: Waveform debug of a write transaction timeout

    • Interview: run a mock interview on this topic

    PreviousNext: The Sequencer Mindset

    Up next

    Up nextThe Sequencer Mindset

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Controller and Datapath
    • Moore vs Mealy
    • State Encoding