Storage & CXL · FPGA

CXL sort/search accelerator for DRAM

An RTL accelerator that sorts and searches data in DRAM, behind CXL IP at the boundary of the host's coherency domain.

  • 15 GB/sbest-case transfer over CXL
  • 4access paths at the coherency boundary

Architecture · block diagram

  • Main data path
  • Logic
  • Processor
  • Memory
  • Interconnect
  • Off-chip
CXL data loader: host processor and memory over a CXL link to an FPGA accelerator with device DRAMHOST COMPUTERFPGAhost processorhost memoryPHYPL acceleratordata loader · buffer · sort / searchCXL IPPScontrolDRAMdevice memory① MMIO over PCIe ② cache-coherent memory access ③ memory-coherent data flow ④ DMA host ↔ deviceCXL link① ② ③ ④DMA
FIG. 01

The story

If data must move to the CPU only to be sorted or searched, the move costs memory bandwidth and cache capacity. CXL lets a device join the coherency domain of the host. An accelerator can then work on data in memory without a copy in and out. This module was the big-data loader in a larger CXL project, an accelerator that sorts and searches data in DRAM.

Challenges

It had to work at the coherency boundary, where host caches and device memory meet, and keep the data coherent. Its behavior also had to be configurable at run time through registers, with no new bitstream.

What I built

The host processor and host memory connect over a CXL link to the PHY and CXL IP in the FPGA. Behind the IP, the PL accelerator holds the data loader, a memory buffer and the sort and search engine, with DMA to local DRAM. The PS is the control plane.

The accelerator has four access paths:

  • memory-mapped I/O over PCIe for control
  • cache-coherent memory access
  • memory-coherent data flow
  • DMA between host memory and device memory, in both directions

The hardest problem

Each path has its own ordering and coherency rules. The accelerator uses MMIO for registers. It uses coherent access where the host may hold the data in cache, and DMA for bulk movement. Each transfer goes on its matching path, and that keeps the data coherent under load.

In related CXL work, I designed a configuration manager and the embedded application that changes CXL settings through configuration registers at run time. I also studied the differences between the CXL 3.0 and 3.1 specifications. I worked with Rambus CXL IP built to those specifications.

Result

The accelerator reaches 15 GB/s in the best case over CXL. Registers configure it, and an embedded application sets it up and runs the sort.

Original design diagram
Original design diagram: host processor and memory, CXL link, PHY, CXL IP, PL accelerator, PS and DRAM
Where it's used

Where you'd find something like this

01

Memory expansion and pooling in data centers

02

Near-memory compute

03

Offloading database sort and search

Available · Asia/Dhaka (UTC+6)

Have hardware that needs to work?

Tell me what you're building. I'll come back with questions, a rough scope and an estimate, usually within 2 days.

PAD 01 · I/O