CSE 140: Logic Minimization Lecture

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

Contents. Chapter 3 Combinational Circuits Page 1 of 34

User s Manual. Ronwaldo A. Collado Diosdado Y. Tejoso Jr. CMSC 130 Logistic Design and Digital Computer Circuits Second Semester, A. Y.

Quine-McCluskey Algorithm

3.4 QUINE MCCLUSKEY METHOD 73. f(a, B, C, D, E)¼AC ĒþB CD þ BCDþĀBD.

A B AB CD Objectives:

Gate Level Minimization Map Method

Introduction to Microprocessors and Digital Logic (ME262) Boolean Algebra and Logic Equations. Spring 2011

UNIT II. Circuit minimization

Introduction. The Quine-McCluskey Method Handout 5 January 24, CSEE E6861y Prof. Steven Nowick

Graduate Institute of Electronics Engineering, NTU. CH5 Karnaugh Maps. Lecturer: 吳安宇教授 Date:2006/10/20 ACCESS IC LAB

Review: Standard forms of expressions

Simplification of Boolean Functions

Chapter 3 Simplification of Boolean functions

ESOP CIRCUIT MINIMIZATION BASED ON THE FUNCTION ON-SET. Likai Chai

Chapter 2 Combinational Logic Circuits

ELCT201: DIGITAL LOGIC DESIGN

Digital Logic Lecture 7 Gate Level Minimization

Giovanni De Micheli. Integrated Systems Centre EPF Lausanne

University of Technology

Gate-Level Minimization

Simplification of Boolean Functions

Gate Level Minimization

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

Switching Circuits & Logic Design

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

Digital Logic Design. Outline

ECE380 Digital Logic

Chapter 3. Gate-Level Minimization. Outlines

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

ENGIN 112 Intro to Electrical and Computer Engineering

LOGIC CIRCUITS. Kirti P_Didital Design 1

Synthesis of 2-level Logic Heuristic Method. Two Approaches

Chapter 2 Combinational

Gate-Level Minimization

CMPE223/CMSE222 Digital Logic

IT 201 Digital System Design Module II Notes

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

VLSI System Design Part II : Logic Synthesis (1) Oct Feb.2007

INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR Stamp / Signature of the Invigilator

Combinational Logic Circuits

CSE 140 Homework Three

ECE 5745 Complex Digital ASIC Design Topic 12: Synthesis Algorithms

Synthesis 1. 1 Figures in this chapter taken from S. H. Gerez, Algorithms for VLSI Design Automation, Wiley, Typeset by FoilTEX 1

Combinational Logic Circuits Part III -Theoretical Foundations

S1 Teknik Telekomunikasi Fakultas Teknik Elektro FEH2H3 2016/2017

Gate-Level Minimization


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

DIGITAL CIRCUIT LOGIC UNIT 5: KARNAUGH MAPS (K-MAPS)

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


Combinatorial Algorithms. Unate Covering Binate Covering Graph Coloring Maximum Clique

Chapter 2 Combinational Logic Circuits

Gate-Level Minimization. section instructor: Ufuk Çelikcan

ELCT201: DIGITAL LOGIC DESIGN

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

Module -7. Karnaugh Maps

Outcomes. Unit 9. Logic Function Synthesis KARNAUGH MAPS. Implementing Combinational Functions with Karnaugh Maps

Chapter 6. Logic Design Optimization Chapter 6

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

Specifying logic functions

Unit 4: Formal Verification

Combinational Logic & Circuits

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

Combinational Logic Circuits

Two-Level Logic Optimization ( Introduction to Computer-Aided Design) School of EECS Seoul National University

