CXL 系统体系结构系列 · 第 03 篇 上一篇拆解了三个子协议。本篇把这三个子协议的\”组合方式\”——也就是 Type 1 / Type 2 / Type 3 设备——讲清楚。这是后续 Switch、Pooling、Fabric 所有讨论的基本单位。
Type 1 / Type 2 / Type 3:CXL 设备的三种形态
1. 一张表概览
| Type 1 | .io + .cache | 无本地大容量 memory 的加速器(SmartNIC、加速卡) | “我要 cache-coherent 地读 host 的 memory” |
| Type 2 | .io + .cache + .mem | 带 HBM/DDR 的加速器(GPU、NPU、FPGA) | “我有自己的 memory,也要访问 host 的” |
| Type 3 | .io + .mem | Memory Expander / CXL DRAM 模块 | “我就是一块 memory,plug 进 host” |
可以理解为:根据’设备要不要访问 host memory’和’host 要不要访问设备 memory’,排列组合出三类。
2. Type 1:cache-coherent 加速器
2.1 协议组合
CXL.io ─── 必选,做配置/中断/DMA
CXL.cache ─ 必选,设备 cache-coherent 访问 host memory
CXL.mem ── 不使用
2.2 典型场景
- SmartNIC:网卡需要频繁读 host memory 里的 packet descriptor、connection state;
- 加密/压缩加速器:流式处理 host memory 中的数据;
- 不带大容量本地 memory 的 FPGA 加速卡。
2.3 工作流
1. Host 分配数据到 host memory
2. Device 通过 CXL.cache 发 RdShared / RdOwn 读 cache line
3. Device 内部小 cache 处理,写回时发 WrCur 或 evict
4. 全程没有显式 DMA copy







