EECS 20 Lecture 9 (February 5, 2001) Tom Henzinger Transition Diagrams.

Slides:



Advertisements
Similar presentations
Clocked Synchronous State-machine Analysis
Advertisements

CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Decomposing Refinement Proofs using Assume-Guarantee Reasoning Tom Henzinger (UC Berkeley) Shaz Qadeer (Compaq Research) Sriram Rajamani (Microsoft Research)
Counters. In class excercise How to implement a “counter”, which will count as 0,3,1,4,5,7,0,3,1,…… Q2Q1Q0D2D1D
CSCE 211: Digital Logic Design. Chapter 6: Analysis of Sequential Systems.
1 EE365 Sequential-circuit analysis. 2 Clocked synchronous seq. circuits A.k.a. “state machines” Use edge-triggered flip-flops All flip-flops are triggered.
CS 151 Digital Systems Design Lecture 21 Analyzing Sequential Circuits.
A Sequential Parity Checker
Nonlinear & Neural Networks LAB. CHAPTER 13 Analysis of Clocked Sequential Circuit 13.1 A Sequential Parity Checker 13.2 Analysis by Signal Tracing 13.3.
Spring 20067W. Rhett Davis with minor modifications by Dean Brock ECE 406 at UNASlide 1 ECE 406 Design of Complex Digital Systems Lecture 10: 9: State.
EECS 20 Lecture 14 (February 16, 2001) Tom Henzinger Nondeterminism.
EECS 20 Lecture 11 (February 9, 2001) Tom Henzinger Feedback.
EECS 20 Lecture 38 (April 27, 2001) Tom Henzinger Review.
Week Real time state machines 2.LTI systems– the [A,B,C,D] representation 3.Differential equation-approximation by discrete- time system 4.Response–
EECS 20 Lecture 15 (February 21, 2001) Tom Henzinger Simulation.
EECS 20 Lecture 13 (February 14, 2001) Tom Henzinger Minimization.
CS 140 Lecture 9 Professor CK Cheng 4/30/02. Part II. Sequential Network 1.Memory 2.Specification 3.Implementation S XY s i t+1 = g i (S t, x t )
Week 2/3 1.System interconnections (block diagrams) 2.Finite State Machines (Chapter 3)
EECS 20 Lecture 16 (February 26, 2001) Tom Henzinger Determinization.
EECS 20 Lecture 1 (January 17, 2001) Tom Henzinger Motivation.
EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger State Machines.
EECC341 - Shaaban #1 Lec # 14 Winter Clocked Synchronous State-Machines Such machines have the characteristics: –Sequential circuits designed.
EECS 20 Lecture 3 (January 22, 2001) Tom Henzinger Sets, Tuples, Functions.
EECS 20 Lecture 6 (January 29, 2001) Tom Henzinger Transducive Systems.
CSCE 211: Digital Logic Design
EECS 20 Lecture 7 (January 31, 2001) Tom Henzinger Reactive Systems.
EECS 20 Lecture 2 (January 19, 2001) Tom Henzinger Mathematical Language.
Week 1 1.websitewebsite 2.takehome examtakehome 3.Chapter Appendix A.
 x (x 2  0) 1. True2. False.  x (3x + 2 = 12) 1. True2. False.
