Abstract
The rapid growth of AI models has intensified the "memory wall" bottleneck, where data movement between memory and processors consumes significant energy and time. Digital Computing-in-Memory (DCIM) offers a promising solution by performing computations directly within memory arrays with high precision and scalability. However, designing DCIM macros is traditionally a manual, expert-intensive process limited to specific precisions. This paper presents SEGA-DCIM, an automated compiler that streamlines DCIM design. By integrating a multi-objective genetic algorithm (MOGA) for design space exploration with a template-based layout generator, SEGA-DCIM automatically produces high-performance hardware supporting a wide range of precisions, from INT2 to FP32, in under two hours.
Introduction: The Challenge of DCIM Design
As artificial intelligence moves toward edge devices, the demand for energy-efficient, high-precision hardware has skyrocketed. Computing-in-Memory (CIM) addresses the data movement bottleneck by integrating processing units within memory. While Analog CIM (ACIM) is known for its energy efficiency, it often suffers from noise and limited precision. Digital CIM (DCIM) provides a robust alternative with full precision and better process scalability.
Despite its advantages, DCIM is notoriously difficult to design. Engineers must navigate complex trade-offs between area, power, and throughput while managing architectural decisions for various data types. Most existing automation tools are restricted to integer (INT) operations, leaving a gap for high-precision tasks like on-device training that require floating-point (FP) support.
SEGA-DCIM Framework
The SEGA-DCIM framework automates the transition from user-defined specifications to a final physical layout through three core components:
1. Synthesizable Multi-Precision Architecture
The framework utilizes a flexible, template-based architecture. To support floating-point operations efficiently, it incorporates specialized hardware blocks such as an FP Pre-alignment unit for real-time exponent alignment and an INT-to-FP converter. This approach allows a single compiler to handle diverse data formats by treating floating-point DCIM as an extension of integer DCIM.
2. MOGA-based Design Space Explorer
Navigating the vast design space—comprising billions of combinations of array dimensions and bit-widths—is handled by a Multi-Objective Genetic Algorithm (specifically NSGA-II). The explorer identifies the "Pareto frontier," providing a set of optimal designs that balance competing metrics like power and area. This allows users to select a configuration that best fits their specific application constraints.
3. Template-based Generator and EDA Integration
Once an optimal configuration is chosen, a script-based generator produces the Verilog netlist. The framework then leverages commercial Electronic Design Automation (EDA) tools (like Cadence Innovus) to automate placement and routing, significantly reducing the design cycle from weeks to less than two hours.
Experimental Results and Insights
The framework was evaluated using the TSMC 28nm process and compared against state-of-the-art (SOTA) manual designs, including a high-performance 22nm INT8 macro and a BF16 macro from ISSCC 2023.
- Broad Precision Support: SEGA-DCIM successfully generated macros for INT2 through INT16 and FP8 through FP32, including BF16.
- Competitive Performance: An automatically generated INT8 design achieved an energy efficiency of 22 TOPS/W and an area efficiency of 1.9 TOPS/mm². A BF16 design reached 20.2 TOPS/W.
- Efficiency Gains: While manual designs often use custom foundry SRAM for better area density, SEGA-DCIM's use of standard library cells achieved higher energy efficiency even on an older process node.
Conclusion
SEGA-DCIM represents a significant step toward the democratization of high-performance AI hardware design. By automating the complex trade-offs and architectural decisions inherent in DCIM, it enables the rapid development of multi-precision accelerators suitable for a wide range of applications, from CNNs to Transformers. Future work will focus on integrating custom SRAM macros to further improve area efficiency and expanding the template library to support emerging CIM architectures.
Summary updated