Scaling Up Hardware Accelerator Verification using A-QED with Functional Decomposition

Saranyu Chattopadhyay, Florian Lonsing, Luca Piccolboni, Deepraj Soni, Peng Wei, Xiaofan Zhang, Yuan Zhou, Luca P. Carloni, Deming Chen, Jason Cong, Ramesh Karri, Zhiru Zhang, Caroline Trippel, Clark W. Barrett, Subhasish Mitra · DOI

TL;DR

Verifying complex hardware accelerators (HAs) is a major bottleneck in modern chip design. This paper introduces A-QED², a novel decomposition technique that breaks down large HAs into smaller, manageable sub-accelerators, enabling efficient and scalable formal verification. This approach significantly reduces verification effort and time, making it practical for industrial-scale designs.

What Problem Does This Paper Address?

Modern System-on-Chips (SoCs) are packed with numerous specialized hardware accelerators (HAs) designed for energy efficiency and high performance. However, the increasing complexity of these HAs poses a significant challenge for formal verification. Traditional methods struggle to scale to designs with millions of logic gates, often timing out or running out of memory. While existing techniques like Accelerator-Quick Error Detection (A-QED) offer promising formal verification for certain HAs, their scalability remains a critical issue. This paper tackles the problem of verifying large, complex HAs by proposing a decomposition strategy that makes formal verification tractable.

Methods

The core innovation is A-QED² (A-QED with Decomposition). This approach leverages the existing A-QED framework but introduces a systematic way to decompose a large HA into smaller, functionally composable sub-accelerators.

Here's a breakdown of the key techniques:

  • Functional Decomposition: The HA is broken down into smaller units (sub-accelerators) based on functional blocks identified through designer-provided annotations in the high-level code (e.g., C/C++). This decomposition is designed to preserve the overall functional correctness.
  • Compositional Verification: The verification of the entire HA is achieved by verifying these sub-accelerators independently. The paper provides theoretical guarantees that if the sub-accelerators are verified correctly using A-QED², the entire HA will also be verified.
  • A-QED Checks on Sub-Accelerators: The standard A-QED checks, specifically Functional Consistency (FC) and Response Bound (RB), are applied to these smaller sub-accelerators.
  • Functional Consistency (FC): Checks if identical inputs always produce identical outputs. A-QED² introduces "intra-batch" FC checks, which are simpler and faster, and "strong FC" checks for more thorough verification.
  • Response Bound (RB): Checks if an output is produced within a specified time bound. This is applied to sub-accelerators using a sliding window approach on the Static Single Assignment (SSA) form of the code.
  • Single-Action Correctness (SAC): While not the primary focus of the decomposition, SAC checks are also discussed as a complementary verification step.
  • Formal Model: The paper defines a formal model for batch-mode hardware accelerators, explicitly separating control and memory states, and introducing concepts like "relevant states" to handle both interfering and non-interfering HAs.

Datasets

The paper does not introduce new datasets. Instead, it evaluates its approach on 109 (buggy) versions of various open-source and industrial hardware accelerators (HAs). These designs cover a wide range of domains, including neural networks, image processing, natural language processing, and security. The authors specifically selected designs that are too large for existing off-the-shelf formal tools and have been thoroughly verified using conventional simulation-based techniques.

Key Insights and Ideas

  • Decomposition is Key to Scalability: The fundamental insight is that by breaking down large, complex systems into smaller, verifiable components, the scalability limitations of formal verification can be overcome.
  • Functional Consistency is a Powerful Property: The paper highlights that Functional Consistency (FC), a property that ensures identical inputs yield identical outputs, is surprisingly effective for bug detection, even without explicit design specifications.
  • Intra-batch FC is Surprisingly Effective: The simpler "intra-batch" FC checks, which verify consistency within a single input batch, proved to be very fast and effective in finding bugs, often detecting them in seconds.
  • Designer Annotations Facilitate Decomposition: While the decomposition is automated, designer-provided annotations in the high-level code are crucial for identifying functional blocks and guiding the decomposition process. This is presented as a manageable effort, especially with existing HLS tool practices.
  • Verification Effort Reduction: The approach leads to a significant reduction in verification effort compared to traditional simulation-based methods, with substantial improvements reported for large industrial designs.

Key Results

  • Scalability Achieved: A-QED² successfully verified large HAs with millions of logic gates, which were previously intractable for standard formal verification tools.
  • Bug Detection Thoroughness: A-QED² detected all bugs found by conventional simulation-based verification techniques.
  • Significant Speedup:
    • Intra-batch FC checks detected bugs in sub-accelerators in under a minute for most designs.
  • A-QED² RB checks detected unresponsiveness bugs in less than 11 minutes on average.
  • Compared to conventional simulation-based verification, A-QED² reported a ~5X improvement in verification effort on average, and a ~9X improvement for large, industrial designs.
  • Practicality Demonstrated: The approach was tested on 109 buggy versions of diverse HAs, demonstrating its broad applicability.

Limitations and Future Work

  • Interfering LCAs: While the theoretical framework supports interfering LCAs, the current experimental evaluation focuses on non-interfering LCAs. Extending experiments to interfering LCAs is a key future direction.
  • Automation of Annotations: While designer annotations are manageable, further automation of these annotations, potentially through HLS techniques, is an area for future research.
  • Beyond Sequential Code: The current work focuses on sequential C/C++ code. Extending A-QED² to handle concurrent programs is suggested.
  • Soundness of Decomposition: The paper notes that while A-QED² is complete (i.e., it finds all bugs if the HA is functionally correct), there isn't a corresponding soundness result for the decomposition itself. It's possible to decompose a functionally consistent HA into functionally inconsistent sub-accelerators, though this appears rare in practice.
  • RTL Verification: For RB checks, the paper mentions that some bugs manifest only at the RTL level, necessitating HLS synthesis before RB checks. Further exploration of this aspect is implied.

Summary updated

BibTeX
@inproceedings{chattopadhyay2021scaling,
  author = {Saranyu Chattopadhyay and Florian Lonsing and Luca Piccolboni and Deepraj Soni and Peng Wei and Xiaofan Zhang and Yuan Zhou and Luca P. Carloni and Deming Chen and Jason Cong and Ramesh Karri and Zhiru Zhang and Caroline Trippel and Clark W. Barrett and Subhasish Mitra},
  title = {{Scaling Up Hardware Accelerator Verification using A-QED with Functional Decomposition}},
  booktitle = {FMCAD},
  year = {2021},
  doi = {10.34727/2021/isbn.978-3-85448-046-4\_12},
}
Figure