ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.

Slides:



Advertisements
Similar presentations
Techniques for Combinational Logic Optimization
Advertisements

ECE C03 Lecture 31 Lecture 3 Two-Level Logic Minimization Algorithms Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE 301 – Digital Electronics Karnaugh Maps (Lecture #7) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design,
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering.
بهينه سازي با نقشة کارنو
Chapter 3 Simplification of Switching Functions
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
Gate Logic: Two Level Canonical Forms
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.
Canonical Forms and Logic Miniminization
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
Week 3- slide 1 EE 231 Digital Electronics Fall 01 Gate Logic: Two-Level Simplification K-Map Method Examples F = A asserted, unchanged B varies G = B’,
Simplifying Boolean Expressions Using K-Map Method
Chapter 2: Boolean Algebra and Logic Functions
Chapter #2: Two-Level Combinational Logic
1 Why study Boolean Algebra? 4 It is highly desirable to find the simplest circuit implementation (logic) with the smallest number of gates or wires. We.
Lecture 4 Logic gates and truth tables Implementing logic functions
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
9/16/04UCB EECS150 D. Culler Fa04 1 EECS Components and Design Techniques for Digital Systems Lec 06 – Minimizing Boolean Logic 9/16-04 David Culler.
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Combinational Logic 1.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
Chapter 3: Digital Logic Dr Mohamed Menacer Taibah University
Combinational Logic Part 2: Karnaugh maps (quick).
2-1 Introduction Gate Logic: Two-Level Simplification Design Example: Two Bit Comparator Block Diagram and Truth Table A 4-Variable K-map for each of the.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
LOGIC GATES & BOOLEAN ALGEBRA
Unit 1 Minimization Techniques and Logic Gates. Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
Logic Functions: XOR, XNOR
Test Slide SAT MCAT GRE. CSE 370 Spring 2006 Introduction to Digital Design Lecture 5: Canonical Forms Last Lecture Logic Gates Different Implementations.
ENG241 Digital Design Week #2 Combinational Logic Circuits.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
 Seattle Pacific University EE Logic System DesignKMaps-1 Two-Level Simplification All Boolean expressions can be represented in two- level forms.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
Lecture # 5 University of Tehran
Karnaugh Maps (K maps).
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Chapter 2: Boolean Algebra and Logic Functions
ECE 2110: Introduction to Digital Systems
CS 105 Digital Logic Design
ECE 3110: Introduction to Digital Systems
ECE 331 – Digital System Design
Boolean Algebra Why study Boolean Algebra?
CSE 311 Foundations of Computing I
Boolean Algebra.
BASIC & COMBINATIONAL LOGIC CIRCUIT
CSE 370 – Winter Combinational Logic - 1
Lecture 6 Logistics Last lecture Today’s lecture HW2 due on Wednesday
CSE 370 – Winter 2002 – Logic minimization - 1
Lecture 6 Logistics Last lecture Today’s lecture
Lecture 6 Karnaugh maps (K-maps) K-maps with “don’t cares”
Chapter 2 Introduction to Logic Circuits
Spring Combinational Logic - 1
Chapter #2: Two-Level Combinational Logic
Lecture 5 Converting to use NAND and NOR
Lecture 6 Logistics Last lecture Today’s lecture HW2 due on Wednesday
CSE 370 – Winter Number syst.; Logic functions- 1
Presentation transcript:

ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002

ECE C03 Lecture 22 Outline Boolean algebra review Two-level minimization Karnaugh maps READING: Katz 1.3, 1.4, 2.1, 2.2, 2.3, Dewey 1.3, 1.4, 4.2, 4.3, 4.4

ECE C03 Lecture 23 Boolean Algebra Algebraic structure consisting of: set of elements B binary operations {+, } unary operation {'} such that the following axioms hold: 1. B contains at least two elements, a, b, such that a b 2. Closure a,b in B, (i) a + b in B (ii) a b in B 3. Commutative Laws: a,b in B, (i) a + b = b + a (ii) a b = b a 4. Identities: 0, 1 in B (i) a + 0 = a (ii) a 1 = a 5. Distributive Laws: (i) a + (b c) = (a + b) (a + c) (ii) a (b + c) = a b + a c 6. Complement: (i) a + a' = 1 (ii) a a' = 0

ECE C03 Lecture 24 Boolean Functions B = {0,1}, + = OR, = AND, ' = NOT is a Boolean Algebra must verify that the axioms hold: E.g., Commutative Law: = 1 + 0? 1 = = 1 0? 0 = 0 Theorem: any Boolean function that can be expressed as a truth table can be written as an expression in Boolean Algebra using ', +, Review from Chapter 1 NOT AND

ECE C03 Lecture 25 Logic Functions: Expressions to Gates More than one way to map an expression to gates E.g., Z = A' B' (C + D) = (A' (B' (C + D))) T1 T2 Literal: each appearance of a variable or its complement in an expression E.g., Z = A B' C + A' B + A' B C' + B' C use of 3-input gate 3 variables, 10 literals

ECE C03 Lecture 26 Logic Functions: NAND and NOR NAND, NOR gates far outnumber AND, OR in typical designs easier to construct in the underlying transistor technologies Any Boolean expression can be implemented by NAND, NOR, NOT gates In fact, NOT is superfluous (NOT = NAND or NOR with both inputs tied together) X01X01 Y01Y01 X NOR Y 1 0 X01X01 Y01Y01 X NAND Y 1 0

ECE C03 Lecture 27 Simplifying Logic Functions Logic Minimization: reduce complexity of the gate level implementation reduce number of literals (gate inputs) reduce number of gates reduce number of levels of gates fewer inputs implies faster gates in some technologies fan-ins (number of gate inputs) are limited in some technologies fewer levels of gates implies reduced signal propagation delays minimum delay configuration typically requires more gates number of gates (or gate packages) influences manufacturing costs Traditional methods: reduce delay at expense of adding gates New methods: trade off between increased circuit delay and reduced gate count Traditional methods: reduce delay at expense of adding gates New methods: trade off between increased circuit delay and reduced gate count

ECE C03 Lecture 28 Alternative Logic Implementations Two-Level Realization (inverters don't count) Multi-Level Realization Advantage: Reduced Gate Fan-ins Complex Gate: XOR Advantage: Fewest Gates TTL Package Counts: Z1 - three packages (1x 6-inverters, 1x 3-input AND, 1x 3-input OR) Z2 - three packages (1x 6-inverters, 1x 2-input AND, 1x 2-input OR) Z3 - two packages (1x 2-input AND, 1x 2-input XOR)

ECE C03 Lecture 29 Laws of Boolean Algebra Duality: a dual of a Boolean expression is derived by replacing AND operations by ORs, OR operations by ANDs, constant 0s by 1s, and 1s by 0s (literals are left unchanged). Any statement that is true for an expression is also true for its dual! Useful Laws/Theorems of Boolean Algebra: Operations with 0 and 1: Idempotent Law: Involution Law: Laws of Complementarity: Commutative Law: 1. X + 0 = X 2. X + 1 = 1 1D. X 1 = X 2D. X 0 = 0 3. X + X = X3D. X X = X 4. (X')' = X 5. X + X' = 15D. X X' = 0 6. X + Y = Y + X 6D. X Y = Y X

ECE C03 Lecture 210 Laws of Boolean Algebra Distributive Laws: Simplification Theorems: DeMorgan's Law: Duality: Theorems for Multiplying and Factoring: Consensus Theorem: 8. X (Y+ Z) = (X Y) + (X Z) 8D. X + (Y Z) = (X + Y) (X + Z) 9. X Y + X Y' = X 10. X + X Y = X 11. (X + Y') Y = X Y 9D. (X + Y) (X + Y') = X 10D. X (X + Y) = X 11D. (X Y') + Y = X + Y 12. (X + Y + Z +...)' = X' Y' Z' {F(X1,X2,...,Xn,0,1,+,)}' = {F(X1',X2',...,Xn',1,0,,+)} 12D. (X Y Z...) ' = X' + Y' + Z' (X + Y + Z +...) = X Y Z {F(X1,X2,...,Xn,0,1,+,)} = {F(X1,X2,...,Xn,1,0,,+)} D D 14D. (X FY Z...) = X + Y + Z +... D 16. (X + Y) (X' + Z) = X Z + X' Y16D. X Y + X' Z = (X + Z) (X' + Y) 17D. (X + Y) (Y + Z) (X' + Z) = (X + Y) (X' + Z) Associative Laws: 7. (X + Y) + Z = X + (Y + Z) = X + Y + Z 7D. (X Y) Z = X (Y Z) = X Y Z

ECE C03 Lecture 211 Proving Theorems via Boolean Algebra Proving theorems via axioms of Boolean Algebra: E.g., prove the theorem: X Y + X Y' = X X Y + X Y' = X (Y + Y') X (Y + Y') = X (1) X (1) = X distributive law (8) complementary law (5) identity (1D) E.g., prove the theorem: X + X Y = X X + X Y = X 1 + X Y X 1 + X Y = X (1 + Y) X (1 + Y) = X (1) X (1) = X identity (1D) distributive law (8) identity (2) identity (1)

ECE C03 Lecture 212 Two Level Logic: Canonical Forms Sum of Products Shorthand Notation for Minterms of 3 Variables product term / minterm: ANDed product of literals in which each variable appears exactly once, in true or complemented form (but not both!) F in canonical form: F(A,B,C) =  m(3,4,5,6,7) = m3 + m4 + m5 + m6 + m7 = A' B C + A B' C' + A B' C + A B C' + A B C canonical form/minimal form F = A B' (C + C') + A' B C + A B (C' + C) = A B' + A' B C + A B = A (B' + B) + A' B C = A + A' B C = A + B C 2-Level AND/OR Realization F = (A + B C)' = A' (B' + C') = A' B' + A' C'

ECE C03 Lecture 213 Product of Sums Maxterm Shorthand Notation for a Function of Three Variables Maxterm: ORed sum of literals in which each variable appears exactly once in either true or complemented form, but not both! Maxterm form: Find truth table rows where F is 0 0 in input column implies true literal 1 in input column implies complemented literal F(A,B,C) =  M(0,1,2) = (A + B + C) (A + B + C') (A + B' + C) F’(A,B,C) =  M(3,4,5,6,7) = (A + B' + C') (A' + B + C) (A' + B + C') (A' + B' + C) (A' + B' + C')

ECE C03 Lecture 214 Two Level Simplification Key Tool: The Uniting Theorem — A (B' + B) = A F = A B' + A B = A (B' + B) = A A's values don't change within the on-set rows B's values change within the on-set rows G = A' B' + A B' = (A' + A) B' = B' B's values stay the same within the on-set rows A's values change within the on-set rows B is eliminated, A remains A is eliminated, B remains Essence of Simplification: find two element subsets of the ON-set where only one variable changes its value. This single varying variable can be eliminated!

ECE C03 Lecture 215 Visualizing Boolean Cubes Just another way to represent the truth table n input variables = n dimensional "cube"

ECE C03 Lecture 216 Two Level Simplication Three variable example: Full Adder Carry Out (A' + A) B Cin A B (Cin' + Cin) A (B + B') Cin Cout = B Cin + A B + A Cin The ON-set is covered by the OR of the subcubes of lower dimensionality

ECE C03 Lecture 217 Karnaugh Map Method hard to draw cubes of more than 4 dimensions K-map is an alternative method of representing the truth table that helps visualize adjacencies in up to 6 dimensions Beyond that, computer-based methods are needed 2-variable K-map 3-variable K-map 4-variable K-map Numbering Scheme: 00, 01, 11, 10 Gray Code — only a single bit changes from code word to next code word

ECE C03 Lecture 218 Karnaugh Map Method Adjacencies in the K-Map Wrap from first to last column Top row to bottom row

ECE C03 Lecture 219 Karnaugh Map Examples F = A A asserted, unchanged B varies G = B' B complemented, unchanged A varies Cout = A B + B Cin + A Cin F(A,B,C) = A

ECE C03 Lecture 220 More Karnaugh Map Examples F(A,B,C) =  m(0,4,5,7) F = B' C' + A C In the K-map, adjacency wraps from left to right and from top to bottom F'(A,B,C) =  m(1,2,3,6) F' = B C' + A' C Compare with the method of using DeMorgan's Theorem and Boolean Algebra to reduce the complement! F' simply replace 1's with 0's and vice versa

ECE C03 Lecture 221 Karnaugh Map Examples (4 variables) F(A,B,C,D) =  m(0,2,3,5,6,7,8,10,11,14,15) F = C + A' B D + B' D' K-map Corner Adjacency Illustrated in the 4-Cube Find the smallest number of the largest possible subcubes that cover the ON-set

ECE C03 Lecture 222 Karnaugh Maps: Circling zeros F = (B + C + D) (A + C + D) (B + C + D) F = B C D + A C D + B C D F = (B + C + D) (A + C + D) (B + C + D) Replace F by F, 0’s become 1’s and vice versa

ECE C03 Lecture 223 Karnaugh Map Don’t Cares F(A,B,C,D) =  m(1,3,5,7,9) +  d(6,12,13) F = A'D + B' C' D w/o don't cares F = C' D + A' D w/ don't cares Don't Cares can be treated as 1's or 0's if it is advantageous to do so By treating this DC as a "1", a 2-cube can be formed rather than one 0-cube In PoS form: F = D (A' + C') Same answer as above, but fewer literals

ECE C03 Lecture 224 Algorithm: Minimum SOP from K-Map Step 1: Choose an element of ON-set not already covered by an implicant Step 2:Find "maximal" groupings of 1's and X's adjacent to that element. Remember to consider top/bottom row, left/right column, and corner adjacencies. This forms prime implicants (always a power of 2 number of elements). Repeat Steps 1 and 2 to find all prime implicants Step 3: Revisit the 1's elements in the K-map. If covered by single prime implicant, it is essential, and participates in final cover. The 1's it covers do not need to be revisited Step 4:If there remain 1's not covered by essential prime implicants, then select the smallest number of prime implicants that cover the remaining 1's

ECE C03 Lecture 225 Gate Logic: Two Level Simplification Example: ƒ(A,B,C,D) = m(4,5,6,8,9,10,13) + d(0,7,15) Initial K-map Primes around A' B C' D' Primes around A B C' D

ECE C03 Lecture 226 Gate Logic: Two-Level Simplification Example Continued Primes around A B' C' D' Primes around A B C' D Essential Primes with Min Cover

ECE C03 Lecture 227 Gate Logic: Two-Level Simplification 5-Variable K-maps ƒ(A,B,C,D,E) =  m(2,5,7,8,10, 13,15,17,19,21,23,24,29 31) = C E + A B' E + B C' D' E' + A' C' D E'

ECE C03 Lecture 228 Gate Logic: Two Level Simplification 6- Variable K-Maps ƒ(A,B,C,D,E,F) =  m(2,8,10,18,24, 26,34,37,42,45,50, 53,58,61) = D' E F' + A D E' F + A' C D' F'

ECE C03 Lecture 229 Summary Representations of digital design Boolean algebra review Two-level minimization Karnaugh maps NEXT LECTURE: Two-level Logic Minimization Algorithms READING: Katz 2.4.1, 2.4.2, Dewey 4.5