Combinational Circuits Digital Logic (Materials taken primarily from:

ESE535: Electronic Design Automation. Today. EDA Use. Problem PLA. Programmable Logic Arrays (PLAs) Two-Level Logic Optimization

Karnaugh Maps. Kiril Solovey. Tel-Aviv University, Israel. April 8, Kiril Solovey (TAU) Karnaugh Maps April 8, / 22

9/10/2016. ECE 120: Introduction to Computing. The Domain of a Boolean Function is a Hypercube. List All Implicants for One Variable A

QUESTION BANK FOR TEST

(Refer Slide Time 5:19)

ICS 252 Introduction to Computer Design

2.1 Binary Logic and Gates

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

CS February 17

Switching Theory And Logic Design UNIT-II GATE LEVEL MINIMIZATION

CS6201-DIGITAL PRINCIPLE AND SYSTEM DESIGN I YEAR/II SEM PART-B UNIT-I BOOLEAN ALGEBRA AND LOGIC GATES.

Supplement to. Logic and Computer Design Fundamentals 4th Edition 1

4 KARNAUGH MAP MINIMIZATION


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

Experiment 3: Logic Simplification

ICS 252 Introduction to Computer Design

CS8803: Advanced Digital Design for Embedded Hardware

Unit-IV Boolean Algebra

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

10EC33: DIGITAL ELECTRONICS QUESTION BANK

TWO-LEVEL COMBINATIONAL LOGIC

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

Slides for Lecture 15

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

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 04. Boolean Expression Simplification and Implementation

5. Minimizing Circuits

Standard Forms of Expression. Minterms and Maxterms

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

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 2. LECTURE: LOGIC NETWORK MINIMIZATION 2016/2017

GATE Exercises on Boolean Logic

McGILL UNIVERSITY Electrical and Computer Engineering Department MIDTERM EXAM

Transcription:

CSE 140: Logic Minimization Lecture

What is Logic Minimization? Input: A set of minterms corresponding to a function F Output: A minimal set of prime implicants that corresponds to function F Example: Input: F = abc' + ab'c' + a'bc' Output: F = ac' + bc'

Recall the Karnaugh Map Adjacent squares are hamming distance 1 away from each other. Enables you to visually circle the prime implicants and generate minimal cover. Example: wx\yz 00 01 11 10 00 0 1 0 0 01 0 1 0 1 11 1 1 1 1 10 1 0 0 0

Problem with Karnaugh Maps Difficult to trace hamming adjacencies with more than 4 variables. Need a way to automate Logic Minimization for a computer to do it.

Step 1: Prime Implicant Generation with Tabulation Method Conceptually: Expand minterms into larger implicants until you cannot continue expanding. Let's start with the first expansion step: Compare minterms pairwise and expand those that are hamming adjacent. For n minterms, this requires n^2 comparisons. Can we do better?

Observation: a minterm m that is hamming adjacent to minterm n will only differ by a single 1. Example: Minterm 001 and 011 are hamming adjacent and can be combined into 0-1. Only way for minterms to be hamming adjacent is if one has exactly one more 1 than the other. Idea: Partition the minterms into groups based on the number of 1's they contain

Example: Minterms 0001, 0101, 0110, 1000, 1100, 1101, 1110, 1111 Partition into groups Gi, where i is the number of 1's every element in the group contains G1: 0001, 1000 G2: 0101, 0110, 1100 G3: 1101, 1110 G4: 1111 Now we only need to combine elements from Gi with ones from Gi+1, reducing the number of comparisons from 64 to 14!

Definition: a k-subcube is an implicant with k dashes. For example, 11-0 is a 1-subcube. G1: 0001, 1000 G2: 0101, 0110, 1100 G3: 1101, 1110 G4: 1111 The above comprise the set of 0-subcubes, and we now need to combine them to generate 1- subcubes.

0-subcubes G1: 0001x, 1000 G2: 0101x, 0110, 1100 G3: 1101, 1110 G4: 1111 1-subcubes G1: 0-01, G2: G3: G4: N/A Can combine 0001 and 0101 to get 0-01. 0001 and 0101 are thus covered (denoted with an x)

0-subcubes G1: 0001x, 1000 G2: 0101x, 0110, 1100 G3: 1101, 1110 G4: 1111 1-subcubes G1: 0-01, G2: G3: G4: N/A Can't combine 0001 with 0110 because they are not hamming adjacent

0-subcubes G1: 0001x, 1000 G2: 0101x, 0110, 1100 G3: 1101, 1110 G4: 1111 1-subcubes G1: 0-01, G2: G3: G4: N/A Can't combine 0001 with 1100

0-subcubes G1: 0001x, 1000 G2: 0101x, 0110, 1100 G3: 1101, 1110 G4: 1111 1-subcubes G1: 0-01, G2: G3: G4: N/A Can't combine 1000 with 0101

0-subcubes G1: 0001x, 1000 G2: 0101x, 0110, 1100 G3: 1101, 1110 G4: 1111 1-subcubes G1: 0-01, G2: G3: G4: N/A Can't combine 1000 with 0110

0-subcubes G1: 0001x, 1000x G2: 0101x, 0110, 1100x G3: 1101, 1110 G4: 1111 1-subcubes G1: 0-01, 1-00 G2: G3: G4: N/A Can combine 1000 with 1100 to get 1-00. We can thus mark them as covered with an x.

0-subcubes G1: 0001x, 1000x G2: 0101x, 0110x, 1100x G3: 1101x, 1110x G4: 1111x 1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A And so on.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A Now we want to merge our 1-subcubes into 2- subcubes. We can do the same thing, but this time treating the '-' as essentially another symbol.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: G2: G3: N/A 0-01 and -101 are more than Hamming-1 apart, so can't merge.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: G2: G3: N/A 0-01 and -110 are more than Hamming-1 apart, so can't merge.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: G2: G3: N/A 0-01 and 110- are more than Hamming-1 apart, so can't merge.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: G2: G3: N/A 0-01 and 11-0 are more than Hamming-1 apart, so can't merge.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: G2: G3: N/A 1-00 and -101 are more than Hamming-1 apart, so can't merge.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: G2: G3: N/A 1-00 and -110 are more than Hamming-1 apart, so can't merge.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: G2: G3: N/A 1-00 and 110- are more than Hamming-1 apart, so can't merge.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: G2: G3: N/A 1-00 and 11-0 are more than Hamming-1 apart, so can't merge.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: N/A G2: G3: N/A Can't merge any of G1 into G2!

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: N/A G2: G3: N/A -101 and 11-1 are more than hamming-1 away from each other, so can't merge

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: N/A G2: G3: N/A -110 and 11-1 are more than hamming-1 away from each other, so can't merge

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0 G3: 11-1, 111- G4: N/A 2-subcubes G1: N/A G2: G3: N/A 110- and 11-1 are more than hamming-1 away from each other, so can't merge

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-, 11-0x G3: 11-1x, 111- G4: N/A 2-subcubes G1: N/A G2: 11-- G3: N/A 11-0 and 11-1 can combine to form 11--, so they can be merged and marked with an 'x' as covered

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-x, 11-0x G3: 11-1x, 111-x G4: N/A 2-subcubes G1: N/A G2: 11-- G3: N/A And so on.

1-subcubes G1: 0-01, 1-00 G2: -101, -110, 110-x, 11-0x G3: 11-1x, 111-x G4: N/A 2-subcubes G1: N/A G2: 11-- G3: N/A We then take the remaining uncovered implicants as our prime implicants.

Prime implicants: 0-01 w'y'z 1-00 wy'z' -101 xy'z -110 xyz' 11-- wx Now need to minimize this.

Quine McCluskey Algorithm Idea: Create table with minterms and implicants. For example, with our prime implicants that we calculated: 1 5 6 8 12 13 14 15 w'y'z 1 1 wy'z' 1 1 xy'z 1 1 xyz' 1 1 wx 1 1 1 1

Rule 1: Essential prime implicants must be used, so we can cross out their corresponding rows and columns since they will already be covered. 1 5 6 8 12 13 14 15 w'y'z 1 1 wy'z' 1 1 xy'z 1 1 xyz' 1 1 wx 1 1 1 1

Rule 2: If one row dominates another row, we can cross out the dominated row because whatever minterms the dominated row contains will already be covered. 1 5 6 8 12 13 14 15 P1 1 1 1 1 P2 1 1 P3 1 1 1 P4 1 1 P5 1 1 1

Rule 3: If one column dominates another column, we can cross out the dominating column because whatever implicant covers the dominating minterm will cover the one it dominates as well. 1 5 6 8 12 13 14 15 P1 1 1 1 1 P2 1 1 P3 1 1 1 P4 1 1 P5 1 1 1

Algorithm Apply the following rules until steady-state Rule 1: Remove essentials to put in our minimal cover and cross out their rows and columns. Rule 2: If a row dominates another row, cross out the dominated row. Rule 3: If a column dominates another column, cross out the dominating column.

With our example, we have 4 essentials that result in the entire table going away, so our minimal cover is w'y'z + wy'z' + xyz' + wx. 1 5 6 8 12 13 14 15 w'y'z 1 1 wy'z' 1 1 xy'z 1 1 xyz' 1 1 wx 1 1 1 1

Recall the Karnaugh Map Sanity Check Minimal cover is: w'y'z + wx + xyz' + xy'z' Same as before! wx\yz 00 01 11 10 00 0 1 0 0 01 0 1 0 1 11 1 1 1 1 10 1 0 0 0

What if we had the following prime implicants? P0 = x y P1 = y z P2 = xz P3 = xy P4 = yz P5 = x z

0 1 2 3 4 5 6 7 P0 1 1 P1 1 1 P2 1 1 P3 1 1 P4 1 1 P5 1 1 No row or column dominance! This is called a cyclic core. How do we identify the minimal cover?

Use Petrick s Method! List the implicants in product of sums form What does this mean?

0 1 2 3 4 5 6 7 P0 1 1 P1 1 1 P2 1 1 P3 1 1 P4 1 1 P5 1 1 To cover minterm 0, we can use P0 or P5

0 1 2 3 4 5 6 7 P0 1 1 P1 1 1 P2 1 1 P3 1 1 P4 1 1 P5 1 1 To cover minterm 0, we can use P0 or P5 P0 + P5

0 1 2 3 4 5 6 7 P0 1 1 P1 1 1 P2 1 1 P3 1 1 P4 1 1 P5 1 1 To cover minterm 1, we can use P0 or P1 (P0 + P5)(P0 + P1)

0 1 2 3 4 5 6 7 P0 1 1 P1 1 1 P2 1 1 P3 1 1 P4 1 1 P5 1 1 To cover minterm 2, we can use P4 or P5 (P0 + P5)(P0 + P1)(P4 + P5)

0 1 2 3 4 5 6 7 P0 1 1 P1 1 1 P2 1 1 P3 1 1 P4 1 1 P5 1 1 We do this for all covered minterms to finally get: (P0+P5)(P0+P1)(P4+P5) (P1+P2)(P3+P4) (P2+P3)

Now that we've formulated it as a product-ofsums, we can convert it to a sum-of-products: (P0+P5)(P0+P1)(P4+P5)(P1+P2)(P3+P4) (P2+P3) =

Now that we've formulated it as a product-ofsums, we can convert it to a sum-of-products: (P0+P5)(P0+P1)(P4+P5)(P1+P2)(P3+P4) (P2+P3) = (P0+P5P1)(P4+P5P3)(P2+P1P3) = (P0P4+P0P5P3+P1P4P5+P1P3P5)(P2+P1P3) = P0P2P4+P0P1P3P4+P0P2P3P5+P0P1P3P5+ P1P2P4P5+P1P3P4P5+P1P2P3P5+ P1P3P5

Now that we've formulated it as a product-ofsums, we can convert it to a sum-of-products: (P0+P5)(P0+P1)(P4+P5)(P1+P2)(P3+P4) (P2+P3) = (P0+P5P1)(P4+P5P3)(P2+P1P3) = (P0P4+P0P5P3+P1P4P5+P1P3P5)(P2+P1P3) = P0P2P4+P0P1P3P4+P0P2P3P5+P0P1P3P5+ P1P2P4P5+P1P3P4P5+P1P2P3P5+ P1P3P5

So, there are 2 possible minimum covers: P0, P2, P4 P1, P3, P5 Recall that: P0 = x y P1 = y z P2 = xz P3 = xy P4 = yz P5 = x z

So our minimal covers in sum of products form are: x y + xz + yz y z + xy + x z

Sanity Check: x\yz 00 01 11 10 0 1 1 0 1 1 0 1 1 1 Minimal Cover: x y + xz + yz Same as what we got using Petrick s Method!

Sanity Check: x\yz 00 01 11 10 0 1 1 0 1 1 0 1 1 1 Minimal Cover: y z + xy + x z Same as what we got using Petrick s Method!

Overall algorithm 1. Generate Prime Implicants using Tabulation Method 2. Map Prime Implicants to Quine McCluskey table and perform the pruning based on the row/column dominance and essential heuristics. 3. If cyclic core is reached, apply Petrick's Method.