EECS 20 Lecture 11 (February 9, 2001) Tom Henzinger Feedback

Download EECS 20 Lecture 11 (February 9, 2001) Tom Henzinger Feedback

Post on 18-Dec-2015

213 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

<ul><li> Slide 1 </li> <li> EECS 20 Lecture 11 (February 9, 2001) Tom Henzinger Feedback </li> <li> Slide 2 </li> <li> Parity LastThree Nats 0 Bools path without delay </li> <li> Slide 3 </li> <li> 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 { </li> <li> Slide 4 </li> <li> Parity System truefalse true / true true / false false / true false / false States = Bools Inputs = Bools Outputs = Bools </li> <li> Slide 5 </li> <li> LastThree System States = { 0, 1, 2 } Inputs = Bools Outputs = Bools 0 21 true / false false / false true / true true / false </li> <li> Slide 6 </li> <li> A Run of the LastThree System Time 0 1 2 3 4 Input t t t t f Output State </li> <li> Slide 7 </li> <li> A Run of the LastThree System Time 0 1 2 3 4 Input t t t t f Output State 0 </li> <li> Slide 8 </li> <li> A Run of the LastThree System Time 0 1 2 3 4 Input t t t t f Output f State 0 1 </li> <li> Slide 9 </li> <li> A Run of the LastThree System Time 0 1 2 3 4 Input t t t t f Output f f State 0 1 2 </li> <li> Slide 10 </li> <li> A Run of the LastThree System Time 0 1 2 3 4 Input t t t t f Output f f t State 0 1 2 2 </li> <li> Slide 11 </li> <li> A Run of the LastThree System Time 0 1 2 3 4 Input t t t t f Output f f t t State 0 1 2 2 2 </li> <li> Slide 12 </li> <li> A Run of the LastThree System Time 0 1 2 3 4 Input t t t t f Output f f t t f State 0 1 2 2 2 0 </li> <li> Slide 13 </li> <li> Parity LastThree FeedbackLoop Nats 0 Bools This block diagram is ok, because every cycle contains a delay. </li> <li> Slide 14 </li> <li> Parity LastThree FeedbackLoop Nats 0 Bools x y z u q1 q2 </li> <li> Slide 15 </li> <li> Parity LastThree FeedbackLoop Nats 0 Bools 1 2 3 1 x y z u q1 q2 </li> <li> Slide 16 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y Aux z Aux u State q1 State q2 123123 </li> <li> Slide 17 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y Aux z Aux u State q1 t State q2 0 123123 </li> <li> Slide 18 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y t Aux z Aux u State q1 t State q2 0 123123 </li> <li> Slide 19 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y t Aux z f Aux u State q1 t State q2 0 123123 </li> <li> Slide 20 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y t Aux z f Aux u f State q1 t State q2 0 123123 </li> <li> Slide 21 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y t Aux z f Aux u f State q1 t t State q2 0 1 123123 </li> <li> Slide 22 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y t t Aux z f Aux u f State q1 t t State q2 0 1 123123 </li> <li> Slide 23 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y t t Aux z f f Aux u f State q1 t t State q2 0 1 123123 </li> <li> Slide 24 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y t t Aux z f f Aux u f f State q1 t t State q2 0 1 123123 </li> <li> Slide 25 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y t t Aux z f f Aux u f f State q1 t t t State q2 0 1 2 123123 </li> <li> Slide 26 </li> <li> A Run of the FeedbackLoop System Time 0 1 2 3 4 Input x t t f t f Output y t t t t f Aux z f f t t f Aux u f f f t f State q1 t t t t f f State q2 0 1 2 2 2 0 </li> <li> Slide 27 </li> <li> The FeedbackLoop System Inputs [ FeedbackLoop ] = Bools Outputs [ FeedbackLoop ] = Bools States [ FeedbackLoop ] = States [ Parity ] States [ LastThree ] = { true, false } { 0, 1, 2 } initialState [ FeedbackLoop ] = ( initialState [ Parity ], initialState [ LastThree ] ) = ( true, 0 ) </li> <li> Slide 28 </li> <li> The FeedbackLoop System, continued output [ FeedbackLoop ] ( ( q1, q2 ), x ) = output [ Parity] ( q1, any ) The value of this does not matter ! </li> <li> Slide 29 </li> <li> The FeedbackLoop System, continued output [ FeedbackLoop ] ( ( q1, q2 ), x ) = output [ Parity] ( q1, any ) Let this be y. nextState [ FeedbackLoop ] ( ( q1, q2 ), x ) 2 = nextState [ LastThree ] ( q2, y ) </li> <li> Slide 30 </li> <li> The FeedbackLoop System, continued output [ FeedbackLoop ] ( ( q1, q2 ), x ) = output [ Parity] ( q1, any ) Let this be y. nextState [ FeedbackLoop ] ( ( q1, q2 ), x ) 2 = nextState [ LastThree ] ( q2, y ) Let z = output [ LastThree ] ( q2, y ). </li> <li> Slide 31 </li> <li> The FeedbackLoop System, continued output [ FeedbackLoop ] ( ( q1, q2 ), x ) = output [ Parity] ( q1, any ) Let this be y. nextState [ FeedbackLoop ] ( ( q1, q2 ), x ) 2 = nextState [ LastThree ] ( q2, y ) Let z = output [ LastThree ] ( q2, y ). nextState [ FeedbackLoop ] ( ( q1, q2 ), x ) 1 = nextState [ Parity ] ( q1, x z ) </li> <li> Slide 32 </li> <li> If every cycle contains a delay, then all values can be computed. If there is a cycle without delay, then some values may not be well-defined. </li> <li> Slide 33 </li> <li> An Ill-Defined System Nats 0 Bools </li> <li> Slide 34 </li> <li> An Ill-Defined System Nats 0 Bools f f X </li> <li> Slide 35 </li> <li> An Ill-Defined System Nats 0 Bools f t X No legal output ! </li> <li> Slide 36 </li> <li> Another Ill-Defined System id Nats 0 Bools </li> <li> Slide 37 </li> <li> Another Ill-Defined System id Nats 0 Bools f t </li> <li> Slide 38 </li> <li> Another Ill-Defined System id Nats 0 Bools f f Multiple legal outputs ! </li> <li> Slide 39 </li> <li> Example: Vending Machine </li> <li> Slide 40 </li> <li> Coin Collector Collect Nats 0 {0, 30 } Nats 0 Coins 1 2 Nats 0 Bools 1 2 reset funds Let Coins = { Nickel, Dime, Quarter }. cin cthru </li> <li> Slide 41 </li> <li> Coin Collector 010525201530 (D,f)/(15, ) ( ,f)/(15, ) (N,f)/ (15, ) ( ,t)/(15, ) (Q,f)/(15,Q) (Q,t)/(15, ) (N,t)/(15, ) (D,t)/ (15, ) </li> <li> Slide 42 </li> <li> Coin Collector Collect Nats 0 {0, 30 } Nats 0 Coins 1 2 Nats 0 Bools 1 2 reset fundscin cthru </li> <li> Slide 43 </li> <li> Soda Dispenser Disp Nats 0 Dispense Nats 0 Select Nats 0 Bools 1 2 Nats 0 { 0, 30 } 1 2 funds reset 3 Nats 0 Coins change select soda Let Select = { selectCoke, selectDiet }. Let Dispense = { dispenseCoke, dispenseDiet }. </li> <li> Slide 44 </li> <li> Soda Dispenser none Diet Coke {(C,x)|x</li></ul>