TL;DR
Researchers from USC and the US Army Research Lab have developed a modular, programmable FPGA-based memory controller designed to break the "memory wall." By allowing developers to tune parameters like cache associativity, DMA buffer sizes, and request scheduling batches, the controller achieves up to a 58% reduction in memory access time for deep learning and graph analytics workloads compared to standard commercial IPs.
What Problem Does This Paper Address?
While FPGA accelerators offer massive parallelism, they are increasingly throttled by the "memory wall"—the growing gap between high-speed logic and relatively slow external DRAM. Standard commercial memory controller IPs are often "black boxes" designed for general-purpose use. They don't account for the specific data access patterns of specialized algorithms, such as the highly irregular accesses found in graph processing or the massive bulk transfers required for Convolutional Neural Networks (CNNs).
Existing solutions usually force a choice: use a cache (which fails on irregular data) or use DMA (which is inefficient for small, frequent requests). This paper tackles the need for a flexible, "plug-and-play" controller that can be optimized for specific hardware resources and application needs.
Methods
The authors propose a Modular and Programmable Memory Controller architecture consisting of three primary, reconfigurable engines:
- Cache Engine: Supports single-item "cache-line" transfers. It features a dual-pipeline design (one for the Processing Element and one for Memory) to handle hits and misses without stalling the entire system. Users can configure cache line width, count, and associativity (DoSA).
- DMA Engine: Handles "bulk transfers" for streaming data. It supports multiple parallel DMA transactions, which helps utilize external bandwidth better and prevents "cache pollution" (where large streaming data wipes out useful small-scale data stored in the cache).
- Memory Scheduler: This is the "brain" that reorders incoming requests. It uses a Bitonic sorting network to group requests targeting the same DRAM row. By maximizing "row buffer hits," the scheduler minimizes the expensive overhead of switching rows in the physical DRAM.
The entire system communicates using Flow Control Units (FLITs), which reduces routing congestion on the FPGA chip.
Datasets
The system was evaluated using synthetic workloads designed to mimic real-world high-performance applications:
- GCN (Graph Convolutional Network) Workload: A synthetic graph with 1.6 million vertices and 240 million edges, where each vertex has 1024 features. This tests the controller's ability to handle a mix of irregular edge accesses and bulk feature transfers.
- CNN (Convolutional Neural Network) Workload: Modeled after the input layer of ResNet, using 227x227 input images. This tests high-bandwidth bulk transfers of weights and image data.
- Hardware Platform: The design was implemented and tested on a state-of-the-art Xilinx Alveo U250 FPGA board.
Key Insights and Ideas
- Application-Specific Tuning: The "aha" moment is that a memory controller shouldn't be static. By making the batch size of the scheduler and the associativity of the cache programmable at synthesis time, developers can balance performance against the FPGA's available logic resources (LUTs and BRAM).
- The Power of Reordering: DRAM is much faster when you access data in the same "row." The authors leverage FPGA parallelism to sort memory requests in hardware faster than a CPU could, significantly reducing latency.
- Hybrid Traffic Support: By providing separate paths for Cache and DMA, the controller allows an accelerator to fetch "reusable" data (like graph edges) through the cache while simultaneously streaming "one-time" data (like vertex features) through DMA.
Key Results
- CNN Performance: Reduced total memory access time by 58% compared to standard commercial memory IPs.
- GCN Performance: Reduced memory access time by 27%. In these workloads, the controller spent 99% of its time utilizing the DMA engine, proving the efficiency of the bulk transfer logic.
- Interface Efficiency: For systems with narrow input interfaces, the proposed controller achieved a 20x reduction in access time compared to traditional cache-only systems.
- Resource Scaling: The authors demonstrated that while increasing batch sizes improves performance, there is a "sweet spot" (typically 32 or 64). Beyond 512, the logic cost (LUT/FF usage) grows too high for diminishing returns.
Limitations and Future Work
- Manual Tuning: While the controller is programmable, some parameters (like scheduler timeout and batch size) still require manual tuning to find the optimal performance for a specific application.
- Single DRAM Focus: The current evaluation focuses on accessing a single external DRAM component.
- Future Directions: The authors plan to extend this work to heterogeneous memory platforms, such as systems using High Bandwidth Memory (HBM) alongside traditional DDR4, and to further automate the optimization of controller parameters.
Summary updated