Chapter 4 Optimized Implementation of Logic Functions

Similar documents
This form sometimes used in logic circuit, example:

14:332:231 DIGITAL LOGIC DESIGN

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

Optimizations and Tradeoffs. Combinational Logic Optimization

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

Motivation. CS/EE 3700 : Fundamentals of Digital System Design

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

Unit 2 Session - 6 Combinational Logic Circuits

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

Simplifying Logic Circuits with Karnaugh Maps

Digital Circuit And Logic Design I. Lecture 4

Boolean Algebra and Logic Simplification

CS 226: Digital Logic Design

UNIT 5 KARNAUGH MAPS Spring 2011

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

211: Computer Architecture Summer 2016

Chapter 2 Combinational Logic Circuits

Logic Design. Chapter 2: Introduction to Logic Circuits

Combinatorial Logic Design Principles

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

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

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

Standard Expression Forms

Karnaugh Maps Objectives

Logic Minimization. Two-Level. University of California. Prof. Srinivas Devadas. Prof. Richard Newton Prof. Sanjit Seshia. Prof.

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

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

DIGITAL ELECTRONICS & it0203 Semester 3

CPE100: Digital Logic Design I

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

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

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

Possible logic functions of two variables

WEEK 3.1 MORE ON KARNAUGH MAPS

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

ELC224C. Karnaugh Maps

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

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Combinational Logic Fundamentals

Combinational Logic Circuits Part II -Theoretical Foundations

Chapter 2 Combinational logic

CHAPTER III BOOLEAN ALGEBRA

Lecture 4: More Boolean Algebra

Logical Design of Digital Systems

Spiral 1 / Unit 5. Karnaugh Maps

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

ENG2410 Digital Design Combinational Logic Circuits

Chapter 7 Logic Circuits

Digital Logic Design. Combinational Logic

EC-121 Digital Logic Design

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

CHAPTER III BOOLEAN ALGEBRA

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

Logic Design Combinational Circuits. Digital Computer Design

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

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

Chap 2. Combinational Logic Circuits

Week-I. Combinational Logic & Circuits

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

Karnaugh Maps (K-Maps)

Chapter 2 Combinational Logic Circuits

Unit 6. Quine-McClusky Method. Unit 6 1

CprE 281: Digital Logic

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

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 2 Circuit Optimization

Digital Logic Design ENEE x. Lecture 12

ENGR 303 Introduction to Logic Design Lecture 3. Dr. Chuck Brown Engineering and Computer Information Science Folsom Lake College

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

Number System conversions

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

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

DIGITAL TECHNICS I. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: LOGIC SYNTHESIS

Chapter 2 : Boolean Algebra and Logic Gates

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Copyright 2007 Elsevier 2-<101>

CMSC 313 Lecture 19 Combinational Logic Components Programmable Logic Arrays Karnaugh Maps

Chapter 2 Combinational Logic Circuits

COSC3330 Computer Architecture Lecture 2. Combinational Logic

Chapter 2 Boolean Algebra and Logic Gates

Logic Synthesis and Verification

Chapter 2 Boolean Algebra and Logic Gates

Minimization techniques

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

CHAPTER 5 KARNAUGH MAPS

ELCT201: DIGITAL LOGIC DESIGN

3. PRINCIPLES OF COMBINATIONAL LOGIC

CHAPTER1: Digital Logic Circuits Combination Circuits

Textbook: Digital Design, 3 rd. Edition M. Morris Mano

L6: Two-level minimization. Reading material

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

Chapter 2: Switching Algebra and Logic Circuits

Fundamentals of Computer Systems

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

Combinational Logic. Review of Combinational Logic 1

Boolean cubes EECS150. Mapping truth tables onto cubes. Simplification. The Uniting Theorem. Three variable example

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions.

Exact and heuristic minimization of Boolean functions

ELEC Digital Logic Circuits Fall 2014 Logic Minimization (Chapter 3)

Chapter 2 Combinational Logic Circuits

Lecture 2 Review on Digital Logic (Part 1)

Transcription:

Chapter 4 Optimized Implementation of Logic Functions Logic Minimization Karnaugh Maps Systematic Approach for Logic Minimization Minimization of Incompletely Specified Functions Tabular Method for Minimization Practical Considerations

