Sequential Equivalence Checking - I

Similar documents
Models of Sequential Systems

Equivalence Checking of Sequential Circuits

Sequential Logic Optimization. Optimization in Context. Algorithmic Approach to State Minimization. Finite State Machine Optimization

CS61c: Representations of Combinational Logic Circuits

Hardware Equivalence & Property Verification

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for?

CE Optimized State Machines

Principles of Sequential-Equivalence Verification

ECE380 Digital Logic

CprE 281: Digital Logic

Lecture 2: Symbolic Model Checking With SAT

5 State Minimisation. university of applied sciences hamburg. Digital Systems. Prof. Dr. J. Reichardt Prof. Dr. B. Schwarz

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

STGs may contain redundant states, i.e. states whose. State minimization is the transformation of a given

Sequential Equivalence Checking without State Space Traversal

Undergraduate work. Symbolic Model Checking Using Additive Decomposition by. Himanshu Jain. Joint work with Supratik Chakraborty

Lecture 17: Designing Sequential Systems Using Flip Flops

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

BDD Based Upon Shannon Expansion

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

Finite-State Model Checking

ESE535: Electronic Design Automation. Today. Motivation. FSM Equivalence. Question. Cornerstone Result. Sequential Verification

Counterexample-Guided Abstraction Refinement

Finite-State Machines (Automata) lecture 12

Computer Organization I. Lecture 13: Design of Combinational Logic Circuits

Combinational Equivalence Checking using Boolean Satisfiability and Binary Decision Diagrams

An Introduction to Symbolic Trajectory Evaluation. Koen Lindström Claessen Chalmers University / Jasper AB Gothenburg, Sweden

EEE2135 Digital Logic Design

EE249 - Fall 2012 Lecture 18: Overview of Concrete Contract Theories. Alberto Sangiovanni-Vincentelli Pierluigi Nuzzo

Lecture 10: Synchronous Sequential Circuits Design

Introduction to Kleene Algebras

Abstractions and Decision Procedures for Effective Software Model Checking

Hardware Design I Chap. 2 Basis of logical circuit, logical expression, and logical function

CprE 281: Digital Logic

CS357: CTL Model Checking (two lectures worth) David Dill

Notes for Lecture 3... x 4

Binary Decision Diagrams

Boolean cubes EECS150. Mapping truth tables onto cubes. Simplification. The Uniting Theorem. Three variable example

ELE2120 Digital Circuits and Systems. Tutorial Note 9

Lecture 5: Minimizing DFAs

Fault Collapsing in Digital Circuits Using Fast Fault Dominance and Equivalence Analysis with SSBDDs

Synchronous Sequential Circuit Design. Digital Computer Design

An Efficient Flip-Flops Matching Engine

Verification. Arijit Mondal. Dept. of Computer Science & Engineering Indian Institute of Technology Patna

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

Lecture 10: Sequential Networks: Timing and Retiming

L10 State Machine Design Topics

Retiming. delay elements in a circuit without affecting the input/output characteristics of the circuit.

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

VLSI Design Verification and Test Simulation CMPE 646. Specification. Design(netlist) True-value Simulator

Anand Raghunathan MSEE 348

Binary Decision Diagrams

Binary Decision Diagrams

Formal Verification Methods 1: Propositional Logic

Basing Decisions on Sentences in Decision Diagrams

Lecture 13: Sequential Circuits, FSM

ASYNCHRONOUS SEQUENTIAL CIRCUITS

Different encodings generate different circuits

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

The Design Procedure. Output Equation Determination - Derive output equations from the state table

Combinational Logic. Course Instructor Mohammed Abdul kader

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ECE 1767 University of Toronto

Direct mapping of low-latency asynchronous

Binary Decision Diagrams and Symbolic Model Checking

Tutorial 1: Modern SMT Solvers and Verification

Theory Combination. Clark Barrett. New York University. CS357, Stanford University, Nov 2, p. 1/24

CSE 311 Lecture 23: Finite State Machines. Emina Torlak and Kevin Zatloukal

