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

‹First Principles of Hardware Protocols
  1. Topics
  2. First Principles of Hardware Protocols
  3. How to Use This Course

Start here · All levels

How to Use This Course

Lesson anatomy, level badges, the DCLink project, and how to run the code.

On this page

    Each lesson answers one part of one of the course's fifteen questions. It starts with a concrete problem, shows why the obvious answer fails, and builds the mechanism from there. Real protocols appear as evidence for the reasoning, never as the subject.

    What every lesson contains

    Block

    What it is for

    Header

    Level badge, the question the lesson answers, and what to read first

    Hook

    A short scene that ends on the lesson's question

    The obvious answer, and why it breaks

    The first idea most engineers have, and the case where it fails. The reasoning starts here.

    The idea and the picture

    The mechanism, drawn on the course's sender, channel and receiver figure or as a sequence diagram

    Worked numbers

    Sizing and overhead with numbers that add up. Numbers not taken from a specification are marked illustrative.

    Build it and watch it run

    Runnable code and the real simulation waveform or model output it produces, read slot by slot

    Design space and how real protocols chose

    The options, what each costs, and which protocols picked which, and why

    What breaks

    A failure told as a short story: symptom, evidence, root cause, fix

    Senior or Principal lens

    The second-order effect, or the question a design reviewer would ask

    Interview corner

    The question as interviewers ask it, a weak answer, a strong answer, and follow-ups

    Check yourself, takeaways, next

    Two or three scenario questions with reasoned answers, three lines to remember, and the problem the next lesson solves

    Levels

    Badges F, W, S and P mark the lowest level a lesson serves: Foundation, Working, Senior, Principal. You do not need to skip lessons above your level, and senior readers should not skip foundation lessons: the lens at the end of each one is written for them.

    DCLink: the protocol you build

    DCLink (DenseChip Link) is a small point-to-point protocol that grows one idea at a time across the course. Each step is complete in its own lesson, so you can read any step without the earlier code.

    Step

    Part

    What DCLink gains

    1

    2

    Framing: a header, a payload, an end marker

    2

    3

    valid/ready on one hop, then a skid buffer

    3

    4

    Credit flow control over a pipelined wire

    4

    5

    Read and write transactions with addresses, bursts and an error completion

    5

    6

    Tags and four outstanding reads, completing out of order

    6

    7

    One ordering rule and a fence

    7

    8

    Two requesters and a round-robin arbiter

    8

    9

    Separate request and response classes, removing a planted deadlock

    9

    10

    CRC, sequence numbers and a replay buffer

    10

    11

    A start-up handshake with capability exchange

    11

    12

    An idle low-power state with a request/accept handshake

    12

    15

    Assertions, a monitor and an ordering-aware scoreboard

    The DCLink contract

    Every step follows one contract, so the steps agree with each other. A flit is 32 bits; a packet is one header flit and 0 to 15 payload flits. From step 4 the header is:

    Bits

    Field

    Meaning

    31:28

    type

    0 WR, 1 RD, 2 CPL (completion), 3 FENCE, 4 TS1, 5 TS2

    27:24

    len

    WR and CPL: payload flits that follow. RD: no payload; len is how many data flits it asks for, returned after the CPL header. Other types: 0

    23:22

    tag

    From step 5. Unique while its request is outstanding: at most one request per tag, so a completion matches exactly one request

    19:0

    addr / status

    WR and RD: flit address. CPL: 0 OK, 1 ERR

    What DCLink deliberately leaves out, so each step stays small: byte enables (it moves whole flits; lesson 5.9 shows what byte writes add), wrapping and fixed bursts, posted writes (every request gets exactly one CPL), and shared ordering IDs (lesson 6.4 contrasts its unique tags with AXI IDs). Each step's lesson shows only the signals that step needs.

    Running the code

    • Verilog and SystemVerilog listings are complete testbenches. They run in Icarus Verilog (iverilog -g2012 file.sv && vvp a.out) and Verilator (verilator --binary --timing file.sv), and print a line starting with PASS when their own checks succeed. The one exception, the assertion checker in lesson 15.3, needs Verilator and says so.

    • Python models use only the standard library. Run them with python3 file.py; they check their own results and print PASS.

    • Listings that start with // snippet are fragments, and // bad-example marks code shown as a mistake. Neither is meant to run.

    How to study

    1. Read the hook and stop. Try to answer the question before reading on.

    2. After the obvious-answer section, predict the failure before the lesson describes it.

    3. Read every waveform slot by slot against the "How to read it" list. This is the skill interviews test.

    4. Answer the check-yourself questions out loud before opening them.

    5. Once a part is done, try its drills page from memory.

    Related topics

    • Course hub

    • Reading paths

    • How to read the diagrams

    Previous

    1 / 234

    Next: Reading Paths

    Up next

    Up nextReading Paths

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Concept Map
    • How to Read the Diagrams
    • Part 0: What Is a Protocol?