Groebner basis based formal verification of large arithmetic circuits using Gaussian elimination and cone-based polynomial extraction

https://doi.org/10.1016/j.micpro.2015.01.007Get rights and content

Abstract

Verification of arithmetic circuits is essential as they form the main part of many practical designs such as signal processing and multimedia applications. In these applications, the size of the datapath could be very large so that contemporary verification methods would be almost incapable of verifying such circuits in reasonable time and memory usage. This paper addresses formal verification of large integer arithmetic circuits using symbolic computer algebra techniques. In order to efficiently verify gate level arithmetic circuits, we model the circuit and the specification with polynomial system and the verification problem is formulated as membership testing of the given specification polynomial in corresponding ideal of the circuit polynomials. The membership testing needs Groebner basis reduction. In order to overcome the intensive polynomial reduction needed in Groebner basis computation so that we can deal with verifying large arithmetic circuits, the fanout-free regions (cones) of the circuit are extracted and represented as corresponding polynomials automatically. For further improvement, we make use of Gaussian elimination concept to perform specification polynomial reduction w.r.t Groebner basis using a matrix representation of the problem. To evaluate the effectiveness of our verification technique, we have applied it to very large arithmetic circuits with different architectures. The experimental results show that the proposed verification technique is scalable enough so that large arithmetic circuits can efficiently be verified in reasonable run time and memory usage.

Introduction

As the size and complexity of digital systems increase continuously, design verification and debug are quickly becoming more important. From a verification point of view, one of the most difficult parts in complicated digital designs is arithmetic datapaths and their components, such as multipliers and dividers. Arithmetic circuits are the main part in many computational intensive designs, e.g. Digital Signal Processing (DSP) units in multimedia applications. The complicated and specialized nature of these arithmetic architectures requires custom design which makes the implementation error-prone. Therefore, verification of arithmetic circuits in a fast and precise way plays an important role in a digital system design flow.

Formal verification methods make use of mathematical techniques to insure the integrity of a design with respect to some desired characteristics. Several formal methods have been proposed to verify the correctness of arithmetic circuits in higher level of abstraction. Most of them are based on canonical graph-based representations like Binary Decision Diagrams (BDDs), which are not scalable because they suffer from space and time explosion problems when dealing with large arithmetic circuits especially multipliers [16], [17].

On the other hand, recently some techniques for verification of bit-level implementations using the theory of Groebner basis have been proposed [6], [7], [9]. However, these techniques are computationally intensive and are not scalable to large arithmetic circuits.

Addressing the above problems, this paper proposes a formal verification technique to verify gate level circuits that implement integer arithmetic circuits so that their specifications are given as polynomial functions fspec. The goal of the verifier is to guarantee the equivalence of fspec and gate level implementation fimp. In fact our proposed method uses Groebner basis theory to effectively verify large arithmetic circuits. This theory enables us to formulate the verification problem as an ideal membership testing. Fig. 1 shows our proposed verification technique which takes a gate level circuit (fimp) and its high level specification (fspec) as inputs. In order to check whether fimp is functionally equivalent to fspec or not, first of all, the gate level circuit is converted to Boolean polynomials by extraction of fanout free regions (which are referred to as cones) and mapping cones to polynomials. We automatically exploit the cones in order to achieve a smaller number of circuit polynomials. We will discuss how to find them based on a backtracking algorithm and obtaining their equivalent polynomials in Section 4. As we will see in Section 3, the ideal membership testing requires Groebner basis computation which is computationally extensive. In order to remove the need of this computation, a topological order of polynomials’ variables (eke polynomials’ terms) is utilized in Section 4. This ordering eliminates the computation of Groebner basis as well as making the initial set of the circuit polynomials (F) Groebner basis itself. Then the equivalence checking is performed by polynomial manipulation and reduction of the specification polynomial (fspec) over Groebner basis polynomials (F) [10]. We call this step Groebner basis reduction or polynomial reduction.

