Farzan Fallah Srinivas Devadas Laboratory for Computer Science MIT Farzan Fallah Srinivas Devadas Laboratory for Computer Science MIT Functional Vector.

Slides:



Advertisements
Similar presentations
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
Advertisements

Masahiro Fujita Yoshihisa Kojima University of Tokyo May 2, 2008
Satisfiability Modulo Theories (An introduction)
Functional Test Generation using Constraint Logic Programming Zhihong Zeng, Maciej Ciesielski Dept. of Electrical & Comp. Engineering University of Massachusetts,
Efficient Reachability Analysis for Verification of Asynchronous Systems Nishant Sinha.
Panel on Decision Procedures Panel on Decision Procedures Randal E. Bryant Lintao Zhang Nils Klarlund Harald Ruess Sergey Berezin Rajeev Joshi.
Copyright 2001, Agrawal & BushnellVLSI Test: Lecture 91 Lecture 9 Combinational Automatic Test-Pattern Generation (ATPG) Basics n Algorithms and representations.
Department of Electrical and Computer Engineering M.A. Basith, T. Ahmad, A. Rossi *, M. Ciesielski ECE Dept. Univ. Massachusetts, Amherst * Univ. Bretagne.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Nikolaj Bjørner Microsoft Research Lecture 3. DayTopicsLab 1Overview of SMT and applications. SAT solving, Z3 Encoding combinatorial problems with Z3.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
Algorithms and representations Structural vs. functional test
Algorithms in Exponential Time. Outline Backtracking Local Search Randomization: Reducing to a Polynomial-Time Case Randomization: Permuting the Evaluation.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
1 Technology Mapping as a Binate Covering Problem Slides adapted from A. Kuehlmann, UC Berkeley 2003.
ECE Synthesis & Verification - Lecture 18 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Word-level.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 11, 2008 Static Timing Analysis and Multi-Level Speedup.
Efficient Reachability Checking using Sequential SAT G. Parthasarathy, M. K. Iyer, K.-T.Cheng, Li. C. Wang Department of ECE University of California –
UNIVERSITY OF MASSACHUSETTS Dept
Jan 6-10th, 2007VLSI Design A Reduced Complexity Algorithm for Minimizing N-Detect Tests Kalyana R. Kantipudi Vishwani D. Agrawal Department of Electrical.
SAT Algorithms in EDA Applications Mukul R. Prasad Dept. of Electrical Engineering & Computer Sciences University of California-Berkeley EE219B Seminar.
Solving Boolean Satisfiability (SAT) Problem Using the Unate Recursive Paradigm Priyank Kalla, Maciej Ciesielski Dept. of Elec. & Comp. Engineering University.
Integer Programming Difference from linear programming –Variables x i must take on integral values, not real values Lots of interesting problems can be.
Nikolaj Bjørner Leonardo de Moura Nikolai Tillmann Microsoft Research August 11’th 2008.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 18, 2009 Static Timing Analysis and Multi-Level Speedup.
ECE Synthesis & Verification, Lecture 17 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Technology.
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
Fast Spectral Transforms and Logic Synthesis DoRon Motter August 2, 2001.
Antoine Girard VAL-AMS Project Meeting April 2007 Behavioral Metrics for Simulation-based Circuit Validation.
Solver & Optimization Problems n An optimization problem is a problem in which we wish to determine the best values for decision variables that will maximize.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Technical University Tallinn, ESTONIA Overview: Fault Simulation Overview about methods Low (gate) level methods Parallel fault simulation Deductive fault.
Operations Research Models
Unit II Test Generation
ECE 2372 Modern Digital System Design
Some Key Facts About Optimal Solutions (Section 14.1) 14.2–14.16
MBSat Satisfiability Program and Heuristics Brief Overview VLSI Testing B Marc Boulé April 2001 McGill University Electrical and Computer Engineering.
CONFIDENTIAL1 Biased Random Simulation Guided by Observability-Based Coverage Serdar Tasiran Compaq Systems Research Center, formerly GSRC, UC Berkeley.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
European Test Symposium, May 28, 2008 Nuno Alves, Jennifer Dworak, and R. Iris Bahar Division of Engineering Brown University Providence, RI Kundan.
Linear Algebra. Circuits The circuits in computers and other input devices have inputs, each of which is either a 0 or 1, the output is also 0s and 1s.
Algorithm Design.
1 Section 2.1 Algorithms. 2 Algorithm A finite set of precise instructions for performing a computation or for solving a problem.
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Table of Contents CD Chapter 14 (Solution Concepts for Linear Programming) Some Key Facts.
Generating High-Quality Tests for Boolean Circuits by Treating Tests as Proof Encoding Eugene Goldberg, Pete Manolios Northeastern University, USA TAP-2010,
Manufacture Testing of Digital Circuits
Custom Computing Machines for the Set Covering Problem Paper Written By: Christian Plessl and Marco Platzner Swiss Federal Institute of Technology, 2002.
Unit1: Modeling & Simulation Module5: Logic Simulation Topic: Unknown Logic Value.
On the Relation Between Simulation-based and SAT-based Diagnosis CMPE 58Q Giray Kömürcü Boğaziçi University.
Combinational Design, Part 2: Procedure. 2 Topics Positive vs. negative logic Design procedure.
Lecture 1 Gunjeet kaur Dronacharya group of institutions.
Hardware Description Languages: Verilog
Automatic Test Generation
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
SS 2017 Software Verification Bounded Model Checking, Outlook
The Analysis of Cyclic Circuits with Boolean Satisfiability
Solver & Optimization Problems
Simulation based verification: coverage
Solving Linear Arithmetic with SAT-based MC
Hardware Description Languages: Verilog
CS137: Electronic Design Automation
New Directions in the Development of ABC
ECE 434 Advanced Digital System L08
Propositional Calculus: Boolean Algebra and Simplification
LPSAT: A Unified Approach to RTL Satisfiability
Automatic Test Pattern Generation
CS137: Electronic Design Automation
Presentation transcript:

Farzan Fallah Srinivas Devadas Laboratory for Computer Science MIT Farzan Fallah Srinivas Devadas Laboratory for Computer Science MIT Functional Vector Generation for HDL Models Using Linear Programming and 3-Satisfiability Kurt Keutzer Department of EECS UC Berkeley Kurt Keutzer Department of EECS UC Berkeley

Outline zIntroduction zFunctional test vector generation strategy zNew hybrid SAT method zResults zOngoing work

Design Verification Introduction if (C) A = 1; else A = 2; $display(“%d”, A);

Design Verification zHow do we solve the design verification problem? ¬ Formal verification  Who specifies correctness property? ­ Simulation  How do you get the test vectors? Introduction

Coverage Directed Simulation ¬ Choose a coverage metric, e.g., line/branch/path coverage. ­ Automatically generate vectors that achieve targeted coverage under chosen metric. Introduction

Functional Vector Generation Strategy zWe view HDL descriptions as interconnections of combinational modules which include Boolean and word-level operators. X Y + f G > Z W c d x2x2 x0x0 0 1

Functional Vector Generation Strategy zBoolean operators: AND, OR, and INVERTER gates. zWord-level operators: Comparison: Addition/Subtraction: Increment/Decrement: Scalar multiplication: Left/Right shift:

Functional Vector Generation Strategy zAny other operator must be converted into a collection of the previous operators. Example can be modeled as,

Functional Vector Generation Strategy z can be modeled as, and 4 constraints over Y and individual bits of X for each p i, where p i is a partial product. Z = 2 n-1 p n n-2 p n-2 + … + p 0

Functional Vector Generation Strategy zWe choose path coverage metric. zA path is a set of alternating modules and signals. m1m1 m2m2 S1S1 S2S2 S3S3 P={S 1, m 1, S 2, m 2, S 3 }

Functional Vector Generation Strategy zSensitizing a sub-path through a module means the value of the input to the path should affect the value at the output. A 0 0 z zSensitizing a path means sensitizing each module.

Functional Vector Generation Strategy zSensitization of a sub-path through a module will require values at some of the module inputs. zValue of side-inputs for logic gates, Side-inputs AND 1 OR 0

Functional Vector Generation Strategy zValue of side-input for word-level operators (assuming unsigned numbers), A B C A B > C A k C

Functional Vector Generation Strategy b a c > Y X ä ä S elect a path. ä ä Write sensitization requirement on intermediate signals. b = 1 Constraints: ä ä Write module input-output relationship for every module in the circuit. c = a AND b b = X > Y ä ä Find a solution that satisfies the set of constraints.

Functional Vector Generation Strategy zHow do we find a solution to the constraints? ¬ Use Boolean clauses to model all modules and solve resulting 3-SAT problem. ­ Use Boolean clauses and linear constraints to model modules and solve the problem using 3-SAT solver and integer program solver. zBoth methods use Branch and Bound technique.

3-SAT Approach zUse Boolean clauses to model input-output relationship of each gate. X Y Z Y X

3-SAT Approach zSolve the resulting 3-SAT problem to find a satisfying assignment for all input variables. z3-SAT approach is not efficient because word- level operators have to be modeled using Boolean operators.

New Hybrid Satisfiability Approach 1 0 b e a h X Y + f g > Z W c d x2x2 x0x0 0 1 ä ä We want to exercise a path in the circuit. ä ä Use linear word-level operators (Linear arithmetic constraints, LACs) to model data-path. G 1 0 b e a h f g c d x2x2 x0x0 0 1

1 0 b e a h f g c d x2x2 x0x0 0 1 ä ä Choose values for side-inputs. New Hybrid Satisfiability Approach