Fault Modeling. 李昆忠 Kuen-Jong Lee. Dept. of Electrical Engineering National Cheng-Kung University Tainan, Taiwan. VLSI Testing Class

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows

Hardware testing and design for testability. EE 3610 Digital Systems

Sequential Logic Worksheet

Boolean Algebra & Digital Logic

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition.

DISTINGUING NON-DETERMINISTIC TIMED FINITE STATE MACHINES

Finite-state machines (FSMs)

I. Motivation & Examples

Model Checking with CTL. Presented by Jason Simas

Computation Theory Finite Automata

SAT Solvers: Theory and Practice

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1>

Reduced Ordered Binary Decision Diagrams

Sequential logic and design

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories

COE 202: Digital Logic Design Sequential Circuits Part 3. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Chapter 6 Introduction to state machines

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

1 The Well Ordering Principle, Induction, and Equivalence Relations

CTL satisfability via tableau A C++ implementation

Trace-Driven Steady-State Probability Estimation in FSMs with Application to Power Estimation*

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

Equivalence of Regular Expressions and FSMs

Multi-Level Logic Optimization. Technology Independent. Thanks to R. Rudell, S. Malik, R. Rutenbar. University of California, Berkeley, CA

Lecture 12: Adders, Sequential Circuits

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

Reducing power in using different technologies using FSM architecture

Transcription:

Sequential Equivalence Checking - I Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab. Dept. of Electrical Engineering Indian Institute of Technology Bombay viren@ee.iitb.ac.in EE 709: Testing & Verification of VLSI Circuits Lecture 14 (Feb 02, 2012)

Functional Equivalence If BDD can be constructed for each circuit represent each circuit as shared (multi-output) BDD use the same variable ordering! BDDs of both circuits must be identical If BDDs are too large cannot construct BDD, memory problem use partitioned BDD method decompose circuit into smaller pieces, each as BDD check equivalence of internal points Jan 24, 2012 EE-709@IITB 2

Functional Decomposition Decompose each function into functional blocks represent each block as a BDD (partitioned BDD method) define cut-points (z) verify equivalence of blocks at cut-points starting at primary inputs F G f 2 g 2 z z f 1 g 1 x y x y Feb 02, 2012 EE-709@IITB 3

Cut-Points Resolution Problem If all pairs of cut-points (z 1,z 2 ) are equivalent so are the two functions, F,G If intermediate functions (f 2,g 2 ) are not equivalent the functions (F,G) may still be equivalent this is called false negative Why do we have false negative? functions are represented in terms of intermediate variables to prove/disprove equivalence must represent the functions in terms of primary inputs (BDD composition) z 1 x f 1 f 2 y F z 2 x g 1 g 2 y G Feb 02, 2012 EE-709@IITB 4

Cut-Point Resolution Theory Let f 1 (x)=g 1 (x) x if f 2 (z,y) g 2 (z,y), z,y then f 2 (f 1 (x),y) g 2 (f 1 (x),y) F G if f 2 (z,y) g 2 (z,y), z,y f 2 (f 1 (x),y) g 2 (f 1 (x),y) F G F G We cannot say if F G or not z x f 1 f 2 y z x g 1 g 2 y False negative two functions are equivalent, but the verification algorithm declares them as different. Feb 02, 2012 EE-709@IITB 5

Cut-Point Resolution How to verify if negative is false or true? Procedure 1: create a miter (XOR) between two potentially equivalent nodes/functions perform ATPG test for stuck-at 0 find test pattern to prove F G efiicient for true negative (gives test vector, a proof) inefficient when there is no test 0, F G (false negative) 1, F G (true negative) F G Feb 02, 2012 EE-709@IITB 6

Cut-Point Resolution Procedure 2: create a BDD for F G perform satisfiability analysis (SAT) of the BDD if BDD for F G =, problem is not satisfiable, false negative BDD for F G, problem is satisfiable, true negative F G = F G =, F G (false negative) Non-empty, F G Note: must compose BDDs until they are equivalent, or expressed in terms of primary inputs the SAT solution, if exists, provides a test vector (proof of non-equivalence) as in ATPG unlike the ATPG technique, it is effective for false negative (the BDD is empty!) Feb 02, 2012 EE-709@IITB 7

