Home / Learn / Chiplets and Memory / CXL vs PCIe
On this page
What PCIe isWhat CXL isHow one port serves bothThe differences that matterMemory semanticsCache coherenceLatencyWhat each is used forBeyond a single serverSpeeds move togetherWhich should a design use?In AI systemsCommon questionsRelated guidesCXL vs PCIe: What Is the Difference?
PCIe connects devices such as storage drives, network cards and accelerators to a processor. CXL uses the same physical wires and connectors and adds protocols for sharing memory. PCIe treats an attached device as a peripheral that data is sent to and received from. CXL lets the processor and the device treat each other’s memory almost as their own. The two are complementary, and a CXL port can also operate as a PCIe port.
What PCIe is
PCI Express, or PCIe, is the standard high-speed interface inside computers. It has been in use since the early 2000s and is the way nearly every expansion device connects to a processor: graphics cards, solid-state drives, network adapters and accelerators.
It is an input and output interface. The processor sends a request to a device, the device does something and data comes back. Transfers are organized as packets and typically involve the operating system and a device driver.
A new generation appears every few years, each roughly doubling the speed.
What CXL is
Compute Express Link, or CXL, was introduced in 2019. It was designed for a different job: letting processors and devices share memory efficiently.
CXL deliberately reuses the PCIe physical layer. The electrical signalling, the connectors and the cables are the same. What changes is the protocol running over them.
How one port serves both
When a device is connected, the two ends negotiate. If both support CXL, the link runs CXL. If not, it runs as ordinary PCIe. A processor with CXL-capable ports can accept either kind of device in the same slot.
CXL itself includes a protocol called CXL.io that is essentially PCIe. It handles discovery, configuration and ordinary input and output. Two further protocols, CXL.cache and CXL.mem, carry the memory traffic.
The differences that matter
| PCIe | CXL | |
|---|---|---|
| Purpose | Connecting peripheral devices | Sharing memory between processor and devices |
| Model | Input and output | Memory access and cache coherence |
| How the processor sees the device | As a peripheral | As memory, or as a partner sharing memory |
| Access path | Through drivers and the input and output stack | Through the processor’s normal memory access mechanisms |
| Latency | Higher | Lower, closer to that of memory |
| Cache coherence | Not provided | Built in |
| Physical layer | PCIe | The same PCIe physical layer |
| Typical devices | Storage, network cards, accelerators | Memory expanders, accelerators with shared memory |
| Maturity | Universal | Newer, being deployed |
Memory semantics
The phrase often used is that CXL has memory semantics and PCIe has input and output semantics.
With PCIe, to use data on a device, software issues a request, the device transfers the data into the computer’s main memory and the program then works on that copy.
With CXL.mem, the memory on the device appears to the processor as part of its own memory. A program reads and writes it with ordinary instructions. No driver call is needed for each access and no copy is made.
That is why CXL can be used to add memory to a server. PCIe could move data to and from a memory device, but the processor could not use that memory directly.
Cache coherence
Processors keep copies of recently used data in caches. If two parties can change the same data, their cached copies must be kept consistent. This is called coherence.
PCIe has no mechanism for it. A PCIe accelerator that wants to work on data in the host’s memory must have that data copied to it, and results copied back.
CXL.cache provides coherence between the host and the device. An accelerator can work on shared data in place, with the hardware ensuring that both sides see consistent values.
Latency
The memory protocols in CXL use a streamlined path through the link’s lower layers, avoiding overhead that PCIe’s general-purpose packet handling incurs. The result is latency low enough for memory use: somewhat slower than memory attached directly to the processor, and far faster than a storage device.
What each is used for
PCIe
- Solid-state drives
- Network interface cards and DPUs
- GPUs and other accelerators, for transferring data and commands
- General expansion
CXL
- Adding memory capacity beyond a server’s memory slots
- Pooling memory among several servers
- Creating a lower-cost memory tier
- Accelerators that share memory with the processor
Many devices will go on using PCIe. Nothing about a storage drive requires memory semantics.
Beyond a single server
Both standards have features for connecting many devices through switches. PCIe switches are widely used to fan out connections.
CXL has gone further in this direction. Later versions support fabrics with thousands of nodes, memory shared among many hosts and direct communication between devices.
Speeds move together
Because CXL rides on the PCIe physical layer, its speed follows PCIe’s.
| CXL version | Based on | Speed per lane |
|---|---|---|
| 1.x and 2.0 | PCIe 5.0 | 32 gigatransfers per second |
| 3.x | PCIe 6.0 | 64 gigatransfers per second |
| 4.0 | PCIe 7.0 | 128 gigatransfers per second |
Which should a design use?
- For storage and networking devices, PCIe.
- For adding or pooling memory, CXL.
- For an accelerator that only receives data and returns results, PCIe is sufficient.
- For an accelerator that needs to share large data structures with the processor without copying, CXL offers advantages.
- For a chip that must support both, implementing a CXL-capable port covers PCIe as well.
From a chip designer’s point of view, the two share most of their physical-layer and controller technology. CXL support is an addition to a PCIe implementation, not a wholly separate one.
In AI systems
AI servers use both heavily. PCIe connects the accelerators, the network cards and the storage. CXL is beginning to be used to extend memory, including as a tier for data and model state that does not need to be held in the fastest memory.
Neither is the interconnect that links AI accelerators to each other for tightly coupled computation. That role is filled by dedicated scale-up interconnects and by the cluster network.
Common questions
Does CXL replace PCIe?
No. CXL builds on PCIe and serves a different purpose. PCIe remains the standard for connecting peripherals. CXL adds memory sharing on the same physical foundation.
Can a CXL device work in a PCIe slot?
A CXL device needs a host that supports CXL to use its memory features. In a slot that supports only PCIe, the link falls back to PCIe, and CXL-specific functions are unavailable.
Is CXL faster than PCIe?
At the same generation, the raw link speed is identical because the physical layer is shared. CXL’s memory protocols have lower latency than PCIe input and output, which is what makes memory use practical.