ESE535: Electronic Design Automation

Slides:



Advertisements
Similar presentations
CSE 311 Foundations of Computing I
Advertisements

Partial Order Reduction: Main Idea
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 13: March 4, 2009 FSM Equivalence Checking.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 22: April 23, 2008 FSM Equivalence Checking.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 15, 2009 Routing 1.
Computation Engines: BDDs and SAT (part 2) 290N: The Unknown Component Problem Lecture 8.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: March 2, 2009 Sequential Optimization (FSM Encoding)
Theory of Computing Lecture 22 MAS 714 Hartmut Klauck.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 18, 2009 Static Timing Analysis and Multi-Level Speedup.
CSCI 3301 Transparency No. 9-1 Chapter #9: Finite State Machine Optimization Contemporary Logic Design.
Finite State Machines Data Structures and Algorithms for Information Processing 1.
State Minimization and Determinization EECS 290A Sequential Logic Synthesis and Verification.
CSE 311 Foundations of Computing I Lecture 21 Finite State Machines Spring
CALTECH CS137 Spring DeHon CS137: Electronic Design Automation Day 9: May 6, 2002 FSM Equivalence Checking.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 24: April 18, 2011 Covering and Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 8, 2015 Sequential Optimization (FSM Encoding)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 4, 2011 Static Timing Analysis and Multi-Level Speedup.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 13, 2013 High Level Synthesis II Dataflow Graph Sharing.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
CS137: Electronic Design Automation
Capabilities, Minimization, and Transformation of Sequential Machines
Finite State Machines Dr K R Bond 2009
Sequential Flexibility
Formal Language & Automata Theory
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
PROPERTIES OF REGULAR LANGUAGES
Instructor: Rajeev Alur
CSE 311 Foundations of Computing I
PDAs Accept Context-Free Languages
ESE535: Electronic Design Automation
CS137: Electronic Design Automation
Instructor: Alexander Stoytchev
ESE535: Electronic Design Automation
Chapter 2 FINITE AUTOMATA.
ESE535: Electronic Design Automation
Non-deterministic Finite Automata (NFA)
CSE 311 Foundations of Computing I
Instructor: Alexander Stoytchev
CS 154, Lecture 3: DFANFA, Regular Expressions.
ESE535: Electronic Design Automation
Non-Deterministic Finite Automata
ECE 553: TESTING AND TESTABLE DESIGN OF DIGITAL SYSTES
Intro to Data Structures
Elementary Questions about Regular Languages
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
ESE535: Electronic Design Automation
ESE532: System-on-a-Chip Architecture
MA/CSSE 474 Theory of Computation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
Instructor: Aaron Roth
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
CSE 311 Foundations of Computing I
Instructor: Aaron Roth
ESE 150 – Digital Audio Basics
Instructor: Aaron Roth
Instructor: Aaron Roth
Lecture 5 Scanning.
CS137: Electronic Design Automation
Presentation transcript:

ESE535: Electronic Design Automation Day 20: April 1, 2013 FSM Equivalence Checking Penn ESE 535 Spring 2013 -- DeHon

Today Sequential Verification FSM equivalence Issues Behavioral (C, MATLAB, …) RTL Gate Netlist Layout Masks Arch. Select Schedule FSM assign Two-level Multilevel opt. Covering Retiming Placement Routing Today Sequential Verification FSM equivalence Issues Extracting STG Valid state reduction Incomplete Specification Penn ESE 535 Spring 2013 -- DeHon

FSM Reminder Penn ESE 535 Spring 2013 -- DeHon

Finite-State Machine What’s a FSM? Or DFA = Deterministic Finite Automata? Penn ESE 535 Spring 2013 -- DeHon

FSM Logic depends on past inputs Behaves differently based on state Logic selects outputs and next state Based on inputs and current state Penn ESE 535 Spring 2013 -- DeHon

FSM Examples What are examples where need an FSM rather than just combination logic? Penn ESE 535 Spring 2013 -- DeHon

