Optimizations and Tradeoffs. Combinational Logic Optimization

Similar documents
UNIT 5 KARNAUGH MAPS Spring 2011

ELC224C. Karnaugh Maps

This form sometimes used in logic circuit, example:

Karnaugh Maps Objectives

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

Unit 2 Session - 6 Combinational Logic Circuits

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

CHAPTER 5 KARNAUGH MAPS

Advanced Digital Design with the Verilog HDL, Second Edition Michael D. Ciletti Prentice Hall, Pearson Education, 2011

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

Digital Logic Design. Combinational Logic

Simplification of Boolean Functions. Dept. of CSE, IEM, Kolkata

Chap 2. Combinational Logic Circuits

Lecture 7: Karnaugh Map, Don t Cares

211: Computer Architecture Summer 2016

Chapter 4 Optimized Implementation of Logic Functions

Chapter 2 Combinational Logic Circuits

Digital Circuit And Logic Design I. Lecture 4

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

Computer Organization I. Lecture 13: Design of Combinational Logic Circuits

DIGITAL ELECTRONICS & it0203 Semester 3

Karnaugh Map & Boolean Expression Simplification

CHAPTER III BOOLEAN ALGEBRA

COM111 Introduction to Computer Engineering (Fall ) NOTES 6 -- page 1 of 12

Karnaugh Maps ف ر آ ا د : ا ا ب ا م آ ه ا ن ر ا

CHAPTER III BOOLEAN ALGEBRA

Gate-Level Minimization

The Karnaugh Map COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Simplifying Logic Circuits with Karnaugh Maps

CSE 140: Components and Design Techniques for Digital Systems

Logical Design of Digital Systems

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Review. EECS Components and Design Techniques for Digital Systems. Lec 06 Minimizing Boolean Logic 9/ Review: Canonical Forms

Introduction to Digital Logic Missouri S&T University CPE 2210 Karnaugh Maps

L4: Karnaugh diagrams, two-, and multi-level minimization. Elena Dubrova KTH / ICT / ES

Midterm1 Review. Jan 24 Armita

Combinatorial Logic Design Principles

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

1. Expand each of the following functions into a canonical sum-of-products expression.

Contents. Chapter 3 Combinational Circuits Page 1 of 36

ENG2410 Digital Design Combinational Logic Circuits

Lecture 4: Four Input K-Maps

Chapter 2 Boolean Algebra and Logic Gates

Introduction to Karnaugh Maps

14:332:231 DIGITAL LOGIC DESIGN

Week-I. Combinational Logic & Circuits

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

MC9211 Computer Organization

Standard Expression Forms

Chapter 7 Logic Circuits

CPE100: Digital Logic Design I

Number System conversions

Signals and Systems Digital Logic System

Boolean Algebra and Logic Design (Class 2.2 1/24/2013) CSE 2441 Introduction to Digital Logic Spring 2013 Instructor Bill Carroll, Professor of CSE

Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

Chapter 2 Combinational Logic Circuits

Minimization techniques

CSE 140 Midterm I - Solution

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

Chapter 2 Combinational Logic Circuits

Combinational Logic Fundamentals

Karnaugh Maps (K-Maps)

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

Unit 6. Quine-McClusky Method. Unit 6 1

Chapter 2 Combinational Logic Circuits

WEEK 3.1 MORE ON KARNAUGH MAPS

9.1. Unit 9. Implementing Combinational Functions with Karnaugh Maps or Memories

CHAPTER 3 BOOLEAN ALGEBRA

BOOLEAN ALGEBRA CLASS XII. Presented By : Dinesh Patel PGT CS KV IIT Powai

MODULAR CIRCUITS CHAPTER 7

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Review for Test 1 : Ch1 5

EXPERIMENT #4: SIMPLIFICATION OF BOOLEAN FUNCTIONS

Spiral 1 / Unit 5. Karnaugh Maps

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

Logic Design I (17.341) Fall Lecture Outline

14:332:231 DIGITAL LOGIC DESIGN. Combinational Circuit Synthesis

Digital Logic Design ENEE x. Lecture 12

Solutions to Assignment No 5 Digital Techniques Fall 2007

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

for Digital Systems Simplification of logic functions Tajana Simunic Rosing Sources: TSR, Katz, Boriello & Vahid

Binary logic consists of binary variables and logical operations. The variables are

Logic Simplification. Boolean Simplification Example. Applying Boolean Identities F = A B C + A B C + A BC + ABC. Karnaugh Maps 2/10/2009 COMP370 1

Logic Design Combinational Circuits. Digital Computer Design

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

CHAPTER 7. Solutions for Exercises

Working with Combinational Logic. Design example: 2x2-bit multiplier

CPE100: Digital Logic Design I

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Slides for Lecture 16

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

CS/EE 181a 2010/11 Lecture 4

Chapter 3. Boolean Algebra. (continued)

Boolean Algebra and Logic Simplification

3. PRINCIPLES OF COMBINATIONAL LOGIC

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

T02 Tutorial Slides for Week 6

Transcription:

Optimizations and Tradeoffs Combinational Logic Optimization

Optimization & Tradeoffs Up to this point, we haven t really considered how to optimize our designs. Optimization is the process of transforming our design to improve criteria of interest without negatively effecting other criteria. Common Optimization Criteria: Performance Size Power Consumption Tradeoffs are transformations that improve one or more criteria of interest at the expense of another i.e. lower power circuits must generally operate at lower frequencies.

Two-level Optimization A boolean function can be implemented in only two levels using SOP or POS forms. Results in minimal delays Two-level logic size optimization is a process that minimizes the number of transistors in a twolevel logic circuit This is the same as minimizing the numbers of literals and terms in a POS or Sop equation. Two methods to accomplish this: 1. Boolean Algebra Manipulation of the SOP 2. Karnaugh Maps