ä ä Control part is modeled using Boolean operations. ?? ä ä Choose values for side-inputs. ä ä Gates are modeled using Boolean clauses. New Hybrid Satisfiability Approach 1 0 b e a h f g c d x2x2 x0x0 0 1

ä ä Gates are modeled using Boolean clauses. Correlation: x 0 is first bit of X x 2 is third bit of X g is equal to G ä ä There is correlation between Boolean variables and integer variables. New Hybrid Satisfiability Approach

ä ä Essential variable: If there is a single variable in TRUE (complemented) form in a clause it must be set to 1(0). Simplifying SAT ä ä c must be set to 0. Correlation: x 0 is first bit of X x 2 is third bit of X g is equal to G New Hybrid Satisfiability Approach

Correlation: x 0 -X, x 2 -X, g-G Simplifying SAT ä ä New essential variables might be created. Current assignment: c=0, e=1 New Hybrid Satisfiability Approach

Simplifying SAT ä ä Unate variable: If a variable only appears in true (complemented) form it can be set to 1(0). Correlation: x 0 -X, x 2 -X, g-G Current assignment: c=0, e=1 ä ä We can set b to 1., b=1 ä ä Note that there was no integer variable correlated to b. ä ä Use unate variable rule recursively. New Hybrid Satisfiability Approach

ä ä Use polynomial time sufficiency check for SAT infeasibility. Correlation: x 0 -X, x 2 -X, g-G ä ä If SAT is infeasible, there is no solution for the constraints, otherwise we continue search for the solution. Linear infeasibility ä ä If linear relaxation of LACs is infeasible, there is no solution to the constraints. This can be checked in polynomial time. New Hybrid Satisfiability Approach Current assignment: c=0, e=1, b=1, f=0

Branching ä ä Select a Boolean variable heuristically and set it to 1(0), if it fails to find a feasible solution, set it to 0(1). Correlation: x 0 -X, x 2 -X, g-G ä ä Choose an input variable which appears in clauses most (x 2 ). ä ä Set x 2 to 1. New Hybrid Satisfiability Approach Current assignment: c=0, e=1, b=1, f=0

Current assignment: c=0, e=1, b=1, f=0, x 2 =1 ä ä Set d to 1. Correlation: x 0 -X, x 2 -X, g-G New Hybrid Satisfiability Approach Simplifying SAT

Current assignment: c=0, e=1, b=1, f=0, x 2 =1, d=1 Branching ä ä Set h to 1. Correlation: x 0 -X, x 2 -X, g-G ä ä There is a correlation between x 2 and X, use new integer variables and modify LACs. New Hybrid Satisfiability Approach, h=1

Branching ä ä Find a solution to LACs using Integer Programming. Correlation: x 0 -X, x 2 -X, g-G New Hybrid Satisfiability Approach Current assignment: c=0, e=1, b=1, f=0, x 2 =1, d=1, h=1

Branching ä ä Free Boolean variables correlated to integer variables, are set to the appropriate values. Solution Boolean Variables: c=0, e=1, b=1, f=0, x 2 =1, d=1, h=1, x 0 =X, g=X Integer Variables: X 7-3 =0, X 1-0 =0, Y=0, W=4, Z=0, G=1 New Hybrid Satisfiability Approach

Branching ä ä Free Boolean variables correlated to integer variables, are set to the appropriate values. Solution Boolean Variables: c=0, e=1, b=1, f=0, x 2 =1, d=1, h=1, x 0 =0, g=X Integer Variables: X 7-3 =0, X 1-0 =0, Y=0, W=4, Z=0, G=1 New Hybrid Satisfiability Approach

Branching ä ä Free Boolean variables correlated to integer variables, are set to the appropriate values. Solution Boolean Variables: c=0, e=1, b=1, f=0, x 2 =1, d=1, h=1, x 0 =0, g=1 Integer Variables: X 7-3 =0, X 1-0 =0, Y=0, W=4, Z=0, G=1 New Hybrid Satisfiability Approach

Example HSAT3-SAT #Clauses/ #LACs #Clauses Exp. Time/ Sat. Time pport schsm ctla ctlbc mult16 17/18 141/24 1/24 1/60 0/104 <1 s 16 s /4.7 s 3.1/261 s 4.9/142 s >1000 s Results <1 s 8466 >1000 s

Ongoing Work zImprovement on satisfiability checking using seamless integration of linear programming and satisfiability. zCurrently we use conventional time frame expansion strategy for sequential HDL models.  We are exploring more efficient algorithms. zWe are working on generating functional vectors for a variety of code coverage metrics.

Future system overview Ongoing Work Simulation driver (vectors) Simulation monitor (yes/no) Simulation engine Simulation model (HDL) OCCOM Coverage Analysis LP-3SAT Vector Generation Is it enough? Yes No Stop Diagnosis of Unverified Portions OCCOM talk