Gate-Level Minimization

Similar documents
Gate-Level Minimization

Gate-Level Minimization

Gate Level Minimization Map Method

Chapter 3. Gate-Level Minimization. Outlines

Gate Level Minimization

2.1 Binary Logic and Gates

Digital Logic Design. Outline

Chapter 2 Combinational Logic Circuits

ELCT201: DIGITAL LOGIC DESIGN

Verilog for Combinational Circuits

ELCT201: DIGITAL LOGIC DESIGN

Simplification of Boolean Functions

Gate-Level Minimization

A B AB CD Objectives:

Combinational Logic Circuits

Chapter 2 Combinational

數位系統 Digital Systems 朝陽科技大學資工系. Speaker: Fuw-Yi Yang 楊伏夷. 伏夷非征番, 道德經察政章 (Chapter 58) 伏者潛藏也道紀章 (Chapter 14) 道無形象, 視之不可見者曰夷

Chapter 2. Boolean Expressions:

Unit-IV Boolean Algebra

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

Simplification of Boolean Functions


Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

2008 The McGraw-Hill Companies, Inc. All rights reserved.

UNIT-4 BOOLEAN LOGIC. NOT Operator Operates on single variable. It gives the complement value of variable.

ENGINEERS ACADEMY. 7. Given Boolean theorem. (a) A B A C B C A B A C. (b) AB AC BC AB BC. (c) AB AC BC A B A C B C.

Chapter 2 Combinational Logic Circuits

Experiment 3: Logic Simplification

X Y Z F=X+Y+Z

Digital Logic Lecture 7 Gate Level Minimization

CS8803: Advanced Digital Design for Embedded Hardware

Experiment 4 Boolean Functions Implementation

IT 201 Digital System Design Module II Notes

CSCI 220: Computer Architecture I Instructor: Pranava K. Jha. Simplification of Boolean Functions using a Karnaugh Map

Boolean Algebra and Logic Gates

SWITCHING THEORY AND LOGIC CIRCUITS

Combinational Logic Circuits

DKT 122/3 DIGITAL SYSTEM 1

QUESTION BANK FOR TEST


Code No: R Set No. 1

Chapter 3 Simplification of Boolean functions

Literal Cost F = BD + A B C + A C D F = BD + A B C + A BD + AB C F = (A + B)(A + D)(B + C + D )( B + C + D) L = 10

Combinational Logic & Circuits

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey

UNIT II. Circuit minimization

Specifying logic functions

1. Mark the correct statement(s)

Chapter 2 Boolean algebra and Logic Gates

Code No: 07A3EC03 Set No. 1

Gate-Level Minimization. section instructor: Ufuk Çelikcan

Presented By :- Alok Kumar Lecturer in ECE C.R.Polytechnic, Rohtak

R.M.D. ENGINEERING COLLEGE R.S.M. Nagar, Kavaraipettai

Lecture 5. Chapter 2: Sections 4-7

Code No: R Set No. 1

Summary. Boolean Addition

Standard Forms of Expression. Minterms and Maxterms