Logic Minimization Goal: find the optimum implementation of logic function. The cost criteria for determining the optimum (lowest cost) implementation may be defined by the designer, for example: Hardware cost, measured as total number & size of logic gates Propagation delay (from inputs to outputs) Worst case Average Design time (effort) For example quick product prototypes may be required in initial phases of a project with optimizations applied later Equally optimal but different solutions are possible We consider two-level realizations of logic functions (eg. SOP or POS) Different logic minimization techniques: Algebraic Manipulation Karnaugh Maps (typically for functions of max 5 or 6 variables) Tabular Method Heuristic Techniques, eg. Espresso Chapter 4-2

Karnaugh Maps x f m m m 2 x x 3 f m m m 2 m 3 m 4 m 3 m 5 m 6 (a) Truth table of 3-variable function x x 2 (a) Truth table of 4-variable function m 7 x x 2 x 3 m m 2 m m 2 m 6 m 4 m m 3 m m 3 m 7 m 5 (b) Karnaugh map (b) Karnaugh map Chapter 4-3

Karnaugh Maps x f = + x x 2 (b) SOP minimization of f using K-map (a) The function f (x,, ) = Σ m(, 2, 4, 5, 6). Chapter 4-4

Karnaugh Maps x f = x + (b) SOP minimization of f using K-map (a) The function f (x,, ) = Σ m(, 4, 5, 6). Chapter 4-5

Karnaugh Maps x x x 4 m m 4 m 2 m 8 m m 5 m 3 m 9 x 4 m 3 m 7 m 5 m m 2 m 6 m 4 m Figure 4.6. A four-variable Karnaugh map. Chapter 4-6

Karnaugh Maps x x 4 x x 4 f = + x x 4 x x 4 x x 4 Figure 4.7. Examples of four-variable Karnaugh maps. Chapter 4-7

Karnaugh Maps x x 4 x x 4 x 5 = x 5 = f = x + x x 4 + x x 5 Figure 4.8. A five-variable Karnaugh map. Chapter 4-8

Systematic Approach for Logic Minimization Intuitive strategy: find as few and as large as possible groups of s that cover all cases where the function has a value of. Each group of s represented by a single product term. The larger the group of s, the fewer the number of variables in the corresponding product term. To describe the systematic approach for logic minimization, precisely define terminologies: Literal - Each appearance of a variable in either normal or complemented form. Implicant a product term p is said to be implicant of f iff for all input combination for which p evaluates to f also evaluates to. The most basic implicants of f are its minterms. Prime Implicant an implicant that can not be reduced (by combination) to another one with fewer literals. It is not possible to delete any literal in a prime implicant and still have a valid implicant. Chapter 4-9

Systematic Approach for Logic Minimization Cover A collection of implicants that account for all valuations for which a given function is equal to is called a cover of that function. Cover defines a particular implementation of the function. A number of different covers exist for a logic function. Example: A set of all minters for which f = is a cover. A set of all prime implicants is a cover. Cost the logic minimization criteria. For our purpose, we define the cost of a logic circuit as the number of gates plus the total number of inputs to all gates in the circuit. In general, the larger a circuit, the more important the cost issue becomes. Assumption: the primary input variables are available in both normal and complemented forms at zero cost. This is true, for example, in many PLDs. Chapter 4-

Systematic Approach for Logic Minimization The lowest-cost implementation is achieved when the cover of a given function consists of prime implicants. How to determine the minimum-cost subset of prime implicants that will cover the function? If a prime implicant includes a minterm that is not included in any other prime implicant, such minterm is called distinguished -cell. A prime implicant containing one or more distinguished -cells is called essential prime implicant, and it must be included in the cover Steps of finding minimum-cost circuit:. Generate all prime implicants for the given function f 2. Find the set of essential prime implicants 3. If the set of essential prime implicants covers all valuations for which f =, then this set is the desired cover of f. Otherwise, determine the non-essential prime implicants that should be added to form a complete minimum-cost cover. Chapter 4-

Systematic Approach for Logic Minimization Example: Find the prime implicants, distinguished -cells, essential prime implicants and the minimum SOP representation for each of the following functions x x 4 x x 4 x x 4 x 4 x 4 x x x 4 x x 4 x 4 x x x x 4 Figure 4.. Four-variable function f ( x,, x 4 ) = Σ m(2, 3, 5, 6, 7,,, 3, 4). Figure 4.. The function f ( x,, x 4 ) = Σ m(, 4, 8,,, 2, 3, 5). Chapter 4-2

