Introduction
The rapid evolution of Deep Neural Networks (DNNs) has necessitated a parallel advancement in hardware architecture. Systolic arrays, popularized by Google’s Tensor Processing Unit (TPU), have emerged as the architectural cornerstone for accelerating dense matrix multiplications. However, designing these accelerators involves navigating a vast and complex design space. Architects must balance array dimensions, on-chip memory capacity, and dataflow strategies to optimize for performance and energy efficiency across diverse workloads.
The Architectural Design Challenge
Designing a systolic array is not a one-size-fits-all endeavor. A configuration optimized for a vision model like ResNet50 may perform poorly on a Transformer-based language model. Key parameters such as the array's aspect ratio (height vs. width), the size of the scratchpad memory, and the interconnect bandwidth significantly impact throughput and power consumption. Traditionally, exploring these trade-offs required slow, low-level Register-Transfer Level (RTL) simulations or proprietary tools.
To address this, SCALE-Sim (Systolic CNN Accelerator Simulator) provides an open-source, cycle-accurate framework for architectural exploration. It enables researchers to model systolic-based DNN accelerators without the overhead of hardware description languages.
Methodology and System Architecture
SCALE-Sim employs a modular simulation approach to represent the core components of a systolic accelerator. The simulator takes two primary inputs: a hardware configuration file (defining array size, memory, and dataflow) and a DNN topology file (detailing layer dimensions).
The simulator models three critical subsystems:
- Compute Engine: A 2D mesh of Multiply-Accumulate (MAC) units with configurable dimensions.
- Memory Hierarchy: A three-partitioned SRAM structure for input feature maps (IFMAP), filters, and output feature maps (OFMAP), utilizing double-buffering to overlap computation with data movement.
- System Interface: A Direct Memory Access (DMA) engine and DRAM model that capture the latency and bandwidth constraints of off-chip memory access.
Dataflow Strategies
A central feature of SCALE-Sim is its support for various dataflows, which dictate how data is mapped and moved through the processing elements (PEs):
- Weight Stationary (WS): Filter weights are pre-loaded and kept stationary in the PEs while inputs and partial sums move.
- Output Stationary (OS): Partial sums are accumulated within the PEs, minimizing the movement of intermediate results.
- Input Stationary (IS): Input pixels remain stationary while weights and partial sums are streamed.
Key Insights from Architectural Exploration
Using workloads from the MLPerf benchmark suite—including ResNet50, Transformer, and DeepSpeech2—the authors identified several critical design principles:
- Workload-Dependent Dataflow: No single dataflow is universally optimal. While OS is often the default choice, WS or IS can be more efficient for models with specific weight-to-input ratios, such as Transformers.
- Memory Diminishing Returns: Increasing on-chip SRAM provides diminishing returns. For many workloads, the required DRAM bandwidth hits a "knee" at around 1MB of buffer; adding more memory beyond that doesn't significantly reduce the bandwidth bottleneck.
- The Importance of Aspect Ratio: For a fixed number of PEs, the array's shape matters. "Tall" or "wide" arrays can outperform square ones depending on the specific dimensions of the neural network layers.
- Scaling Strategies: The simulator allows for comparing "Scaling-Up" (one large array) versus "Scaling-Out" (multiple smaller arrays), revealing that scaling-out can offer better bandwidth efficiency for certain topologies.
Results and Validation
The accuracy of SCALE-Sim was validated against an in-house RTL design. The simulator's cycle counts closely matched the hardware logic, confirming its reliability for early-stage architectural evaluation. Sensitivity analyses further demonstrated that improper hardware-dataflow pairings could lead to performance degradations of up to 16x, highlighting the necessity of cycle-accurate simulation in the design process.
Conclusion and Future Directions
SCALE-Sim offers a robust platform for the rapid prototyping of systolic DNN accelerators. While currently focused on dense operations, future work aims to incorporate support for sparsity, enabling the simulation of skip-logic and compressed data formats. Additionally, integrating SCALE-Sim with full-system simulators like Gem5 will provide a more comprehensive view of SoC-level interactions, such as cache contention and system bus bottlenecks.
Summary updated