Combinational Circuits Digital Logic (Materials taken primarily from:

Code No: R Set No. 1

Lecture (05) Boolean Algebra and Logic Gates

Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map

CMPE223/CMSE222 Digital Logic

Chapter 2: Combinational Systems

S1 Teknik Telekomunikasi Fakultas Teknik Elektro FEH2H3 2016/2017

Boolean Algebra. BME208 Logic Circuits Yalçın İŞLER

Ch. 5 : Boolean Algebra &

Philadelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh.

Computer Science. Unit-4: Introduction to Boolean Algebra

2.6 BOOLEAN FUNCTIONS

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Switching Circuits & Logic Design

MUX using Tri-State Buffers. Chapter 2 - Part 2 1

CENG 241 Digital Design 1

Combinational Logic Circuits

Lecture 4: Implementation AND, OR, NOT Gates and Complement

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Menu. Algebraic Simplification - Boolean Algebra EEL3701 EEL3701. MSOP, MPOS, Simplification

Review: Standard forms of expressions

Digital Design. Chapter 4. Principles Of. Simplification of Boolean Functions

Combinational Logic Circuits Part III -Theoretical Foundations

ECE380 Digital Logic

Karnaugh Map (K-Map) Karnaugh Map. Karnaugh Map Examples. Ch. 2.4 Ch. 2.5 Simplification using K-map

Digital Logic Design (CEN-120) (3+1)

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

Incompletely Specified Functions with Don t Cares 2-Level Transformation Review Boolean Cube Karnaugh-Map Representation and Methods Examples

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

BOOLEAN ALGEBRA. Logic circuit: 1. From logic circuit to Boolean expression. Derive the Boolean expression for the following circuits.

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE

Chapter 2. Boolean Algebra and Logic Gates

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

Chapter 6. Logic Design Optimization Chapter 6

Module -7. Karnaugh Maps

Computer Engineering Chapter 3 Boolean Algebra

Contents. Chapter 3 Combinational Circuits Page 1 of 34

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 352 Digital System Fundamentals.

Variable, Complement, and Literal are terms used in Boolean Algebra.

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Digital Logic. Copyright By NODIA & COMPANY

Dr. S. Shirani COE2DI4 Midterm Test #1 Oct. 14, 2010

Combinational Logic. Prof. Wangrok Oh. Dept. of Information Communications Eng. Chungnam National University. Prof. Wangrok Oh(CNU) 1 / 93

GATE Exercises on Boolean Logic

Transcription:

Gate-Level Minimization ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2017 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/

Outlines The Map Method Four-Variable Map Five-Variable Map Product-of-Sums Simplification Don t-care Conditions NAND and NOR Implementation Other Two-Level Implementations Exclusive-OR Function HDL Description DCD-03-2

The Map Method Boolean function sum of minterms sum of products (or product of sum) in the simplest form a minimum number of terms a minimum number of literals The simplified expression may not be unique Gate-level minimization refers to the design task of finding an optimal gate-level implementation of Boolean functions describing a digital circuit. Logic minimization algebraic approach: lack specific rules Karnaugh map approach a simple straight forward procedure a pictorial form of a truth table applicable if the # of variables < 7 A diagram made up of squares each square represents one minterm DCD-03-3

Two-Variable Map A two-variable map four minterms x' = row 0; x = row 1 y' = column 0; y = column 1 a truth table in square diagram DCD-03-4

Eight minterms Gray code sequence Three-Variable Map Any two adjacent squares in the map differ by only one variable e.g., m 5 and m 7 can be simplified m 5 + m 7 = xy'z + xyz = xz (y'+y) = xz yz DCD-03-5

Example 3.1 F(x,y,z) = S(2,3,4,5) = x'y + xy' DCD-03-6