Sequential Equivalence Checking Represent each sequential circuit as an FSM verify if two FSMs are equivalent Approach 1: Reduction to combinational circuit unroll FSM over n time frames (flatten the design) x(1) x(2) x(n) s(1) M(t 1 ) s(2) M(t 2 ) M(t n ) s(n) Combinational logic: F(x(1,2, n), s(1,2, n)) check equivalence of the resulting combinational circuits problem: the resulting circuit can be too large too handle Feb 02, 2012 EE-709@IITB 8

Sequential Verification Approach 2: Based on isomorphism of state transition graphs two machines M1, M2 are equivalent if their state transition graphs (STGs) are isomorphic perform state minimization of each machine check if STG(M1) and STG(M2) are isomorphic 0/0 1/0 0 1/1 1 0/1 State min. 0/0 1/0 0 1.2 0/1 1/0 2 0/1 M1 M1 min M2 0/0 1/1 1/0 0 1 0/1 1/1 Feb 02, 2012 EE-709@IITB 9

State Minimization X-Successor If an input sequence X takes a machine from state S i to state S j, then S j is said to be the X- successor of S j Strongly connected:- If for every pair of states (S i, S j ) of a machine M there exists an input sequence which takes M from state S i to S j, then M is said to be strongly connected Feb 02, 2012 EE-709@IITB 10

State Equivalence Two states S i and S j of machine M are distinguishable if and only if there exists at least one finite input sequence which, when applied to M, causes different output sequences, depending on whether S i or S j is the initial state The sequence which distinguishes these states is called a distinguishing sequence of the pair (S i, S j ) If there exists for pair (S i, S j ) a distinguishing sequence of length k, the states in (S i, S j ) are said to be k-distinguishable Feb 02, 2012 EE-709@IITB 11

State Equivalence Machine M1 PS NS, z X = 0 X = 1 A E, 0 D, 1 B F, 0 D, 0 C E, 0 B, 1 D F, 0 B, 0 E C, 0 F, 1 F B, 0 C, 0 (A, B) 1 Distinguishable (A, E) 3 Distinguishable Seq - 111 k-equivalent The states that are not k-distinguishable are said to be k-equivalent Also r-equivalent r<k Feb 02, 2012 EE-709@IITB 12

State Equivalence States S i and S j of machine M are said to be equivalent if and only if, for every possible input sequence, the same output sequence will be produced regardless of whether S i or S j is the initial state States that are k-equivalent for all k < n-1, are equivalent S i = S j, and S j =S k, then S i =S k Feb 02, 2012 EE-709@IITB 13

State Equivalence The set of states of a machine M can be partitioned into disjoint subsets, known as equivalence classes Two states are in the same equivalence class if and only if they are equivalent, and are in different classes if and only if they are distinguishable Property: If S i and S j are equivalent states, their corresponding X-successors, for all X, are also equivalent Feb 02, 2012 EE-709@IITB 14

State Minimization Procedure 1. Partition the states of M into subsets s.t. all states in same subset are 1-equivalent 2. Two states are 2-equivalent iff they are 1-equivalent and their I i successors, for all possible I i, are also 1-equivalent PS NS, z X = 0 X = 1 A E, 0 D, 1 B F, 0 D, 0 C E, 0 B, 1 D F, 0 B, 0 E C, 0 F, 1 F B, 0 C, 0 P0 = (ABCDEF) P1 = (ACE), (BDF) P2 = (ACE), (BD), (F) P3 = (AC), (E), (BD), (F) P4 = (AC), (E), (BD), (F) Feb 02, 2012 EE-709@IITB 15

Machine Equivalence Two machines M1, M2 are said to be equivalent if and only if, for every state in M1, there is corresponding equivalent state in M2 If one machine can be obtained from the other by relabeling its states they are said to be isomorphic to each other PS NS, z X = 0 X = 1 AC - α β, 0 γ, 1 E - β α, 0 δ, 1 BD - γ δ, 0 γ, 0 F - δ γ, 0 α, 0 Feb 02, 2012 EE-709@IITB 16

