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

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • How to Read the Diagrams
  • Part 0: What Is a Protocol?10
  • Part 1: Timing and Clocking11
  • Part 2: Encoding and Framing12
  • Part 3: Handshakes13
    • Valid-Only Streams
    • Wait States and Stretching
    • The Valid/Ready Handshake
    • The Valid/Ready Rules
    • Request/Acknowledge: Two-Phase and Four-Phase
    • Push and Pull
    • Global Stall or Elastic Pipeline
    • Register Slices
    • Skid Buffers
    • Bubbles and Half Throughput
    • Latency-Insensitive Design
    • Protocols Compared: Handshakes
    • Drills: Handshakes
  • Part 4: Flow Control17
  • Part 5: Transactions19
  • Part 6: Concurrency and Performance17
  • Part 7: Ordering13
  • Part 8: Sharing and Arbitration12
  • Part 9: Deadlock and Liveness13
  • Part 10: Reliability and Recovery20
  • Part 11: Bring-Up and Link Management10
  • Part 12: Power8
  • Part 13: Shared State and Coherence9
  • Part 14: Security and Isolation7
  • Part 15: Specifying and Verifying11
  • Part 16: Protocols Dissected17
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 3: Handshakes
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 3: Handshakes
  4. Drills: Handshakes

Part 3 · Handshakes · All levels

Drills: Handshakes

Interview questions, a whiteboard exercise and a ten-question checkpoint for Part 3.

On this page

    Answer each question out loud before opening it. If you miss more than three in the checkpoint, revisit the lessons linked at the end.

    Interview questions

    Check yourself When is it acceptable to have no ready signal?

    When the consumer can accept a word every cycle at the producer's peak rate, or a FIFO sized for the worst burst sits in front of a consumer whose average rate is higher, or when data may be dropped. Otherwise words are lost silently.

    Check yourself Draw valid/ready with a two-cycle stall.

    Valid rises with word A; ready low for two cycles while valid and A hold; ready high: A moves on that edge. A transfer is an edge with both high; the producer holds valid and data until it happens.

    Check yourself May ready depend on valid? May valid depend on ready?

    Ready may depend on valid; valid must not depend on ready. Otherwise two compliant blocks can deadlock, and both paths together would form a combinational loop.

    Check yourself Why use two-phase signalling across a CDC?

    Each handshake step waits for a synchroniser; two-phase needs one round trip per word instead of four-phase's two, roughly doubling the rate. Only req and ack are synchronised; data is held stable.

    Check yourself Why not stall the whole pipeline with one signal?

    A global stall must reach every register within one cycle; its fan-out and reach grow with depth and width until it is the critical path. Elastic handshakes keep each decision local.

    Check yourself Your ready path fails timing. What do you insert?

    A slice that registers ready with a spare entry, a skid buffer. A bare flip-flop on ready loses one word per stall.

    Check yourself Why does a skid buffer need two entries?

    With ready registered, exactly one extra word arrives after a stall begins; the spare entry catches it, and the output never empties, so throughput stays full.

    Check yourself Your pipeline runs at half rate with no stalls. Why?

    A one-entry stage with in_ready = !full refuses while emptying; valid and ready toggle in opposite phase. Fix: in_ready = !full || out_ready, or a skid buffer.

    Whiteboard exercise

    Task. A 2 mm on-chip route between two blocks needs three register stages to close timing on both the data and the ready paths. The channel must run at one word per cycle. Draw the design, say what each stage is, and give its total storage and latency.

    Check yourself Open a model answer

    Both paths fail, so each stage must cut valid, data and ready: three full slices, that is three skid buffers in a row. Each has an output register and a spare entry, so six entries of storage, and each adds one cycle of data latency: three cycles. Each skid buffer accepts while emptying, so throughput stays at one word per cycle. If only the data path failed, three forward slices (one entry each, combinational ready) would do with half the storage, but the ready path would then run combinationally through all three.

    Checkpoint: ten questions

    Check yourself 1. What is overrun?

    Data arriving faster than a receiver with no back-pressure can accept it; the excess is lost silently.

    Check yourself 2. What limits throughput in a wait-state bus?

    One transfer at a time: while a target holds its transfer open, nothing else can start.

    Check yourself 3. In valid/ready, when does a word move?

    On a rising edge where valid and ready are both high.

    Check yourself 4. Which single assertion catches most lost or duplicated words on a valid/ready interface?

    valid && !ready |=> valid && $stable(data): a stalled word must stay unchanged.

    Check yourself 5. How many steps per word does a four-phase handshake take?

    Four: req up, ack up, req down, ack down.

    Check yourself 6. Are credits push or pull?

    Pull in disguise: the consumer grants permission for each slot in advance.

    Check yourself 7. What does a forward register slice cut, and what does it leave?

    It cuts valid and data; ready still passes through combinationally.

    Check yourself 8. A sender learns of a stall 3 cycles late. How many spare entries does the stage need?

    Three.

    Check yourself 9. What is the waveform signature of a half-throughput stage?

    Its valid and ready toggle in opposite phase every cycle with no stall downstream.

    Check yourself 10. Why does adding stages lower throughput around a feedback loop?

    Throughput is at most items in flight divided by loop latency; added stages raise the latency.

    Revisit

    • 3.1 Valid-Only Streams

    • 3.2 Wait States and Stretching

    • 3.3 The Valid/Ready Handshake

    • 3.4 The Valid/Ready Rules

    • 3.5 Request/Acknowledge: Two-Phase and Four-Phase

    • 3.6 Push and Pull

    • 3.7 Global Stall or Elastic Pipeline

    • 3.8 Register Slices

    • 3.9 Skid Buffers

    • 3.10 Bubbles and Half Throughput

    • 3.11 Latency-Insensitive Design

    Keep going

    Next: Part 4: Flow Control. When ready would arrive many cycles late: credits, windows and how much to send before hearing back.

    Previous

    50 / 234

    Next: Part 4: Flow Control

    Up next

    Up nextPart 4: Flow Control

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Valid-Only Streams
    • Wait States and Stretching
    • The Valid/Ready Handshake