Karnaugh Maps (K-maps) A visual method of algebraically minimizing SOP or POS functions. Basic Approach: Plot the truth table outputs in a grid against the inputs 2 N cells in the grid, one for each possible input combination The value of only one literal may change across rows or columns This is a gray code Circle 1 s in groups of 2 N Allows the use of the formula X X = 1 to simplify and eliminate variables.

Two-variable K-maps Example: Z = A B AB 1. Construct the grid. N = 2 2x2 grid Each axis is for one literal A or B Populate each axis with changing bit values Only one bit can change at a time. A B 0 1 0 1

Two-variable K-maps Example: Z = A B AB 2. Fill it in with values from the truth table. A B Z 0 0 0 m0 0 1 1 m1 1 0 0 m2 1 1 1 m3 A B 0 1 0 m0 m2 1 m1 m3 A B 0 1 0 0 0 1 1 1

Two-variable K-maps Example: Z = A B AB 3. Circle 1 s in groups of 2 N N is a positive integer A B 0 1 0 0 0 1 1 1 4. Apply X X = 1 to the circled 1 s. Note that two 1 s cover A and A, so we can discard it. Z = B

Three variable K-map Now we will add a second literal on the upper axis. Example: Optimize the given logic expression: A B C Q 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1

Three variable K-map A B C Q 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 C B AB 00 01 11 10 0 0 1 0 0 1 0 1 1 1 A Q = A B BC AC

K-map Terminology Before formalizing the process for optimally using K-maps to simplify output expressions, we need to define a few terms: Implicant Product Term that covers more than one minterm The previous example has 4 minterms A BC, AB C, ABC, ABC The K-map shows 3 implicants A B, BC and AC Prime Implicant An implicant that is not completely covered by other implicants. All 3 implicants above are prime implicants. Distinguished 1-cell An input combination that is only covered by one prime implicant. A BC and AB C are distinguished 1 cells Essential Prime Implicant A prime implicant that covers one or more distinguished 1-cells. A B and AC both contain distinguished 1-cells.

Optimal K-map Process 1. Identify and select all essential prime implicants. 2. Select the minimal number of remaining prime implicants to complete the cover of minterms.

Three variable K-map Revisited A B C Q 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 C B AB 00 01 11 10 0 0 1 0 0 1 0 1 1 1 A Q = A B BC AC Applying these rules Q = A B AC

SOP vs. POS So far we have focused on the SOP form, but all of these procedures apply to the POS form as well SOP - Minterms Implicant Prime Implicant Essential Prime Implicant POS - Maxterms Implicate Prime Implicate Essential Prime Implicate

POS Three variable K-map A B C Q 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 B AB C 00 01 11 10 0 0 1 0 0 1 0 1 1 1 A Maxterms: ABC, ABC, A BC, A B C Implicates: BC, A C, AB Prime Implicates: BC, A C, AB Essential Prime Implicates: AB, A C Q = (AB) (A C)

Four Variable K-maps Now we will add a second literal on the side axis. Example: Optimize the given logic expression: F(A,B,C,D) = sum(m0, m4, m5, m7, m8, m10, m14, m15)

Four Variable K-maps A B C D F 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 AB CD 00 01 11 10 00 1 1 0 1 01 0 1 0 0 11 0 1 1 0 10 0 0 1 1 Prime Implicants: A'C'D, B'C'D, BCD, ACD' (row) A'BC', A'BD, ABC, AB'D' (col) No Essential Prime Implicants! Start with one prime and completely cover

Four Variable K-maps AB CD 00 01 11 10 00 1 1 1 01 1 11 1 1 10 1 1 AB CD 00 01 11 10 00 1 1 0 1 01 0 1 0 0 11 0 1 1 0 10 0 0 1 1 F(A,B,C,D) = A'C'D' A'BD ABC AB'D' F(A,B,C,D) = B'C'D' A'BC' BCD ACD' Both of these are equally optimal solutions!

Another 4-Variable Example Determine the following: Prime Implicants: AB CD 00 01 11 10 00 1 1 1 1 Essential Primes: 01 0 1 1 0 11 0 1 1 0 10 1 0 0 1 Optimal Equation(s):

Don t Cares Occasionally, there are certain input combinations where you don t care what the output values is (0 or 1) This can be used to your advantage by choosing the most useful value!

Don t Care Example F(W,X,Y,Z) = sum(m3, m4, m9, m15) d(m0, m1, m5, m10, m12, m14) Note that if don t cares are ignored, all 4 minterms are essential primes. How can this be improved by using the don t cares? AB CD 00 01 11 10 00 X 1 X 0 01 X X 0 1 11 1 0 1 0 10 0 0 X X F(W,X,Y,Z) = W'X'Z X'Y'Z WXY W'Y'

Automated Optimization K-maps have limited application because it can only handle a limited number of inputs Anything larger than 5 inputs is cumbersome. Computer programs are generally used for larger numbers of inputs. We will consider two methods: Quine-McClusky A tabluar method that is very adaptable to computer programming. Achieves an optimal solution, like K-maps. Computational time and memory resources can limit its usage. Hueristic Method Doesn t create an optimal solution, but close. Used when minimilization problems are too large for other computational methods

Multi-level Optimization Performance vs. Size Two level optimization leads to a design that is optimized in terms of delay, but that is not the only type of optimization possible. By increasing the depth of gates, we create larger delays, but we 覠 д may reduce the number of transistors (size). Example: a b 4 22 transistors 2 gate delays a b 4 4 F2 a c d a c e 6 6 6 F1 c d e 4 4 16 transistors 4 gate-delays F1 = ab acd ace (a) F2 = a(bc(de)) (b)