Learning Semantic Representations to Verify Hardware Designs

Shobha Vasudevan, Wenjie Jiang, David Bieber, Rishabh Singh, Hamid Shojaei, Richard Ho, Charles Sutton

Hardware verification is one of the most expensive and time-consuming phases of modern chip manufacturing. This NeurIPS 2021 paper from Google Research and Google X introduces a deep learning approach to tackle this massive bottleneck. By treating hardware verification as a representation learning problem, the researchers developed Design2Vec, a graph-based neural network architecture that learns the "semantics" of hardware designs to predict test coverage and automatically generate new tests.

The Verification Bottleneck

Modern microprocessors are incredibly complex, possessing billions of possible states. Before a chip is physically manufactured, engineers must verify that the design—written in code called RTL (Register Transfer Level)—functions exactly as intended.

Currently, this verification process consumes 60-75% of a project's time and resources. Because it is mathematically impossible to check every single state (a phenomenon known as "state space explosion"), the industry relies heavily on simulation. Engineers run millions of random or manually written tests to see which parts of the code are "covered." Reaching the final 20% of coverage to find rare, edge-case bugs often takes months of manual effort by expert engineers.

Methods: Design2Vec

The authors propose Design2Vec to automate and accelerate this process. The core idea is to move away from treating the chip as a black box and instead teach a model to understand the hardware's underlying structure.

1. Graph Representation

Instead of looking at raw code or individual bits, the hardware is represented as a Control Data Flow Graph (CDFG). In this graph, nodes represent code statements, and edges represent how data and logic flow through the chip.

2. RTL IPA-GNN

Standard neural networks struggle with hardware because chips are fundamentally different from software: hardware is concurrent (everything happens at once) and non-terminating (it runs in a continuous loop). To address this, the authors modified the "Instruction Pointer Attention" Graph Neural Network (GNN). They added separate pointers for concurrent blocks and "wrap-around" edges to model the continuous nature of hardware cycles.

The Design2Vec architecture processes a Control Data Flow Graph (CDFG) through a Graph Neural Network to predict test coverage.

3. Two-Step Application

The model is deployed in two main phases:

  • Coverage Prediction: The model acts as a "proxy simulator." It predicts in milliseconds whether a specific test will hit a specific part of the design—a process that usually takes hours of traditional compute.
  • Test Generation: Because the model is differentiable, the researchers use gradient-based search. They start with a random test and "nudge" its parameters using gradients to maximize the probability of hitting a specific, hard-to-reach target.
The generative workflow uses gradient-based search to adjust test parameters and hit uncovered design points.

Key Insights and Results

The researchers evaluated Design2Vec on three increasingly complex designs: an open-source RISC-V processor (IBEX v1), an enhanced version with security features (IBEX v2), and Google’s industrial-scale AI accelerator, the TPU (Tensor Processing Unit).

  • High Accuracy: On the massive industrial TPU design, Design2Vec achieved over 90% accuracy in coverage prediction.
  • Massive Speedup: In test generation, Design2Vec found tests for "hard-to-cover" points using 88 fewer simulator calls for the TPU and 40 fewer for IBEX compared to random testing or black-box optimizers.
  • Structure over Black-Boxes: The paper demonstrates that standard Multi-Layer Perceptrons (MLPs) fail because they treat the design as a "black box." Design2Vec succeeds because its GNN architecture explicitly "sees" the connectivity and logic of the hardware.
  • Generalization to Unseen Points: Remarkably, the model can predict coverage for parts of the chip it wasn't specifically trained on. By learning the syntax of how hardware logic is structured, it infers the behavior of new, similar modules.

Limitations and Future Work

While Design2Vec represents a major step forward, the authors note a few limitations. The model still requires an initial set of simulation data to "learn" the design's behavior. Furthermore, the paper focuses primarily on branch coverage (whether a specific line of code was executed), leaving other verification types like timing analysis or power consumption unaddressed. Finally, integrating this into a full industrial "Tape-out" workflow—where 100% certainty is required—remains an open challenge.

Future work could involve applying these semantic representations to other tasks, such as automated debugging or "root-causing" exactly why a specific test failed.

Summary updated

BibTeX
@inproceedings{vasudevan2021learning,
  author = {Shobha Vasudevan and Wenjie Jiang and David Bieber and Rishabh Singh and Hamid Shojaei and Richard Ho and Charles Sutton},
  title = {{Learning Semantic Representations to Verify Hardware Designs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure