Automated Formal Equivalence Verification of Pipelined Nested Loops in Datapath Designs

Payman Behnam, Bijan Alizadeh, Sajjad TaheriarXiv 2017

Abstract

High-Level Synthesis (HLS) tools significantly accelerate hardware design by translating high-level specifications (C/C++) into Register Transfer Level (RTL) implementations. However, aggressive optimizations like loop pipelining introduce complex temporal shifts that challenge traditional verification methods. This paper presents a scalable formal framework utilizing Modular Horner Expansion Diagrams (M-HED) and a dynamic cut-point insertion strategy to verify the equivalence of pipelined nested loops. Experimental results demonstrate a 111.9× speedup and 16.7× better memory efficiency compared to state-of-the-art SMT and SAT solvers.

Introduction

In modern system-on-chip design, engineers increasingly rely on HLS tools to generate RTL from high-level descriptions. While efficient, these tools can introduce bugs, particularly during loop pipelining. This optimization increases throughput by overlapping loop iterations, which results in retiming and out-of-order operations.

Traditional Sequential Equivalence Checking (SEC) often fails in this context because the one-to-one mapping between the specification and the implementation is lost. Standard "fixed cut-loop" techniques, which check equivalence at the end of every iteration, become inapplicable as a single C-code iteration may correspond to a shifting, non-fixed number of clock cycles in the pipelined hardware. This paper addresses these challenges by proposing a multi-stage automated verification flow that moves beyond bit-level analysis.

The Proposed Verification Framework

The authors propose an automated flow that bridges the gap between high-level specifications and optimized RTL implementations. The process begins with symbolic simulation to extract functional behavior without requiring concrete input values.

The proposed automated formal verification framework for HLS-generated designs.

As shown in the framework above, the system converts both the C specification and the synthesized RTL into intermediate representations: LAASC (List of Assignments for Specification in C) and LAPRTL (List of Assignments for Pipelined RTL). These representations are then processed using Modular Horner Expansion Diagrams (M-HED). Unlike bit-level Binary Decision Diagrams (BDDs), M-HEDs represent word-level polynomial functions based on Taylor series expansions, making them exceptionally efficient for datapath logic like multipliers and adders.

Dynamic Cut-Points and Internal Equivalence

A critical innovation of this work is the use of dynamic cut-points. To manage computational complexity, the algorithm divides the design into smaller segments. Rather than using fixed temporal locations, it inserts cut-points whenever the M-HED complexity reaches a predefined threshold.

Mapping between pipelined implementation cycles and specification iterations using dynamic cut-points.

This approach allows the tool to re-align the specification and implementation functionally rather than chronologically. If primary outputs of a segment do not match, an internal equivalence algorithm (INTERNAL-EQU) iteratively "peels back" logic layers to find equivalent internal nodes that may have been reordered by the HLS tool. Because M-HEDs are canonical, checking equivalence often reduces to a simple pointer comparison.

Experimental Evaluation

The methodology was evaluated using several large-scale datapath benchmarks, including FIR filters, Sobel algorithms, and various Fast Fourier Transform (FFT) sizes (up to FFT512). The RTL was generated using CatapultC at a target frequency of 100 MHz.

Key results include:

  • Scalability: For large designs like FFT512, where SAT (MiniSat) and SMT (Z3) solvers timed out or exhausted memory, the M-HED approach completed verification in 219 seconds using only 121 MB of RAM.
  • Performance: The proposed method achieved an average 111.9× speedup over SAT-based verification and a 16.7× improvement in memory usage compared to SMT-based approaches.
  • Optimization Trade-offs: The authors identified a "sweet spot" for segment size; while smaller segments prevent memory blow-up, they can increase total runtime due to the overhead of internal equivalence checks.

Conclusion and Future Work

While the M-HED framework excels at datapath-dominated designs, it is currently less focused on complex, control-heavy logic with non-polynomial behavior. Future research may extend this framework to handle even more aggressive HLS optimizations or incorporate "auto-correction" capabilities to fix identified design errors automatically. By shifting from bit-level to word-level polynomial representations, this work provides a robust path forward for the formal verification of highly optimized hardware.

Summary updated

BibTeX
@misc{behnam2017automated,
  author = {Payman Behnam and Bijan Alizadeh and Sajjad Taheri},
  title = {{Automated Formal Equivalence Verification of Pipelined Nested Loops in Datapath Designs}},
  year = {2017},
  eprint = {1712.09818},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.09818},
}
Figure