Unformatted text preview:

University of Illinois at Urbana Champaign Dept of Electrical and Computer Engineering ECE 120 Introduction to Computing Caring About Don t Cares and Glue Logic Let s Have Some Ice Cream Let s build something Anyone like ice cream Let s build an ice cream dispenser Mango and pistachio ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 1 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 2 Start by Specifying the Inputs and Outputs The User Has Three Choices and One Non Choice inputs three buttons M ango B lend P istachio 1 when it s pushed 1 when it s pushed 1 when it s pushed outputs two 2 bit unsigned numbers CM 1 0 number of cups of mango CP 1 0 number of cups of pistachio Help fill in the truth table Push M get one cup of mango Push B get cup of each Push P get one cup of pistachio Push nothing get nothing 00 00 01 M B P CM CP 00 0 0 0 0 0 1 10 0 1 0 01 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 10 00 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 3 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 4 3 4 2018 1 Fill the Rest with Don t Cares We Need to Solve for Each Output Bit What about the rest Who cares Fill with x s M B P CM CP 00 0 0 0 00 10 0 0 1 00 01 0 1 0 01 xx xx 0 1 1 00 1 0 0 10 xx xx 1 0 1 xx xx 1 1 0 xx 1 1 1 xx Now we can copy to K maps First CM 1 CM 1 00 01 11 10 BP M 0 1 0 1 0 x x x 0 x CM 1 M M B P CM CP 00 0 0 0 00 10 0 0 1 00 01 0 1 0 01 xx 0 1 1 xx 00 1 0 0 10 xx 1 0 1 xx xx 1 1 0 xx xx 1 1 1 xx ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 5 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 6 Solve the Low Bit of Mango Solve the High Bit of Pistachio Next CM 0 CM 0 00 01 11 10 BP M 0 1 0 0 0 x x x 1 x CM 0 B M B P CM CP 00 0 0 0 00 10 0 0 1 00 01 0 1 0 01 xx 0 1 1 xx 00 1 0 0 10 xx 1 0 1 xx xx 1 1 0 xx xx 1 1 1 xx And CP 1 CP 1 00 01 11 10 BP M 0 1 0 0 1 x x x 0 x CP 1 P M B P CM CP 00 0 0 0 00 10 0 0 1 00 01 0 1 0 01 xx 0 1 1 xx 00 1 0 0 10 xx 1 0 1 xx xx 1 1 0 xx xx 1 1 1 xx ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 7 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 8 3 4 2018 2 Solve the Low Bit of Pistachio The Solution Requires No Gates And finally CP 0 CP 0 00 01 11 10 BP M 0 1 0 0 0 x x x 1 x CP 0 B M B P CM CP 00 0 0 0 00 10 0 0 1 00 01 0 1 0 01 xx 0 1 1 xx 00 1 0 0 10 xx 1 0 1 xx xx 1 1 0 xx xx 1 1 1 xx The don t cares made the functions so simple that we don t even need any gates M B P CM 1 CM 0 CP 1 CP 0 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 9 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 10 What if a User Pushes Two Buttons Don t Cares Not for Human Behavior Let s be careful What happens if a user presses M and B at the same time 1 5 cups of mango AND 0 5 cups of pistachio 1 M 1 B 0 P 1 CM 1 CM 0 1 0 CP 1 CP 0 1 In the best case the cup overflows 2 cups of ice cream instead of 1 cup In the worst case the engineer of the mechanical system assumed that we would not send 11 and something worse happens when we do So we DO care Generally using don t cares when humans are involved is a bad idea ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 11 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 12 3 4 2018 3 Let s Clean Up the Inputs How can we fix the problem One approach choose specific outputs for each combination of inputs then solve the K maps again Another approach clean up the inputs with more logic prevent humans from ever producing bad combinations Use Glue Logic to Ensure that Assumptions Hold For example we can force all inputs to zero if the human presses more than one button glue logic dashed box Each of the AND gates produces a 1 iff the corresponding button is the ONLY 1 entered M B P CM 1 CM 0 CP 1 CP 0 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 13 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 14 The Inputs Can be Cleaned Up in Many Ways What About Picking Specific K Maps Forcing invalid input combinations to zero is just one strategy We could also choose a priority on the buttons six possible choices For example Pistachio overrides other buttons and Mango overrides Blend Or use a combination of approaches In the case of our ice cream dispenser and the strategy shown the two approaches are the same just remove the dashed box In general however these approaches vary in area speed and or power Cleaning up the inputs is perhaps easier to understand ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 15 ECE 120 Introduction to Computing 2016 Steven S Lumetta All rights reserved slide 16 3 4 2018 4


View Full Document

UIUC ECE 120 - Caring About Don’t Cares and Glue Logic

Download Caring About Don’t Cares and Glue Logic
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Caring About Don’t Cares and Glue Logic and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Caring About Don’t Cares and Glue Logic and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?