Week 4 1.More examples 2.Nondeterminism, equivalence, simulation (Ch 3) 3.Composition (Ch 4)
EECS 20 Lecture 5 (January 26, 2001) Tom Henzinger Signals.
CS 140 Lecture 10 Professor CK Cheng 10/29/02. Part II. Sequential NetworkReminder 1.Flip flops 2.Specification 3.Implement Netlist  State Table  State.
EECS 20 Lecture 4 (January 24, 2001) Tom Henzinger Block Diagrams.
EECS 20 Lecture 36 (April 23, 2001) Tom Henzinger Safety Control.
EECS 20 Lecture 10 (February 7, 2001) Tom Henzinger Product Machines.
EECS 20 Chapter 3 Sections State Machines Continued Last time we Introduced the deterministic finite state machine Discussed the concept of state.
EECS 20 Lecture 12 (February 12, 2001) Tom Henzinger Equivalence.
Chapter 6 Analysis of Sequential Systems Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
COM S 207 While-Loop Statement Instructor: Ying Cai Department of Computer Science Iowa State University
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
Boolean Algebra. Boolean algebra (or Boolean logic) is a logical calculus of truth values, developed by George Boole in the late 1830s. It created a notation.
Lecture 18 More Moore/Mealy machines.
Counters. In class excercise How to implement a “counter”, which will count as 0,3,1,4,5,7,0,3,1,…… Q2Q1Q0D2D1D
A relation is an operation, or series of operations, that maps one number onto another.
Chapter Sections: Topic: Testing a point is on line Vocabulary: A function is a machine that makes a y for every x. The equation of a line can be a function.
DLD Lecture 26 Finite State Machine Design Procedure.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Slot machines A healthy way to learn about connectives!
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Introduction to Sequential Logic Design Finite State-Machine Analysis.
Cyclomatic Complexity Philippe CHARMAN Last update:
White-Box Testing Statement coverage Branch coverage Path coverage
Analysis of Clocked Sequential Circuit
SLIDES FOR CHAPTER 13 ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
29th Oct Review Session 8.
Autonomous Cyber-Physical Systems: Synchronous Components: II
Motivation EECS 20 Lecture 1 (January 17, 2001) Tom Henzinger.
Instructor: Alexander Stoytchev
Finite State Machines.
Analysis of Sequential Systems
State Machines EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger.
Counters.
Lecture 20 State minimization via row matching.
CSE 140 Lecture 9 Sequential Networks
Chapter 2 Sets Active Learning Lecture Slides
Mathematical Language
Lecture 4: Finite State Machines
Presentation transcript:

EECS 20 Lecture 9 (February 5, 2001) Tom Henzinger Transition Diagrams

Discrete-Time Reactive System : input/output function F State-Machine Implementation : decomposition of F into 1. memory-free part ( called “Update” ) 2. delay part ( what delay stores is called “state” )

Discrete-Time Reactive System Nats 0  InputsNats 0  Outputs F : [ Nats 0  Inputs ]  [ Nats 0  Outputs ] F