Three-Variable Map m 0 and m 2 (m 4 and m 6 ) are adjacent m 0 + m 2 = x'y'z' + x'yz' = x'z' (y'+y) = x'z' m 4 + m 6 = xy'z' + xyz' = xz' (y'+y) = xz' yz DCD-03-7

Example 3.2 F(x,y,z) = S(3,4,6,7) = yz+ xz' DCD-03-8

Four adjacent squares 2, 4, 8 and 16 squares Three-Variable Map m 0 +m 2 +m 4 +m 6 = x'y'z'+x'yz'+xy'z'+xyz' = x'z'(y'+y) +xz'(y'+y) = x'z' + xz = z' m 1 +m 3 +m 5 +m 7 = x'y'z+x'yz+xy'z+xyz =x'z(y'+y) + xz(y'+y) =x'z + xz = z yz DCD-03-9

Example 3.3 F(x,y,z) = S(0,2,4,5,6)= z'+ xy' DCD-03-10

Example 3.4 Given F = A'C + A'B + AB'C + BC Express it in sum of minterms => S(1,2,3,5,7) Find the minimal sum of products expression => F=C+A B DCD-03-11

The map Four-Variable Map 16 minterms combinations of 2, 4, 8, and 16 adjacent squares DCD-03-12

Example 3.5 Simplify the Boolean Function: F(w,x,y,z) = S(0,1,2,4,5,6,8,9,12,13,14)=y'+w'z'+xz' DCD-03-13

Example 3.6 Simplify the Boolean Function: Given F = A B C + B CD + A BCD + AB C => F = B D + B C + A CD DCD-03-14

Systematic Simplification Implicant a product term of which if the function has the value 1 for all minterms. A Prime Implicant is a product term obtained by combining the maximum possible number of adjacent squares in the map into a rectangle with the number of squares a power of 2 remove any literal not a implicant. A prime implicant is called an Essential Prime Implicant if it is the only prime implicant that covers (includes) one or more minterms. Prime Implicants and Essential Prime Implicants can be determined by inspection of a K-Map. A set of prime implicants "covers all minterms" if, for each minterm of the function, at least one prime implicant in the set of prime implicants includes the minterm. Source: M. Morris Mano and Charles R. Kime, Logic and Computer Design Fundamentals. DCD-03-15

Example of Prime Implicants Find ALL Prime Implicants BD CD C 1 1 1 ESSENTIAL Prime Implicants C BD 1 1 1 BD A AB 1 1 B 1 1 1 1 1 1 D AD BC BD A Minterms covered by single prime implicant 1 1 B 1 1 1 1 1 1 D Source: M. Morris Mano and Charles R. Kime, Logic and Computer Design Fundamentals. DCD-03-16

Example of Prime Implicants Find all prime implicants for: F(A, B,C, D) = Sm (0,2,3,8,9,10,11,12,13,14,15) BD 1 C 1 BC 1 A 1 1 A 1 1 1 1 1 1 D Source: M. Morris Mano and Charles R. Kime, Logic and Computer Design Fundamentals. B DCD-03-17

Example of Prime Implicants Find all prime implicants for: G(A, B,C, D) = Sm Hint: There are seven prime implicants! (0,2,3,4,7,12,13,14,15) C 1 1 1 A 1 1 1 1 1 1 B D Source: M. Morris Mano and Charles R. Kime, Logic and Computer Design Fundamentals. DCD-03-18

Prime Implicants Selection Rule Find all prime implicants. Include all essential prime implicants in the solution Select a minimum cost set of non-essential prime implicants to cover all minterms not yet covered: Minimize the overlap among prime implicants as much as possible. Make sure that each prime implicant selected includes at least one minterm not included in any other prime implicant selected avoid redundancy. Source: M. Morris Mano and Charles R. Kime, Logic and Computer Design Fundamentals. DCD-03-19

Selection Rule Example Simplify F(A, B, C, D) given on the K-map. C Selected Essential C 1 1 1 1 A 1 1 1 1 1 1 1 B A 1 1 1 1 1 1 1 B D Minterms covered by essential prime implicants Source: M. Morris Mano and Charles R. Kime, Logic and Computer Design Fundamentals. D DCD-03-20

Simplification Using Prime Implicants Consider F( A, B, C, D ) = (0,2,3,5,7,8,9,10,11,13,15) The simplified expression may not be unique F = BD+B'D'+CD+AD = BD+B'D'+CD+AB = BD+B'D'+B'C+AD = BD+B'D'+B'C+AB' Digital Circuit Design DCD-03-21

Five-Variable Map Map for more than four variables becomes complicated. five-variable map: two four-variable map (one on the top of the other) DCD-03-22

Example 3.7 F = S(0,2,4,6,9,13,21,23,25,29,31)=A'B'E'+BD'E+ACE DCD-03-23

Another Map for Example 3.7 DCD-03-24

Relationship between # of Adjacent Squares and # of the Literals Digital Circuit Design DCD-03-25

Product of Sums Simplification Approach 1: Complement from minterms Step 1: Simplify F' in the form of sum of products Step 2: Apply DeMorgan's theorem F = (F')' => F': sum of products => F: product of sums Approach 2: Duality from maxterms Combinations of maxterms M 0 M 1 = (A+B+C+D)(A+B+C+D') = (A+B+C)+(DD') = A+B+C CD AB 00 01 11 10 00 M 0 M 1 M 3 M 2 01 M 4 M 5 M 7 M 6 11 M 12 M 13 M 15 M 14 10 M 8 M 9 M 11 M 10 DCD-03-26

Given F = S(0,1,2,5,8,9,10) Approach 1: Step 1: F' = AB+CD+BD' Example 3.8 Step 2: Apply DeMorgan's theorem; F=(A'+B')(C'+D')(B'+D) Approach 2: Think in terms of maxterms DCD-03-27

Implementation of Example 3.8 DCD-03-28

Truth Table of Function F Consider the function defined in Table 3.2. In sum-of-minterm: F( x, y, z ) = (1,3,4,6) In product-of-maxterm: F ( x, y, z) = (0,2,5,7) Taking the complement of F F( x, y, z) = ( x z )( x z) DCD-03-29

Truth Table of Function F Consider the function defined in Table 3.2. Combine the 1 s: F( x, y, z) = x' z xz' Combine the 0 s : F' ( x, y, z) = xz x' z' DCD-03-30

Don't-Care Conditions The value of a function is not specified for certain combinations of variables BCD; 1010-1111: don't care The don't care conditions can be utilized in logic minimization can be implemented as 0 or 1 DCD-03-31

Example 3.9 Given F(w,x,y,z) = S(1,3,7,11,15) and d(w,x,y,z) = S(0,2,5) F = yz + w'x'; F = yz + w'z F = S(0,1,2,3,7,11,15) ; F = S(1,3,5,7,11,15) Either expression is acceptable DCD-03-32

NAND Implementation NAND gate is a universal gate can implement any digital system Two graphic symbols for a NAND gate DCD-03-33

Two-level Implementation NAND-NAND = sum of products Example: F = AB+CD F = ((AB)' (CD)' )' =AB+CD DCD-03-34

Example 3.10 F( x, y, z ) = (1,2,3,4,5,7) F( x, y, z) = xy x y z DCD-03-35

General Design Procedure Procedure 1. Convert all AND gates to NAND gates with AND-inverter graphic symbols. 2. Convert all OR gates to NAND gates with inverter-or graphic symbols. 3. Check all the bubbles in the diagram. For every bubble that is not compensated by another small circle along the same line, insert an inverter or complement the input literal. DCD-03-36

Multilevel NAND Circuits Implementing F = A(CD + B) + BC using NAND gate only DCD-03-37

Multilevel NAND Circuits Implementing F = (AB +A B)(C+ D ) using NAND gate only DCD-03-38

NOR Implementation NOR function is the dual of NAND function. The NOR gate is also universal. Two graphic symbols for a NOR gate DCD-03-39

Two-level Implementation Implementing F = (A + B)(C + D)E using NOR gate only. DCD-03-40

Multilevel NOR Circuits Implementing F = (AB +A B)(C + D ) using NOR gate only. DCD-03-41

Other Two-level Implementations Digital Circuit Design Wired logic A wire connection between the outputs of two gates Open-collector TTL NAND gates: wired-and logic The NOR output of ECL gates: wired-or logic F = ( AB) ( CD) = ( AB CD) = ( A B )( C D ) F = ( A B) ( C D) = [( A B)( C D)] AND-OR-INVERT function OR-AND-INVERT function DCD-03-42

Nondegenerate Forms Considering four types of goats: AND, OR, NAND, NOR, 16 possible combinations of two-level forms are obtained. Eight of them: degenerate forms = a single operation The eight nondegenerate forms AND-OR, OR-AND, NAND-NAND, NOR-NOR, NOR-OR, NAND- AND, OR-NAND, AND-NOR AND-OR and NAND-NAND = sum of products OR-AND and NOR-NOR = product of sums NOR-OR, NAND-AND, OR-NAND, AND-NOR =? DCD-03-43

AND-OR-Invert Implementation AND-OR-INVERT (AOI) Implementation NAND-AND = AND-NOR = AOI F = (AB+CD+E)' F' = AB+CD+E (sum of products) DCD-03-44

OR-AND-Inverter Implementation OR-AND-INVERT (OAI) Implementation OR-NAND = NOR-OR = OAI F = ((A+B)(C+D)E)' F' = (A+B)(C+D)E (product of sums) simplified F' in products of sum DCD-03-45

Tabular Summary DCD-03-46

Example 3-11 Example 3.11 F' = x'y+xy'+z (F': sum of products) F = (x'y+xy'+z)' (F: AOI implementation) F = x'y'z' + xyz' (F: sum of products) F' = (x+y+z)(x'+y'+z) (F': product of sums) F = ((x+y+z)(x'+y'+z))' (F: OAI) DCD-03-47

Example 3.11 DCD-03-48

Exclusive-OR Function Exclusive-OR (XOR) x y = xy'+x'y Exclusive-NOR (XNOR) (x y)' = xy + x'y' Some identities x 0 = x x 1 = x' x x = 0 x x' = 1 x y' = (x y)' x' y = (x y)' Commutative and associative A B = B A (A B) C = A (B C) = A B C DCD-03-49

Exclusive-OR Function Implement (x'+y')x + (x'+y')y = xy'+x'y = x y DCD-03-50

Odd and Even Functions A B C = (AB'+A'B)C' +(AB+A'B')C = AB'C'+A'BC'+ABC+A'B'C = S(1,2,4,7) An odd number of 1's DCD-03-51

Logic Diagram of Odd and Even Functions Logic diagram of odd and even functions DCD-03-52

Four-Variable Exclusive-OR Function Four-variable Exclusive-OR function A B C D = (AB +A B) (CD +C D) = (AB +A B)(CD+C D )+(AB+A B )(CD +C D) Digital Circuit Design DCD-03-53

Parity Generation and Checking Parity Generation and Checking a parity bit: P = x y z parity check: C = x y z P C=1: an odd number of data bit error C=0: correct or an even # of data bit error DCD-03-54

Parity Generation and Checking DCD-03-55

Hardware Description Language (HDL) Describe the design of digital systems in a textual form hardware structure function/behavior Timing VHDL and Verilog HDL

A Top-Down Design Flow Specification RTL design and Simulation Logic Synthesis Gate Level Simulation ASIC Layout FPGA Implementation

Module Declaration Examples of keywords: module, end-module, input, output, wire, and, or, and not.

HDL Example 3.1 Digital Circuit Design HDL description for circuit shown in Fig. 3.37

Example: timescale directive timescale 1 ns/100ps Gate Displays Digital Circuit Design

HDL Example 3.2 Digital Circuit Design Gate-level description with propagation delays for circuit shown in Fig. 3.37

HDL Example 3.3 Test bench for simulating the circuit with delay Digital Circuit Design

Simulation Output for HDL Example 3.3

Boolean Expression Digital Circuit Design Boolean expression for the circuit of Fig. 3.37 Boolean expression: HDL Example 3.4

HDL Example 3.4

User-Defined Primitives General rules: Declaration: Implementing the hardware in Fig. 3.39

HDL Example 3.5

HDL Example 3.5 (Continued)

Conclusions From this lecture, you have learned the follows: Four-Variable Map Five-Variable Map Product-of-Sums Simplification Don t-care Conditions NAND and NOR Implementation Other Two-Level Implementations Exclusive-OR Function Verilog Design DCD-03-70