Systematic Approach for Logic Minimization Sometimes there may not be any essential prime implicants at all. Alternative solutions of equal weight possible. x x 4 x x 4 x 4 x x 4 x 4 x x 4 x x 4 x x Figure 4.2. The function f ( x,, x 4 ) = Σ m(, 2, 4, 5,,, 3, 5). Chapter 4-3

Systematic Approach for Logic Minimization Minimization of POS. Consider the maxterms for which f = and combine them into sum terms that are of the largest groups possible. Then form the product of the minimum-cost cover of the sum terms. Alternatively, find the minimum-cost SOP of the complement of f, and then apply DeMorgan s theorem to the expression to obtain the minimum-cost POS realization of f. x ( x + ) x x 4 ( + x 4 ) ( + ) ( x + ) Figure 4.3. POS minimization of f (x,, ) = Π M(4, 5, 6). ( x + + + x 4 ) Figure 4.4. POS minimization of f ( x,, x 4 ) = Π M(,, 4, 8, 9, 2, 5). Chapter 4-4

Minimization of Incompletely Specified Functions A function that has don t care conditions is said to be incompletely specified. This happens, for example, if certain input conditions can never occur. Don t cares can be used to advantage in the design of logic circuits. Example: Find the simplest SOP and POS for the following function. x x 4 d d x x 4 d d ( + ) d d ( + x 4 ) d x 4 d (a) SOP implementation (b) POS implementation Figure 4.5. Two implementations of the function f ( x,, x 4 ) = Σ m(2, 4, 5, 6, ) + D(2, 3, 4, 5). Chapter 4-5

Tabular Method for Minimization The technique described here is called Quine-McClusky methd. We will use cube representation for the prime implicants. This method involves two major tasks: ) Generation of all prime implicants of the logic function 2) Determination of a minimum-cost cover from all the prime implicants The steps are detailed below:. Generate all the prime implicants by successive pairwise comparison of the cubes 2. Derive a cover table which indicates the minterms of f covered by each prime implicant 3. Include the essential prime implicants (if any) in the final cover and reduce the table by removing both these prime implicants and the covered minterms 4. Use the concept of row and column dominance to reduce the cover table further. A dominated row is removed only if the cost of its prime implicant is greater than or equal to the cost of the dominating row s prime implicant. 5. Repeat steps 3 and 4 until the cover table is either empty or no further reduction is possible 6. If the reduced cover table is not empty, then use the branching approach to determine the remaining prime implicants that should be included in a minimum-cost cover Chapter 4-6

Tabular Method for Minimization Example: Determine all the prime implicants of the function defined by f (x,, x 4 ) = Σm(, 4, 8,,, 2, 3, 5) Next find a minimum-cost cover for f. Chapter 4-7

Final minimal cover of f is given by: C = Thus, the minimum-cost SOP for f is: f = Chapter 4-8

Tabular Method for Minimization The tabular method can also be used for minimization of functions with don t care conditions. Example: f (x,, x 4 ) = Σm(, 2, 5, 6, 7, 8, 9, 3) + D(, 2, 5) Chapter 4-9

Final minimal cover of f is given by: C = Thus, the minimum-cost SOP for f is: f = Chapter 4-2

Tabular Method for Minimization In the following example, there are no essential prime implicants and no dominant rows or colums. Moreover, all prime implicants have the same cost. In this case the concept of branching is used. f (x,, x 4 ) = Σm(, 3,, 5) + D(, 2, 7, 8,, 4) Chapter 4-2

Practical Considerations The Tabular method is relatively easy to understand but has some drawbacks if considered for CAD implementation. The main difficulty is that the number of cubes that must be considered in the process can be extremely large as it first tries to obtain all the prime implicants of the function. Heuristic techniques that produce good results in reasonable time are preferred specially for functions of large number of variables. The Espresso algorithm from UC Berkley is one such example. CAD tools provide logic synthesis software that can be used to target various types of chips, such as PLDs, gate arrays, standard cells, and custom chips. The process in logic design & implementation by such tools include: Technology-independent logic synthesis Technology mapping Chapter 4-22