The Parity System Parity : [ Nats 0  Bools ]  [ Nats 0  Bools ] such that  x  [ Nats 0  Bools ],  y  Nats 0, ( Parity (x) ) (y) = true if | trueValues (x,y) | is even false if | trueValues (x,y) | is odd { where trueValues (x,y) = { z  Nats 0 | z < y  x (z) = true }

The Count System Count : [ Nats 0  Bools ]  [ Nats 0  Bools ] such that  x  [ Nats 0  Bools ],  y  Nats 0, ( Count (x) ) (y) = true if | trueValues (x,y) |  | falseValues (x,y) | false if | trueValues (x,y) | < | falseValues (x,y) | { where falseValues (x,y) = { z  Nats 0 | z < y  x (z) = false }

State-Machine Implementation Nats 0  InputsNats 0  Outputs D initialState Update Nats 0  States update : States  Inputs  States  Outputs initialState  States F memory-free delay stores state

Nats 0  Inputs Nats 0  Outputs D initialState Output 1 2 Nats 0  States NextState 1 2 F memory-free delay stores state nextState : States  Inputs  States output : States  Inputs  Outputs initialState  States

State-Machine Implementation of the Parity System State after i-th input : true, if first i inputs contain even number of true’s false, if first i inputs contain odd number of true’s Two states

Inputs = Bools Outputs = Bools States = Bools initialState = true nextState : States  Inputs  States such that  q  States,  x  Inputs, nextState (q,x) = ( q  x ) output : States  Inputs  Outputs such that  q  States,  x  Inputs, output (q,x) = q

Nats 0  Bools D true Nats 0  Bools Parity 

State-Machine Implementation of the Count System State after i-th input : i, if first i inputs contain i more true’s than false’s -i, if first i inputs contain i more false’s than true’s Infinitely many states

Inputs = Bools Outputs = Bools States = Ints initialState = 0 nextState : States  Inputs  States such that  q  States,  x  Inputs, nextState (q,x) = ± (x,q) output : States  Inputs  Outputs such that  q  States,  x  Inputs, output (q,x) = pos (q)

Nats 0  Bools D0D0 Nats 0  Ints Count ± pos

A State Machine Inputs ( set of possible input values ) Outputs ( set of possible output values ) States ( set of states ) initialState  States update : States  Inputs  States  Outputs

State-Machine Implementation of the Parity System Inputs = Bools Outputs = Bools States = Bools initialState = true update : States  Inputs  States  Outputs such that  q  States,  x  Inputs, update (q,x) 1 = ( q  x ) update (q,x) 2 = q

State-Machine Implementation of the Count System Inputs = Bools Outputs = Bools States = Ints initialState = 0 update : States  Inputs  States  Outputs such that  q  States,  x  Inputs, update (q,x) 1 = ± (x,q) update (q,x) 2 = pos (q)

Transition Diagram of the Parity System truefalse true / true true / false false / true false / false States = Bools Inputs = Bools Outputs = Bools

Transition Diagram of the Count System States = Ints Inputs = Bools Outputs = Bools 01 true / true false / true 2 true / true false / true true / true false / true true / false false / true true / false false / false

Transition Diagram Graph: Nodes = states Edges = transitions Determinism : for every state and input, at most one outgoing edge Receptiveness : for every state and input, at least one outgoing edge ( because “update” is a function )

Exercise Draw the transition diagram of a state machine with Inputs = Bools Outputs = Bools At all times t, the output is true iff the inputs at times t-2, t-1, and t are all true.

State after i-th input : 0, if i-th input is false ( or i = 0 ) 1, if i-th input is true and (i-1)-st input is false 2, if both i-th and (i-1)-st inputs are true Three states ( or i = 1 )

Transition Diagram States = { 0, 1, 2 } Inputs = Bools Outputs = Bools 0 21 true / false false / false true / true true / false

The Parity System : States [ Parity] = { true, false } initialState [ Parity ] = true nextState [ Parity ] (q,x) = (q  x) output [ Parity ] (q,x) = q The LastThree System : States [ LastThree] = { 0, 1, 2 } initialState [ LastThree ] = 0 nextState [ LastThree ] (q,x) = output [ LastThree ] (q,x) = ( ( q = 2 )  x ) 0 if  x min (q+1, 2) if x {

Parity LastThree  ParityOrLastThree Nats 0  Bools t, t, t, …

Parity LastThree  ParityOrLastThree Nats 0  Bools t, t, t, …t, f, t, …

What is the state space of ParityOrLastThree ? What is the initial state of ParityOrLastThree ? What is the nextState function of ParityOrLastThree ? What is the output function of ParityOrLastThree ?

Parity LastThree  ParityOrLastThree Nats 0  Bools Out1 Nxt1 D init1 Out2 Nxt2 D init2

 ParityOrLastThree Nats 0  Bools Out1 Nxt1 D init1 Out2 Nxt2 D init2

 ParityOrLastThree Nats 0  Bools Out1 Nxt1 D init1 Out2 Nxt2 D init2

 ParityOrLastThree Nats 0  Bools Out1 Nxt1 D init1 Out2 Nxt2 D init2

ParityOrLastThree Nats 0  Bools output nextState D initialState

The ParityOrLastThree System Inputs [ ParityOrLastThree ] = Bools Outputs [ ParityOrLastThree ] = Bools States [ ParityOrLastThree ] = States [ Parity ]  States [ LastThree ] = { true, false }  { 0, 1, 2 } initialState [ ParityOrLastThree ] = ( initialState [ Parity ], initialState [ LastThree ] ) = ( true, 0 )

The ParityOrLastThree System, continued nextState [ ParityOrLastThree ] ( ( q1, q2 ), x ) = ( nextState [ Parity ] (q1, x), nextState [ LastThree ] (q2, x) ) output [ ParityOrLastThree ] ( ( q1, q2 ), x ) = output [ Parity ] (q1, x)  output [ LastThree ] (q2, x)

t, 0 f, 0f, 1f, 2 t, 2 t, 1

t, 0 f, 0f, 1f, 2 t, 2 t, 1 f/tf/t t/tt/t

t, 0 f, 0f, 1f, 2 t, 2 t, 1 f/tf/t t/tt/t t/ft/f f/ff/f

t, 0 f, 0f, 1f, 2 t, 2 t, 1 f/tf/t t/tt/t t/ft/f f/ff/f t/ft/f f/ff/f

t, 0 f, 0f, 1f, 2 t, 2 t, 1 f/tf/t t/tt/tt/ft/f f/ff/f t/ft/f f/ff/f t/tt/t f/tf/t

t, 0 f, 0f, 1f, 2 t, 2 t, 1 f/tf/t t/tt/tt/ft/f f/ff/f t/ft/f f/ff/f t/tt/t f/tf/t t/tt/t f/tf/t

t, 0 f, 0f, 1f, 2 t, 2 t, 1 f/tf/t t/tt/tt/ft/f f/ff/f t/ft/f f/ff/f t/tt/t f/tf/t t/tt/t f/tf/t t/tt/t f/ff/f