FSM Examples What are examples where need an FSM rather than just combination logic? Parsing Protocols Datapath control Data dependent branching Penn ESE 535 Spring 2013 -- DeHon

FSM Equivalence Penn ESE 535 Spring 2013 -- DeHon

Motivation Write at two levels Java prototype and VHDL implementation VHDL specification and gate-level implementation Write at high level and synthesize/optimize Want to verify that synthesis/transforms did not introduce an error Penn ESE 535 Spring 2013 -- DeHon

Question Given a state machine with N states: How long of an input sequence do I need to visit any of the N states? (i.e. if someone picks a state, how long of an input sequence might you need to select a path to that state?) Penn ESE 535 Spring 2013 -- DeHon

Cornerstone Result Given two FSM’s, can test their equivalence in finite time N.B.: Can visit all states in a FSM with finite input strings No longer than number of states Any string longer must have visited some state more than once (by pigeon-hole principle) Cannot distinguish any prefix longer than number of states from some shorter prefix which eliminates cycle (pumping lemma) Penn ESE 535 Spring 2013 -- DeHon

FSM Equivalence Given same sequence of inputs Returns same sequence of outputs Observation means can reason about finite sequence prefixes and extend to infinite sequences which FSMs are defined over Penn ESE 535 Spring 2013 -- DeHon

Equivalence Brute Force: How many such strings? Generate all strings of length |state| (for larger FSM = the one with the most states) Feed to both FSMs with these strings Observe any differences? How many such strings? |Alphabet|states Penn ESE 535 Spring 2013 -- DeHon

Smarter Create composite FSM Start with both FSMs Connect common inputs together (Feed both FSMs) XOR together outputs of two FSMs Xor’s will be 1 if they disagree, 0 otherwise Ask if the new machine ever generate a 1 on an xor output (signal disagreement) Any 1 is a proof of non-equivalence Never produce a 1  equivalent Penn ESE 535 Spring 2013 -- DeHon

Creating Composite FSM Assume know start state for each FSM Each state in composite is labeled by the pair {S1i, S2j} How many such states? Compare to number of strings of length #states? Start in {S10, S20} For each symbol a, create a new edge: T(a,{S10, S20}) {S1i, S2j} If T1(a, S10) S1i, and T2(a, S20) S2j Repeat for each composite state reached Penn ESE 535 Spring 2013 -- DeHon

Composite DFA How much work? Can group together original edges At most |alphabet|*|State1|*|State2| edges == work Can group together original edges i.e. in each state compute intersections of outgoing edges Really at most |E1|*|E2| Penn ESE 535 Spring 2013 -- DeHon

Non-Equivalence State {S1i, S2j} demonstrates non-equivalence iff {S1i, S2j} reachable On some input, State S1i and S2j produce different outputs If S1i and S2j have the same outputs for all composite states, it is impossible to distinguish the machines They are equivalent A reachable state with differing outputs Implies the machines are not identical Penn ESE 535 Spring 2013 -- DeHon

Empty Language Now that we have a composite state machine, with this construction Question: does this composite state machine ever produce a 1? Is there a reachable state that has differing outputs? Penn ESE 535 Spring 2013 -- DeHon

Answering Empty Language Start at composite start state {S10, S20} Search for path to a differing state Use any search (BFS, DFS) End when find differing state Not equivalent OR when have explored entire reachable graph w/out finding Are equivalent Penn ESE 535 Spring 2013 -- DeHon

Reachability Search Worst: explore all edges at most once O(|E|)=O(|E1|*|E2|) When we know the start states, we can combine composition construction and search i.e. only follow edges which fill-in as search (way described) Penn ESE 535 Spring 2013 -- DeHon

Example s0 q0 q1 q3 q2 s1 s2 -/1 -/0 1/0 0/0 -/0 -/1 -/1 Penn ESE 535 Spring 2013 -- DeHon

