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

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

Part 4 · FSM & Control · Intermediate

The Sequencer Mindset

Plan a multi-cycle block with a start-busy-done interface, phases and a cycle table.

On this page

    Why this matters

    A block that works only while its caller keeps the inputs still fails at random in the field. Fixing the start, busy and done rules before writing any state avoids most of those integration bugs.

    After this lesson you 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.

    Planning a sequencer

    Work through these steps before writing states. The cycle table becomes the coding plan.

    1. Define the interface. Name the start, busy and done signals. State when start is honoured and how long the result stays valid.

    2. List the phases. Load operands, repeat the step N times, then report. Each phase becomes one or more states.

    3. Write the cycle table. Trace one example cycle by cycle: state, key registers and control signals.

    4. Choose the counter. If N is variable, load N and count down to zero: a zero-detect is cheaper than comparing against a stored N. For a constant N either form is fine.

    5. Define reset and idle. State what busy, done and the result show after reset and between operations.

    Interface contract

    The table fixes the handshake. The diagram shows the states around it.

    Signal

    Meaning

    Rule

    start

    Begin an operation with the operands on the inputs

    Honoured only in IDLE; ignored while busy

    busy

    The block cannot accept a new operation

    High through RUN and DONE; low only in IDLE. An operation is accepted on start && !busy

    done

    The result is valid this cycle

    A one-cycle pulse; the result register stays stable afterwards

    operands

    Inputs sampled on start

    Captured into registers, so they may change while busy

    State diagram with IDLE, RUN and DONE.
    The generic sequencer: wait, repeat a step until the counter expires, report.

    Each slot is one clock cycle, sampled just after its rising edge. b stays 3 throughout. An input drawn in slot k is seen by the edge that opens slot k+1.

    • Slot 0: start is offered while busy is low, so the next edge accepts 5 and 3.

    • Slots 1 to 5: busy is high. start stays high and a changes to 9, and both are ignored: the result is still 5 × 3 = 15 (f).

    • Slot 5: done is high for one cycle with the product valid. busy is still high, so this cycle cannot accept.

    • Slots 6 and 7: busy is low and start is still high, so the edge opening slot 7 accepts the next operation (9 × 3) and the product register restarts from 0.

    Tip

    Always capture the operands in registers on start. Otherwise the result depends on inputs that the caller is free to change during the operation, and you will see random failures only when the caller is busy.

    Common mistakes

    Ambiguous handshake semantics cause most integration bugs. Pin them down early.

    Common pitfall

    Ambiguous done semantics cause integration bugs: is it a pulse or a level? Is the result valid in the same cycle or the next? Write it into the interface table and test for it; the multiplier in the next lesson checks that done and the result line up.

    Check yourself Why does the block ignore start while busy?

    Starting while busy would overwrite the operand and loop registers in the middle of an operation and corrupt it. A busy block must either ignore the request (and expose busy so the caller waits) or queue it.

    Remember

    • 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.

    Keep going

    • Interview: run a mock interview on this topic

    Related topics

    • Shift-add multiply

    Previous

    103 / 350

    Next: Shift-Add Multiply

    Up next

    Up nextShift-Add Multiply

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Memory Read Sequencer with Latency
    • Sequencer Robustness
    clkstarta59busydoneproduct05f09
    The interface contract on the shift-add multiplier of the next lesson, shrunk to 4 bits: 5 x 3 with start held high and a changed while busy, then the next operation accepted on the first idle edge; values in hex