As will be discussed in Section 3, the mathematical manipulations (Groebner basis reduction) contain polynomial divisions and multiplications which are complicated in terms of run time and memory usage as the intermediate polynomials may become very large. In order to overcome these intensive computations, we utilize the modification of F4 algorithm [24] for computing Groebner basis reduction on a matrix which represents the verification problem. By using this method, we will be able to verify large arithmetic circuits in reasonable run time and memory space usage as experimentally shown in Section 6. In summary, our contributions in this work are as follows:

  • Extracting a finite set of Boolean polynomials from the gate level implementation by looking for fanout free regions (cones). In contrast to [18], [19], [20], this method is applicable even when half adder and full adders cannot be extracted due to the local optimizations which are usually done by synthesis tools (Section 4).

  • In contrast to [29] in which we looked only for repetitive components (which needs some information about repetitive components provided as a library), the proposed method in this work enables us to reduce the number of polynomials significantly so that the verification time decreases dramatically while we do not have any information about the repetitive components.

  • Determining a suitable variable ordering for cones’ polynomials in such a way that the leading terms of the circuit polynomials become relatively prime to avoid Groebner basis computation (Sections 3 Preliminaries, 4 Proposed verification technique).

  • Improving F4 algorithm and using Gaussian elimination to perform polynomial reduction efficiently so that a sequence of polynomial divisions can be efficiently computed (Section 5).

The paper is organized as follows: Section 2 provides a brief review of related work. In Section 3 we briefly describe some mathematical background as well as Horner Expansion Diagrams (HEDs) [14], [15]. Section 4 presents our proposed verification technique in detail. Section 5 describes our approach to use Gaussian elimination in order to perform the Groebner basis reductions. The experimental results are shown in Section 6 and Finally, Section 7 concludes the paper.

Section snippets

Related work

There is a large amount of literature on equivalence verification of arithmetic circuits against their specifications. A variety of canonical, directed acyclic graph (DAG) representations such as BDDs [2], BMDs [17] and their various word-level extensions [25] have been used for verification of Boolean functions. However, they are not able to deal with large arithmetic circuits especially multipliers due to bit-blasting as well as existence of different architectures. A combination of TEDs [4]

Preliminaries

In this section, we briefly describe mathematical concepts including Groebner basis, Horner Expansion Diagram (HED) and the F4 algorithm. The mathematical backgrounds of Groebner basis are mostly based on [10].

Proposed verification technique

Formally, the verification problem of an arithmetic circuit is characterized by a given specification like fspecY-(AB+CD) where AD are decimal representation of circuit’s primary inputs and Y is decimal representation of the circuit’s primary outputs. The decimal representation can be achieved by a polynomial like A=i=0n2iai where aiB={0,1} and a0 and an are the least significant and most significant bits of primary input A, respectively.

Our goal is to check the correctness of gate level

Improving Groebner basis reduction

The polynomial reduction (polynomial division) f w.r.t Groebner basis is the most computationally intensive part of our verification technique. This reduction becomes a bottleneck when the circuit is very large and the polynomial set F = {f1, f2,  , fs} is extremely large. This reduction can be done by using existing computer algebra systems e.g., SINGULAR [23] which is a general-purpose computer algebra tool. It should be noted that it does not have a special data structure for Groebner basis

Experimental setup and results

In order to evaluate our proposed arithmetic circuit verification technique, it was implemented in JAVA applied to several arithmetic circuits. All experiments were conducted on a 2.4 GHz with Intel Core™ i5 processor and 4 GB RAM running Linux.

The proposed verification flow has five different parts as shown in Fig. 13. First, gate level netlist of the arithmetic circuit, which its functionality is being verified, is fed into the tool as input. In order to generate the gate level implementation

Conclusion and future works

A formal method to verify arithmetic circuits using computer algebra techniques has been proposed in this paper. Our method formally proves that the given fspec and gate-level combinational arithmetic circuit fimp are equivalent. The verification problem is formulated as membership testing of the specification polynomial fspec in an ideal where ideal I = f1, f2, …, fs〉 generated by extracted polynomials from the circuit. Subsequently, a Groebner basis G of the ideal I should be computed and the

Acknowledgment

