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 Path
  • Cache Coherency Glossary
  • The Shared Course Model
  • Cache Coherency Revision Sheet
  • Why Coherence Exists8
  • States and Protocols12
  • Transactions12
  • Races and Controller Design8
  • Progress and the Fabric16
  • Ordering and Synchronization12
  • Performance and Scalability12
  • Real Protocols12
  • SoC Integration12
    • LLC Data and Directory Policies
    • Devices and DMA
      • Coherent Versus Non-Coherent DMA
      • I/O-Coherent Ports
      • Device Caches and CXL.cache
      • Software Maintenance for DMA
    • The Memory-Controller Boundary
  • Power, Clocking and Reliability12
  • Verification12
  • Debug and Bring-up12
  • Interview and Design Review17
  • Capstone: A Coherent Model Lab5
Loading lesson

‹Devices and DMA
  1. Topics
  2. Cache Coherency
  3. SoC Integration
  4. Devices and DMA
  5. Device Caches and CXL.cache

Part 9 · SoC Integration · All levels

Device Caches and CXL.cache

Name CXL's three protocols and three device types, and describe its host-managed, asymmetric coherence.

On this page

    What changes if D keeps a copy after the transfer?

    A retained device cache becomes part of the permission and current-data problem. If D can hold a writable line, a later CPU request cannot assume memory is current: H must snoop D, and D must answer. This is stronger than the one-way coherent port of the previous lesson.

    The reference here is the Compute Express Link Specification, Revision 2.0, Version 1.0. CXL runs three protocols over one link. CXL.io is PCIe-based and carries discovery, configuration and non-coherent DMA. CXL.cache lets a device cache host memory coherently. CXL.mem lets the host access memory attached to the device.

    Device type

    Protocols

    Typical use

    Type 1

    CXL.io + CXL.cache

    Accelerator with a coherent cache and no host-managed device memory.

    Type 2

    CXL.io + CXL.cache + CXL.mem

    Accelerator with a coherent cache and its own device-attached memory (HDM).

    Type 3

    CXL.io + CXL.mem

    Memory expander, no device cache.

    Who manages coherence?

    Coherence is host-managed and asymmetric. The host's home agent owns coherence for host memory, in the role H plays in this course. The device cache holds lines in MESI states, issues device-to-host requests to obtain lines and must answer host-to-device snoops. CXL.cache has three channels in each direction: D2H Request, Response and Data, and H2D Request, Response and Data. Device cache states are MESI; message names differ from the course's GetS / GetM.

    Return to the warm snapshot C0 M / 1, C1 I / -, H exclusive(C0), memory = 0. If D requests X over CXL.cache, the host's home agent snoops C0 exactly as H does for any requester, and D may then hold the line. Once D holds it, a CPU request for X makes the host send an H2D snoop to D, and D answers on its D2H response and data channels. The device is a cache participant tracked by the host, never a home for host memory.

    Bias modes belong to device-attached memory

    Host Bias and Device Bias are modes of a Type 2 device's own memory (HDM), not of CXL.cache access to host memory. In Host Bias the device reaches its own memory through the host, which resolves coherence first. In Device Bias the host is known not to cache the line, so the device reaches its own memory without consulting the host. Host access to a Device Bias line requires a bias flip to Host Bias first.

    A device that supports CXL.cache has a MESI cache that the host snoops. A device that supports CXL.mem exposes HDM, and on Type 2 that memory has Host or Device Bias.
    CXL.cache, CXL.mem and the bias modes answer different questions.

    Common pitfall

    Applying Host Bias / Device Bias to CXL.cache access to host memory, or assuming a Type 3 memory expander has a device cache.

    Interview

    Name the three protocols and three device types, then say who owns coherence (the host's home agent) and what the device cache must do (issue D2H requests, answer H2D snoops).

    Check yourself Does coherent device caching eliminate the need to wait for device completion before reusing a buffer?

    No. Cache coherence does not say the device has finished its operation or stopped using that storage. Lifetime and completion remain separate contracts.

    Related topics

    • Shared course model

    • One-way access versus retained caching

    Previous

    104 / 167

    Next: Software Maintenance for DMA

    Up next

    Up nextSoftware Maintenance for DMA

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Coherent Versus Non-Coherent DMA