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
    • A Protocol Is a Contract
    • Roles and Agents
    • Signals, Meaning and Timing
    • Reading Timing Diagrams
    • Protocols as State Machines
    • Topologies and Duplex
    • Layering and the End-to-End Argument
    • Memory, Message and Stream Semantics
    • Protocols Compared: What Is a Protocol?
    • Drills: What Is a Protocol?
  • Part 1: Timing and Clocking11
  • Part 2: Encoding and Framing12
  • Part 3: Handshakes13
  • 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 0: What Is a Protocol?
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 0: What Is a Protocol?
  4. Drills: What Is a Protocol?

Part 0 · What Is a Protocol? · All levels

Drills: What Is a Protocol?

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

On this page

    Answer each question out loud before opening it. The answers give the reasoning an interviewer listens for, not just the result. If you miss more than three in the checkpoint, revisit the lessons linked at the end.

    Interview questions

    Check yourself What is a protocol, beyond a list of signals?

    A contract between two independently designed blocks: promises about what values mean, when they count, what sequences are allowed, and what happens in reset and on errors, each checkable on the wires. It deliberately leaves internal choices such as latency and buffering open.

    Check yourself Is a DMA engine a master or a slave?

    Both, on different interfaces: a target on its register port, an initiator on its data port (consumer on reads, producer on writes), and the producer of an interrupt. Roles belong to interfaces, not blocks.

    Check yourself Two engineers disagree about whether data arrives with valid or one cycle after. Whose fault is it?

    The specification's: it left the timing layer in prose or unstated. The fix is a numbered rule, such as "data is valid in every cycle in which valid is high", plus a timing diagram as an example.

    Check yourself Draw an APB write with one wait state and say where it completes.

    One setup cycle (PSEL high, PENABLE low, address and data valid), then access cycles with PENABLE high; PREADY low for one cycle, then high. The write completes at the rising edge where PSEL, PENABLE and PREADY are all sampled high, and address and data stay constant until then.

    Check yourself How would you show two communicating state machines never both wait for each other?

    Model the pair as one product machine including the wires, enumerate every reachable state by trying every move of each side in any order, and check that no reachable state other than the intended end has no possible move. For real RTL, express it as an assertion and use a formal tool.

    Check yourself Why did fast interfaces go serial?

    Skew between parallel wires is roughly fixed in picoseconds while bit times shrink, so the common sampling window vanishes. Serial lanes avoid inter-wire skew and save pins and power; the receiver takes on clock recovery and framing.

    Check yourself Why does PCI Express have a per-hop CRC and an optional end-to-end CRC?

    Each link's CRC protects only that wire; a switch recomputes it, so corruption inside a switch passes both checks. The end-to-end argument says correctness of delivery needs an end-to-end check; the per-hop CRC with replay is a performance mechanism that fixes wire errors locally.

    Check yourself When would you choose a stream over a memory-mapped interface?

    When data flows one way, in order, from one producer to one consumer, exactly once. Use memory-mapped for shared, revisited or software-visible data, and then specify notification and ordering.

    Whiteboard exercise

    Task. A temperature sensor block sends a 16-bit reading to a controller about once a millisecond. Write the complete contract for a three-signal interface (valid, ready, data[15:0]) as numbered rules, including reset. Then name, for each rule, how you would check it on a waveform.

    Check yourself Open a model answer

    1. A reading moves on a rising edge where valid and ready are both high (count such edges). 2. data is meaningful only while valid is high (nothing to check otherwise). 3. Once valid is high, valid and data stay unchanged until the reading moves (if valid and not ready at an edge, the next cycle has the same valid and data). 4. valid does not wait for ready (design review or formal proof). 5. During reset the sender drives valid low (valid is 0 in every reset cycle). 6. The controller raises ready within a stated bound, for example 100 cycles of valid (a bounded check in simulation). Left open on purpose: how the sensor produces readings and how the controller stores them.

    Checkpoint: ten questions

    Check yourself 1. Which of the four kinds of promise (meaning, timing, sequence, exceptional cases) do most contracts forget?

    Exceptional cases, especially reset and errors.

    Check yourself 2. On a memory read, who is the producer?

    The target (the memory). The initiator of a read is the consumer.

    Check yourself 3. Name the three layers every specification defines.

    Signals, meaning and timing (including sequencing rules).

    Check yourself 4. In the course's waveforms, what does one slot show?

    The values just after a rising edge, which are the values sampled at the next edge.

    Check yourself 5. What makes the product state (requester idle, completer still acknowledging) unreachable in a four-phase handshake?

    The requester returns to idle only after seeing ack low.

    Check yourself 6. What must a shared bus define that a point-to-point link need not?

    Addressing and arbitration, including what happens when two agents drive at once.

    Check yourself 7. With 25 ps of skew, at what per-wire rate does skew take a quarter of each bit?

    A quarter bit = 25 ps means a 100 ps bit time: 10 Gb/s.

    Check yourself 8. Which layer should own credit flow control on a link, and why does that not contradict the end-to-end argument?

    The link layer: the function concerns one hop, whose two ends are the only parties with the knowledge it needs.

    Check yourself 9. Why does memory-mapped communication need a separate notification?

    A write to memory is silent; the consumer cannot tell it happened without a flag, interrupt or message, and the protocol must order that notification after the data.

    Check yourself 10. A rule holds only if the other side responds within one cycle. Is it a correct protocol rule?

    No. Protocol rules must hold for every timing of the other side; a rule that depends on one timing breaks when that side moves to another clock or gets busier.

    Revisit

    • 0.1 A Protocol Is a Contract

    • 0.2 Roles and Agents

    • 0.3 Signals, Meaning and Timing

    • 0.4 Reading Timing Diagrams

    • 0.5 Protocols as State Machines

    • 0.6 Topologies and Duplex

    • 0.7 Layering and the End-to-End Argument

    • 0.8 Memory, Message and Stream Semantics

    Keep going

    Next: Part 1: Timing and Clocking. Now that you know what a protocol must promise, the first promise of all: when is the data valid?

    Previous

    14 / 234

    Next: Part 1: Timing and Clocking

    Up next

    Up nextPart 1: Timing and Clocking

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • A Protocol Is a Contract
    • Roles and Agents
    • Signals, Meaning and Timing