This research was in part supported by a grant from IPM (No. CS1393-4-46).

Farimah Farahmnadi received her B.S and M.S degrees in computer engineering from University of Tehran, Tehran, Iran, in 2010 and 2013, respectively. She is currently a PhD student at the Embedded System Lab in department of Computer and Information Science and Engineering, University of Florida. Her research interests include formal verification and debugging of digital systems and post-silicon validation.

References (34)

  • B. Alizadeh et al.

    Formal equivalence verification and debugging techniques with auto-correction mechanism for RTL designs

    Elsevier J. Microprocess. Microsyst. (MICPRO)

    (2013)
  • J.C. Faugére

    A new efficient algorithm for computing Groebner bases (F4)

    J. Pure Appl. Algebra

    (1999)
  • D. Stoffel et al.

    Equivalence checking of arithmetic circuits on the arithmetic bit level

    IEEE Trans. Comput.-Aid. Des. Integr. Circ. Syst. (TCAD)

    (2006)
  • R. Bryant

    Graph-based algorithms for Boolean function manipulation

    IEEE Trans. Comput. (TC)

    (1986)
  • C.W. Barlett, D.L. Dill, J.R. Levitt, A decision procedure for bit-vector arithmetic, in: Proc. of the 35th Annual...
  • M. Ciesielski et al.

    Taylor expansion diagrams: a canonical representation for verification of data flow designs

    IEEE Trans. Comput.

    (2006)
  • Y. Watanabe, N. Homma, T. Aoki, T. Higuchi, Application of symbolic computer algebra to arithmetic circuit...
  • B. Buchberger, An Algorithm for Finding a Basis for the Residue Class Ring of a Zero-dimensional Polynomial Ideal,...
  • E. Pavlenko et al.

    STABLE: a new QF-BV SMT solver for hard verification problems combining Boolean reasoning with computer algebra

    Proc. Design Autom. Test Eur. (DATE)

    (2011)
  • M.A. Bastish et al.

    Algebraic approach to arithmetic design verification

    Proc. Formal Methods Comput.-Aid. Des. (FMCAD)

    (2011)
  • D. Cox et al.

    Ideals, Varieties, and Algorithms

    (1997)
  • Q. Tran et al.

    Groebner bases computation in boolean rings for symbolic model checking

    Proc. Model. Simul. (MOAS)

    (2007)
  • B. Buchberger

    Some properties of Groebner-bases for polynomial ideals

    ACM SIGSAM Bull.

    (1976)
  • J. Lv et al.

    Efficient Gröbner basis reductions for formal verification of galois field multipliers

    Proc. Des. Autom. Test Eur. (DATE)

    (2012)
  • B. Alizadeh et al.

    Modular datapath optimization and verification based on modular-HED

    IEEE Trans. Comput.-Aid. Des. Integr. Circ. Syst. (TCAD)

    (2010)
  • B. Alizadeh, A formal approach to debug polynomial datapath designs, in: Proc. of Asia and South Pacific Design...
  • S.Y. Huang et al.

    Formal Equivalence Checking and Design Debugging

    (1998)
  • Cited by (45)

    View all citing articles on Scopus

    Farimah Farahmnadi received her B.S and M.S degrees in computer engineering from University of Tehran, Tehran, Iran, in 2010 and 2013, respectively. She is currently a PhD student at the Embedded System Lab in department of Computer and Information Science and Engineering, University of Florida. Her research interests include formal verification and debugging of digital systems and post-silicon validation.

    Dr. Bijan Alizadeh received his B.Sc., M.Sc. and PhD. degrees in computer engineering from the University of Tehran, Iran in 1996, 1999 and 2004, respectively. Prior to joining the University of Tehran in 2010 as an assistant professor, he was an assistant professor at Sharif University of Technology from 2005 to 2007 and a Research Associate in VLSI Design and Education Center (VDEC), University of Tokyo from 2007 to 2010. He has developed many academic tools in verification, synthesis and other aspects of EDA. His current research interests include verification and synthesis in high level and system level designs as well as embedded system design methodologies.

    View full text