State Equivalence - Example Machine M2 PS NS, z X = 0 X = 1 A E, 0 C, 0 B C, 0 A, 0 C B, 0 G, 0 D G, 0 A, 0 E F, 1 B, 0 F E, 0 D, 0 G D, 0 G, 0 P0 = (ABCDEFG) P1 = (ABCDFG) (E) P2 = (AF) (BCDG) (E) P3 = (AF) (BD) (CG) (E) P4 = (A) (F) (BD) (CG) (E) P5 = (A) (F) (BD) (CG) (E) Feb 02, 2012 EE-709@IITB 17

Reachability-Based Equivalence Checking Approach 3: Symbolic Traversal Based Reachability Analysis Inputs S 0 S 1 M 1 Outputs M 2 =? Product Machine S0 S1 Build product machine of M 1 and M 2 Traverse state-space of product machine starting from reset states S 0, S 1 Test equivalence of outputs in each state Can use any state-space traversal technique Feb 02, 2012 EE-709@IITB 18

Sequential Verification Symbolic FSM traversal of the product machine Given two FSMs: M 1 (X,S 1, δ 1, λ 1,O 1 ), M 2 (X,S 2, δ 2, λ 2,O 2 ) Create a product FSM: M = M 1 x M 2 traverse the states of M and check its output for each transition O1 O(M) O2 the output O(M) =1, if outputs O 1 = O 2 if all outputs of M are 1, M 1 and M 2 are equivalent S1 M1 M2 S2 otherwise, an error state is reached X error trace is produced to show: M 1 M 2 Feb 02, 2012 EE-709@IITB 19

Product Machine - Construction Define the product machine M(X, S, S 0,,,O) states, S = S 1 S 2 next state function, (s, x) : (S 1 S 2 ) X (S 1 S 2 ) output function, (s, x) : (S 1 S 2 ) X {0,1} 1 1 M1 X O = 1 if O 1=O 2 0 otherwise 2 M2 2 (s,x) = 1 (s 1,x) 2 (s 2,x) Error trace (distinguishing sequence) that leads to an error state - sequence of inputs which produces 1 at the output of M - produces a state in M for which M1 and M2 give different outputs Feb 02, 2012 EE-709@IITB 20

FSM Traversal - Algorithm Traverse the product machine M(X,S,,,O) start at an initial state S 0 iteratively compute symbolic image Img(S 0,R) (set of next states): Img( S 0,R ) = x s S 0 (s) R(x,s,t) R = i R i = i (t i i (s,x)) until an error state is reached transition relation R i for each next state variable t i can be computed as t i = (t (s,x)) (this is an alternative way to compute transition relation, when design is specified at gate level) Feb 02, 2012 EE-709@IITB 21

Construction of the Product FSM 0/0 1/0 0 1 1/1 0/1 M 1 M 2 2 1/1 1/0 0 1 1/1 For each pair of states, s 1 M 1, s 2 M 2 create a combined state s = (s 1. s 2 ) of M create transitions out of this state to other states of M label the transitions (input/output) accordingly 0/1 1/0 M 1 0/1 M 1/0 2 1 2 1 0 1.1 0/1 1/1 0/0 0.2 1 1 0/0 0 0 0/1 Output = { 1 OK 0 error Feb 02, 2012 EE-709@IITB 22

FSM Traversal in Action 0/0 M1 1/0 0 1 1/1 0/1 Initiall states: s 1 =0, s 2 =0, s=(0.0) Out(M) State reached x=0 x=1 New 0 = (0.0) 1 1 New 1 = (1.1) 1 1 New 2 = (0.2) 1 1 New 3 = (1.0) 0 0 M2 0/0 0/0 1.2 M 0/0 1/0 0/0 2 1/1 1/0 0.1 0 1 1/1 1/0 1/0 0.0 0/1 1/1 1.0 1.1 0/1 Error state 0/0 1/1 0/1 0.2 1/1 0/1 STOP - backtrack to initial state to get error trace: x={1,1,1,0} Feb 02, 2012 EE-709@IITB 23

Thank you Feb 02, 2012 EE-709@IITB 24