Abstract

Checking the equivalence of two Boolean functions, or combinational circuits modeled as Boolean functions, is often desired when reliable and correct hardware components are required. The most common approaches to equivalence checking are based on simulation and model checking, which are constrained due to the popular memory and state explosion problems. Furthermore, such tools are often not user-friendly, thereby making it tedious to check the equivalence of large formulas or circuits. An alternative is to use mathematical tools, called interactive theorem provers, to prove the equivalence of two circuits; however, this requires human effort and expertise to write multiple output functions and carry out interactive proof of their equivalence. In this paper, we (1) define two simple, one formal and the other informal, gate-level hardware description languages, (2) design and develop a formal automatic combinational circuit equivalence checker (CoCEC) tool, and (3) test and evaluate our tool. The tool CoCEC is based on human-assisted theorem prover Coq, yet it checks the equivalence of circuit descriptions purely automatically through a human-friendly user interface. It either returns a machine-readable proof (term) of circuits’ equivalence or a counterexample of their inequality. The interface enables users to enter or load two circuit descriptions written in an easy and natural style. It automatically proves, in few seconds, the equivalence of circuits with as many as 45 variables (3.5 × 10 13 states). CoCEC has a mathematical foundation, and it is reliable, quick, and easy to use. The tool is intended to be used by digital logic circuit designers, logicians, students, and faculty during the digital logic design course.

Highlights

  • In case of electronic system design or manipulation of mathematical functions, a system is often represented and transformed into different forms

  • We propose and develop a tool called combinational circuit equivalence checker (CoCEC) that combines the strengths of multiple approaches for checking the equivalence of combinational circuits. e tool CoCEC, developed in C++, checks combinational circuits’ equivalence, returns proof of their equivalence, or generates a counterexample

  • Similar experiments were performed for unequal circuit description pairs. e inequalities were proved in about 7 seconds for as many as 45-variable unequal pairs of descriptions. ese tests suggest that the CoCEC tool can be used effectively to check the equality of complicated descriptions up to 45 variables

Read more

Summary

Introduction

In case of electronic system design or manipulation of mathematical functions, a system is often represented and transformed into different forms. Ere exist well-established and popular formal tools to reason about combinational circuits and Boolean functions; either they are not automatic (Coq, Isabelle/ HOL, etc.), face state explosion issues (model checkers), and are difficult or unable to generate the counterexample (Coq, ACL2, etc.) or require expertise to encode logical formulas (Z3, BirdBrain II, etc.) (see Table 1). 2. Motivation and Background e tool CoCEC checks functional equivalence of two combinational circuits taken as the input, translates them into a formal representation in Coq, and carries proof of their equivalence in the Coq theorem prover. When logic circuits are represented with functions as, they can be manipulated, and different properties can be stated and proved using tools and techniques based on Boolean algebra.

Inductive nat
Description Languages
10 Output of the code generator
25 Circuits are equivalent!
Testing
Related Work
Conclusions
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call