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
    • How to Dissect a Protocol
    • UART
    • SPI
    • I2C
    • APB
    • AHB
    • AXI4
    • AXI-Stream
    • PCI Express
    • DDR
    • CHI
    • Ethernet
    • USB
    • UCIe
    • CXL
    • Protocols Compared: Protocols Dissected
    • Drills: Protocols Dissected
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 16: Protocols Dissected
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 16: Protocols Dissected
  4. CXL

Part 16 · Protocols Dissected · Principal (P)

CXL

CXL dissected through the twenty questions: three protocols (CXL.io, CXL.cache, CXL.mem) multiplexed on the PCIe physical layer, letting devices cache host memory coherently and hosts use device memory as their own. How it reuses PCIe and where it must answer new questions.

On this page

    Note

    Level: Principal (P) · Answers: How do real protocols answer the fifteen questions?

    Before this: PCI Express, I/O Coherence and Cache Maintenance

    An accelerator card wants to work on data in the host's memory without copying it, keeping its own cache of what it uses, coherent with the processors'. A memory expansion card wants to add terabytes of memory that the host can load and store directly. PCI Express can move the bytes but has no coherence and treats device memory as I/O. CXL keeps PCIe's wires and adds the missing questions' answers as two new protocols beside the old one.

    How does CXL answer each question, and which answers are new compared with PCIe?

    Constraints first: what CXL had to work with

    Constraint

    CXL

    C1 Distance and medium

    PCIe slots and cables: the PCIe physical layer (fact P38)

    C2 Bandwidth and latency

    PCIe bandwidth, with low latency for coherent and memory accesses

    C3 Wires

    PCIe lanes

    C4 Topology

    Host to device, and from CXL 2.0 through switches

    C5 Who builds each side

    Processor, accelerator and memory vendors; CXL Consortium specification with compliance testing (fact P38)

    CXL.io is PCIe in all but name; CXL.cache and CXL.mem are the new protocols, sharing the link through the flit-based link layer.

    CXL's answers to the fifteen questions

    Each answer links to the lesson that explains the idea behind it.

    #

    Question

    Answer

    1

    When is the data valid?

    The PCIe physical layer: embedded clock, recovered (fact P38) (1.4)

    2

    Where does a message start and end?

    68-byte flits (CXL 1.1, 2.0) and 256-byte flits (CXL 3.0) (fact P38) (2.10)

    3

    Is the receiver ready?

    Credits, as PCIe (4.3)

    4

    How much may I send before I hear back?

    Credits per protocol and message class (4.6)

    5

    What exactly is being asked?

    Three protocols: CXL.io (PCIe transactions), CXL.cache (coherent requests from the device), CXL.mem (memory reads and writes from the host) (fact P38) (5.6)

    6

    How many requests can be in flight?

    Many outstanding requests in each protocol, matched by tags (6.4)

    7

    In what order do results become visible?

    CXL.io keeps PCIe's ordering; CXL.cache and CXL.mem define their own (fact P38) (7.6)

    8

    Who gets the wire?

    The link layer arbitrates between the three protocols on one link (fact P38) (8.5)

    9

    Why can it hang?

    Separate channels and credits per protocol and message class, so I/O traffic cannot block coherence or memory responses (9.4)

    10

    What if bits go wrong?

    Flit CRC and link-layer retry; FEC with 256-byte flits at PCIe 6.0 rates (facts P10, P38) (10.11)

    11

    How do the two sides agree at start-up?

    CXL mode is negotiated during PCIe link training; devices are discovered through CXL.io like PCIe devices (fact P38) (11.5)

    12

    How do we save power without losing data?

    Built on PCIe's link power management

    13

    What if there are several copies of one value?

    Coherence is new: CXL.cache lets Type 1 and Type 2 devices cache host memory coherently, and Type 2 and Type 3 devices expose memory the host can use (fact P38) (13.7)

    14

    Who is allowed to ask?

    IDE for CXL from CXL 2.0 (fact P38) (14.4)

    15

    How do we know it is correct?

    Compliance testing defined in the CXL specification (fact P38) (15.8)

    The choices that define CXL

    • Reuse the link, add protocols: CXL.io is PCIe, so discovery, configuration and software support come for free.

    • Coherence and memory semantics on a serial link: CXL.cache and CXL.mem answer questions 5, 7 and 13 differently from PCIe.

    • Device types by need: caching only (Type 1), caching plus memory (Type 2), memory expansion (Type 3).

    • Latency matters: coherent and memory traffic need lower latency than I/O, so they travel in their own protocols rather than as PCIe transactions.

    What breaks

    A memory expansion device (illustrative) was validated with bandwidth tests, which passed. Under a real database, tail latency was several times higher than expected, because the device's controller handled CXL.mem reads behind a queue it shared with background maintenance. Memory accessed by loads and stores is judged by latency, not bandwidth; separating the queues fixed it.

    Why this matters

    Principal lens. CXL shows how a protocol evolves by adding new semantics on an existing link rather than inventing a new one: it inherits PCIe's physical layer, discovery and software, and adds only what coherence and memory semantics need. When you evaluate a CXL device, ask which protocol each workload uses, what latency the CPU sees for CXL.mem loads, and how coherence interacts with the device's own caches.

    Interview

    Asked: "What are CXL's three protocols, and why three?"

    Weak answer: Three speeds of PCIe.

    Strong answer: CXL.io is essentially PCIe: discovery, configuration, interrupts and DMA, which gives compatibility with PCIe software. CXL.cache lets a device cache host memory coherently, so an accelerator can work on host data without copies. CXL.mem lets the host load and store device-attached memory as if it were its own, for accelerators with memory and memory expansion. They are separate because they have different semantics, ordering rules and latency needs; one link multiplexes them in flits, with credits per protocol so I/O can't block coherence or memory traffic. Device types 1, 2 and 3 use different combinations.

    Follow-ups: (1) What does a Type 3 device use? (2) Why can't CXL.mem just be PCIe memory reads?

    Check yourself A memory expansion card is a CXL Type 3 device. Which protocols does it need?

    CXL.io for discovery and configuration and CXL.mem for the host's loads and stores; it does not cache host memory, so no CXL.cache.

    Check yourself Why are CXL.cache and CXL.mem separate from CXL.io?

    They need different semantics (coherence, memory access), different ordering and lower latency than PCIe-style I/O transactions.

    Key takeaways

    • CXL multiplexes CXL.io, CXL.cache and CXL.mem over the PCIe physical layer.

    • CXL.io reuses PCIe; the other two add coherence and memory semantics with their own ordering.

    • Device types 1 to 3 combine the protocols; latency, not only bandwidth, decides success.

    Keep going

    Next: Protocols Compared: Protocols Dissected. All fourteen protocols side by side, question by question.

    Related topics

    • Part 16 overview: Protocols Dissected

    Previous

    221 / 234

    Next: Protocols Compared: Protocols Dissected

    Up next

    Up nextProtocols Compared: Protocols Dissected

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • How to Dissect a Protocol
    • UART
    • SPI