Creating Composite FSM Assume know start state for each FSM Each state in composite is labeled by the pair {S1i, S2j} Start in {S10, S20} For each symbol a, create a new edge: T(a,{S10, S20}) {S1i, S2j} If T1(a, S10) S1i, and T2(a, S20) S2j Check that both state machines produce same outputs on input symbol a Repeat for each composite state reached Penn ESE 535 Spring 2013 -- DeHon

Example s3 s4 s0 s1 s2 0/0 q0 q1 q2 1/0 0/1 1/1 Penn ESE 535 Spring 2013 -- DeHon

Issues to Address Obtaining State Transition Graph from Logic Incompletely specified FSM? Know valid (possible) states? Know start state? Penn ESE 535 Spring 2013 -- DeHon

Getting STG from Logic Brute Force Smarter For each state For each input minterm Simulate/compute output Add edges Compute set of states will transition to Smarter Exploit cube grouping, search pruning Cover sets of inputs together Coming attraction: PODEM Penn ESE 535 Spring 2013 -- DeHon

Incomplete State Specification Add edge for unspecified transition to Single, new, terminal state Reachability of this state may indicate problem Actually, if both transition to this new state for same cases Might say are equivalent Just need to distinguish one machine in this state and other not Penn ESE 535 Spring 2013 -- DeHon

Valid States Composite state construction and reachability further show what’s reachable So, end up finding set of valid states Not all possible states from state bits Penn ESE 535 Spring 2013 -- DeHon

Start State? Worst-case: Try verifying for all possible start state pairs Identify start state pairs that lead to equivalence Candidate start pairs More likely have one (specification) where know start state Only need to test with all possible start states for the other FSM Penn ESE 535 Spring 2013 -- DeHon

Summary Finite state means Composition Reachability Can test with finite input strings Composition Turn it into a question about a single FSM Reachability Allows us to use poly-time search on FSM to prove equivalence Or find differentiating input sequence Penn ESE 535 Spring 2013 -- DeHon

Big Ideas Equivalence Exploit structure Same observable behavior Internal implementation irrelevant Number/organization of states, encoding of state bits… Exploit structure Finite DFA … necessity of reconvergent paths Structured Search – group together cubes Limit to valid/reachable states Proving invariants vs. empirical verification Penn ESE 535 Spring 2013 -- DeHon

Try to cleanup some of Wednesday’s lecture…. (FSM Encoding) Time Permitting Try to cleanup some of Wednesday’s lecture…. (FSM Encoding) Penn ESE 535 Spring 2013 -- DeHon

Two Issues Input Coding Output Coding Use a single input cube to select an output Capture the union of things that behave similarly on a single cube Output Coding Only need to cover the 1’s Share logic producing 1’s between states Penn ESE 535 Spring 2013 -- DeHon

Day 19 Preclass What input cases produce same output? Current State Next State ST1 ST2 1 ST3 What input cases produce same output? Penn ESE 535 Spring 2013 -- DeHon

Day 19 Preclass Produce same output? Current State Input Next State ST2 1 ST3 Produce same output? Penn ESE 535 Spring 2013 -- DeHon

Day 19 Preclass Current State Input Next State ST1+ST2 ST2 ST1 1 ST3 ST2 ST1 1 ST3 ST2+ST3 Current State Input Next State ST1 ST2 1 ST3 Penn ESE 535 Spring 2013 -- DeHon

Day 19 Preclass Current State Input Next State ST1+ST2 ST2 ST1 1 ST3 ST2+ST3 If we can code ST1+ST2 and ST2+ST3 as cubes, we can save due to input encodings. How could we make these cubes? 3b state code? 2b state code? Penn ESE 535 Spring 2013 -- DeHon

Day 19 Preclass Assume 2 bit state code How many Pterms if ST3=00? Current State Input Next State ST1+ST2 ST2 ST1 1 ST3 ST2+ST3 Assume 2 bit state code How many Pterms if ST3=00? (and assume get input groupings on cube) How many if ST3=11? What’s a good code? Penn ESE 535 Spring 2013 -- DeHon

Admin Assignment 6 due today Will try to get quick feedback Reading for next two lectures on blackboard Penn ESE 535 Spring 2013 -- DeHon