Automated Superscalar Processor Design by Learning Data Dependencies

Shuyao Cheng, Rui Zhang, Wenkai He, Pengwei Jin, Chongxiao Li, Zidong Du, Xing Hu, Yifan Hao, Guanglin Xu, Yuanbo Wen, Ling Li, Qi Guo, Yunji Chen

Introduction

Designing high-performance processors has traditionally been a manual, labor-intensive engineering feat. While recent advancements in AI have automated the creation of simple single-cycle processors, the design of superscalar processors—which execute multiple instructions in parallel—has remained a significant challenge. Researchers have now introduced State-BSD, a framework that leverages machine learning to automatically design superscalar processors. Their prototype, QiMeng-CPU-v2, achieves a 382× performance improvement over previous automated designs, reaching throughput levels comparable to commercial processors like the ARM Cortex A53.

The Challenge of Data Dependency

The primary obstacle in superscalar design is managing data dependencies. In parallel execution, if Instruction B requires a result from Instruction A, it must wait, leading to "stalls" that degrade performance. Human architects solve this by designing complex predictors that guess instruction outcomes. However, manually crafting these predictors for every possible scenario is extremely difficult. Previous AI-based automation attempts failed to scale because they ignored the processor's internal "state," resulting in inefficient, sequential execution patterns.

The State-BSD Framework

The authors propose the Stateful Binary Speculation Diagram (State-BSD), a hardware-friendly model designed to learn and disentangle these dependencies dynamically. The framework consists of two primary components:

  1. State-Selector: This module identifies a critical, highly reusable subset of the processor's massive internal state space using Simulated Annealing. By storing only these essential states in a small buffer, the hardware remains lightweight enough to make sub-nanosecond decisions.
  2. State-Speculator: This module uses the selected states to predict dependent data. It employs BSD expansion to ensure 100% precision. In hardware design, a single incorrect prediction can cause system failure. State-BSD is engineered to provide a prediction only when certain; otherwise, it allows the processor to stall, prioritizing functional correctness over speculative speed.
Overview of the State-BSD framework architecture, including the State-Selector and State-Speculator modules.

Evaluation and Performance

The framework was used to design QiMeng-CPU-v2, a 4-ALU superscalar RISC-V processor (RISCV-32IA). The design was validated using industry-standard benchmarks such as Dhrystone, Coremark, and SPEC CPU, and successfully ran the Linux operating system.

The results represent a paradigm shift in automated hardware design:

  • Performance Leap: QiMeng-CPU-v2 is 382× faster than the previous state-of-the-art automated CPU.
  • Commercial Competitiveness: With a throughput of 6.29M Dhrystones/s, the design rivals the performance of the ARM Cortex A53.
  • Scale: The framework successfully managed a design with 17 million logic gates, a significant increase from the 4 million gates in prior work.
Throughput comparison showing QiMeng-CPU-v2 (Ours) significantly outperforming previous SOTA and matching the ARM Cortex A53.

Insights and Future Directions

A key insight of this work is that "peeking" into internal registers and state transitions allows AI to learn complex data flow patterns that were previously invisible to automated tools. By prioritizing absolute precision over total coverage, the researchers achieved 70.47% instruction coverage, capturing 94% of the optimization potential typically found by human designers.

Future work will focus on increasing predictor coverage to match the ~75% achieved by human experts and exploring online training methods to allow chips to adapt to new software patterns after manufacturing. Additionally, further optimization of power and area efficiency for these AI-generated layouts remains a priority.

Summary updated

BibTeX
@inproceedings{cheng2025automated,
  author = {Shuyao Cheng and Rui Zhang and Wenkai He and Pengwei Jin and Chongxiao Li and Zidong Du and Xing Hu and Yifan Hao and Guanglin Xu and Yuanbo Wen and Ling Li and Qi Guo and Yunji Chen},
  title = {{Automated Superscalar Processor Design by Learning Data Dependencies}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.24963/ijcai.2025/549},
}
Figure