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

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

Combinational Logic (mostly review!)

Possible logic functions of two variables

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

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

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

L2: Combinational Logic Design (Construction and Boolean Algebra)

L2: Combinational Logic Design (Construction and Boolean Algebra)

Sequential Logic Optimization. Optimization in Context. Algorithmic Approach to State Minimization. Finite State Machine Optimization

Working with combinational logic

L2: Combinational Logic Design (Construction and Boolean Algebra)

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

Chapter 2 Combinational logic

ﻮﻧﺭﺎﮐ ﺔﺸﻘﻧ ﺎﺑ ﻱﺯﺎﺳ ﻪﻨﻴﻬﺑ

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

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

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

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

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

WEEK 3.1 MORE ON KARNAUGH MAPS

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

Chapter 4 Optimized Implementation of Logic Functions

ENG2410 Digital Design Combinational Logic Circuits

Why digital? Overview. Number Systems. Binary to Decimal conversion

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

K-map Definitions. abc

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

Logic Design Combinational Circuits. Digital Computer Design

Show that the dual of the exclusive-or is equal to its compliment. 7

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

Unit 2 Session - 6 Combinational Logic Circuits

3. PRINCIPLES OF COMBINATIONAL LOGIC

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

Simplifying Logic Circuits with Karnaugh Maps

Part 5: Digital Circuits

Combinatorial Logic Design Principles

UNIT 5 KARNAUGH MAPS Spring 2011

CMSC 313 Lecture 19 Homework 4 Questions Combinational Logic Components Programmable Logic Arrays Introduction to Circuit Simplification

Week-I. Combinational Logic & Circuits

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

211: Computer Architecture Summer 2016

Chapter 5. Digital systems. 5.1 Boolean algebra Negation, conjunction and disjunction

Digital Circuit And Logic Design I. Lecture 4

The Design Procedure. Output Equation Determination - Derive output equations from the state table

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

CHAPTER 7 MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

Lecture A: Logic Design and Gates

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

CHAPTER 12 Boolean Algebra

14:332:231 DIGITAL LOGIC DESIGN

CMSC 313 Preview Slides

Combinational Logic. Review of Combinational Logic 1

Digital Logic Design. Combinational Logic

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

EECS 150 Homework 8 Solutions Fall Problem 1: CLD2 Problem 8.2, showing BOTH methods (row matching and implication chart).

Chapter 2 Combinational Logic Circuits

15.1 Elimination of Redundant States

CS/EE 181a 2008/09 Lecture 4

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

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

Different encodings generate different circuits

L10 State Machine Design Topics

Let s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc.

Logic. Basic Logic Functions. Switches in series (AND) Truth Tables. Switches in Parallel (OR) Alternative view for OR

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

Minimization techniques

Number System conversions

Karnaugh Maps (K-Maps)

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Theorem/Law/Axioms Over (.) Over (+)

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra

CS/EE 181a 2010/11 Lecture 4

CMSC 313 Lecture 15 Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

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

EECS Variable Logic Functions

Karnaugh Maps Objectives

Digital Fundamentals

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

COSC3330 Computer Architecture Lecture 2. Combinational Logic

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

Chapter 2. Introduction. Chapter 2 :: Topics. Circuits. Nodes. Circuit elements. Introduction

Chapter 7 Logic Circuits

Learning Objectives:

CE Optimized State Machines

Simplify the following Boolean expressions and minimize the number of literals:

Minimierung. Wintersemester 2018/19. Folien basierend auf Material von F. Vahid und S. Werner Vorlesender: Dr. Ing.

Basic Gate Repertoire

MODULAR CIRCUITS CHAPTER 7

Fundamentals of Computer Systems

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

Theory of Logic Circuits. Laboratory manual. Exercise 1

Review for B33DV2-Digital Design. Digital Design

14.1. Unit 14. State Machine Design

Review for Test 1 : Ch1 5

CHAPTER 5 KARNAUGH MAPS

Learning Objectives. Boolean Algebra. In this chapter you will learn about:

CSE140: Components and Design Techniques for Digital Systems. Logic minimization algorithm summary. Instructor: Mohsen Imani UC San Diego

Lecture 2. Notes. Notes. Notes. Boolean algebra and optimizing logic functions. BTF Electronics Fundamentals August 2014

CPE100: Digital Logic Design I

Contents. Chapter 3 Combinational Circuits Page 1 of 36

Transcription:

EES5 Section 5 Simplification and State Minimization Fall 2 -cube X oolean cubes Visual technique for indentifying when the uniting theorem can be applied n input variables = n-dimensional "cube" Y 2-cube X 3-cube Y Z X Y Z W X 4-cube EES5 - Fall 2-4 Simplification Finding a minimal sum of products or product of sums realization Exploit don't care information in the process lgebraic simplification Not an algorithmic/systematic procedure How do you know when the minimum realization has been found? omputer-aided design tools Precise solutions require very long computation times, especially for functions with many inputs (> ) Heuristic methods employed "educated guesses" to reduce amount of computation and yield good if not best solutions Hand methods still relevant To understand automatic tools and their strengths and weaknesses bility to check results (on small examples) Mapping truth tables onto cubes Uniting theorem combines two "faces" of a cube into a larger "face" Example: F F ON-set = solid nodes OFF-set = empty nodes two faces of size (nodes) combine into a face of size (line) varies within face, does not this face represents the literal ' EES5 - Fall 2-2 EES5 - Fall 2-5 F The Uniting Theorem Key tool to simplification: (' + ) = Essence of simplification of two-level logic Find two element subsets of the ON-set where only one variable changes its value this single varying variable can be eliminated and a single product term used to represent both elements F = ''+' = ('+)' = ' has the same value in both on-set rows remains has a different value in the two rows is eliminated EES5 - Fall 2-3 Three variable example inary full-adder carry-out logic in out ('+)in out = in++in (in'+in) (+')in the on-set is completely covered by the combination (OR) of the subcubes of lower dimensionality - note that is covered three times EES5 - Fall 2-6

Higher dimensional cubes Sub-cubes of higher dimension than 2 F(,,) = Σm(4,5,6,7) on-set forms a square i.e., a cube of dimension 2 represents an expression in one variable i.e., 3 dimensions 2 dimensions is asserted (true) and unchanged and vary This subcube represents the literal Karnaugh maps (cont d) Numbering scheme based on Gray code e.g.,,,, Only a single bit changes in code for adjacent map cells 2 6 4 3 7 5 2 3 6 4 7 5 4 5 2 8 3 9 3 7 5 2 6 4 3 = = EES5 - Fall 2-7 EES5 - Fall 2- m-dimensional cubes In a 3-cube (three variables): -cube, i.e., a single node, yields a term in 3 literals -cube, i.e., a line of two nodes, yields a term in 2 literals 2-cube, i.e., a plane of four nodes, yields a term in literal 3-cube, i.e., a cube of eight nodes, yields a constant term "" In general, m-subcube within an n-cube (m < n) yields a term with n m literals djacencies in Karnaugh maps Wrap from first to last column Wrap top row to bottom row EES5 - Fall 2-8 EES5 - Fall 2- Karnaugh maps Flat map of oolean cube Wrap around at edges Hard to draw and visualize for more than 4 dimensions Virtually impossible for more than 6 dimensions lternative to truth-tables to help visualize adjacencies Guide to applying the uniting theorem On-set elements with only one variable changing value are adjacent unlike the situation in a linear truth-table Karnaugh map examples F = out = f(,,) = Σm(,4,6,7) + in+ in 2 3 F EES5 - Fall 2-9 in obtain the complement of the function + + by covering s with subcubes EES5 - Fall 2-2

More Karnaugh map examples G(,,) = Karnaugh maps: don t cares f(,,,) = Σ m(,3,5,7,9) + d(6,2,3) f = ' + '' without don't cares f = ' + ' with don't cares F(,,) = Σm(,4,5,7) = + F' simply replace 's with 's and vice versa F'(,,) = Σ m(,2,3,6) = + X X by using don't care as a "" a 2-cube can be formed rather than a -cube to cover this node don't cares can be treated as s or s depending on which is more advantageous EES5 - Fall 2-3 EES5 - Fall 2-6 Karnaugh map: 4-variable example F(,,,) = Σm(,2,3,5,6,7,8,,,4,5) F = + + find the smallest number of the largest possible subcubes to cover the ON-set (fewer terms with fewer inputs per term) N N2 Example: two-bit comparator LT EQ GT < = > block diagram and truth table LT EQ GT we'll need a 4-variable Karnaugh map for each of the 3 output functions EES5 - Fall 2-4 EES5 - Fall 2-7 Karnaugh maps: don t cares f(,,,) = Σ m(,3,5,7,9) + d(6,2,3) without don't cares f = + X Example: two-bit comparator K-map for LT K-map for EQ K-map for GT X LT = ' ' + ' + ' EQ = '''' + '' + + ' = ( xnor ) ( xnor ) GT = ' ' + ' + ' LT and GT are similar (flip / and /) EES5 - Fall 2-5 EES5 - Fall 2-8

Example: two-bit comparator Example: increment by EQ EQ two alternative implementations of EQ with and without XOR XNOR is implemented with at least 3 simple gates block diagram and truth table O O2 O4 O8 O8 O4 O2 O X X X X X X X X X X X X X X X X X X X X X X X X 4-variable K-map for each of the 4 output functions EES5 - Fall 2-9 EES5 - Fall 2-22 Example: 2x2-bit multiplier Example: increment by 2 2 block diagram and truth table P P2 P4 P8 2 2 P8 P4 P2 P 4-variable K-map for each of the 4 output functions X X X X X X X X X X X O8 O4 X X O8 = + ' X X O4 = ' + ' + X X O2 = + ' O = ' O2 O X X X X X EES5 - Fall 2-2 EES5 - Fall 2-23 2 2 Example: 2x2-bit multiplier 2 K-map for P8 P8 = 22 2 K-map for P2 P2 = 2'2 + 2' + 22' + 2' K-map for P4 P4 = 22' + 2'2 2 2 K-map for P P = 2 2 EES5 - Fall 2-2 efinition of terms Implicant Single element of ON-set or any group of these elements that can be combined to form a subcube Prime implicant Implicant that can't be combined with another to form a larger subcube Essential prime implicant Prime implicant is essential if it alone covers an element of ON-set Will participate in LL possible covers of the ON-set Objective: Grow implicant into prime implicants (minimize literals per term) over the ON-set with as few prime implicants as possible (minimize number of product terms) EES5 - Fall 2-24

Examples to illustrate terms X 5 prime implicants:, ',, ', '' essential minimum cover: 4 essential implicants 6 prime implicants: '', ',, '',, ' minimum cover: + ' + '' essential EES5 - Fall 2-25 Finite State Machine Optimization State Minimization Fewer states require fewer state bits Fewer bits require fewer logic equations Encodings: State, Inputs, Outputs State encoding with fewer bits has fewer equations to implement However, each may be more complex State encoding with more bits (e.g., one-hot) has simpler equations omplexity directly related to complexity of state diagram Input/output encoding may or may not be under designer control EES5 - Fall 2-28 Two-level simplification algorithm lgorithm: minimum sum-of-products expression from a Karnaugh map Step : choose an element of the ON-set Step 2: find "maximal" groupings of s and Xs adjacent to that element consider top/bottom row, left/right column, and corner adjacencies this forms prime implicants (number of elements are power of 2) Repeat Steps and 2 to find all prime implicants Step 3: revisit the s in the K-map if covered by single prime implicant, it is essential, and participates in final cover s covered by essential prime implicant do not need to be revisited Step 4: if there remain s not covered by essential prime implicants select the smallest number of prime implicants that cover the remaining s EES5 - Fall 2-26 lgorithmic pproach Goal identify and combine states that have equivalent behavior Equivalent States: Same output For all input combinations, states transition to same or equivalent states lgorithm Sketch. Place all states in one set 2. Initially partition set based on output behavior 3. Successively partition resulting subsets based on next state transitions 4. Repeat (3) until no further partitioning is required states left in the same set are equivalent Polynomial time procedure EES5 - Fall 2-29 Example State Minimization Example Sequence etector for or X X X X 3 primes around ''' X X 2 primes around ''' X X 2 essential primes X X 2 primes around ' X X minimum cover (3 primes) / S // S S3 S4 S5 S6 //// //// Input Next State Output Sequence Present State X= X= X= X= Reset S S S2 S S3 S4 S2 S5 S6 S3 S S S4 S S S5 S S S6 S S / S2 // EES5 - Fall 2-27 EES5 - Fall 2-3

Method of Successive Partitions Minimized FSM Input Next State Output Sequence Present State X= X= X= X= Reset S S S2 S S3 S4 S2 S5 S6 S3 S S S4 S S S5 S S S6 S S ( S S S2 S3 S4 S5 S6 ) ( S S S2 S3 S5 ) ( S4 S6 ) ( S S3 S5 ) ( S S2 ) ( S4 S6 ) ( S ) ( S3 S5 ) ( S S2 ) ( S4 S6 ) S is equivalent to S2 S3 is equivalent to S5 S4 is equivalent to S6 EES5 - Fall 2-3 Implication hart Method ross out incompatible states based on outputs Then cross out more cells if indexed chart entries are already crossed out S S2 S3 S4 S5 S-S S-S3 S2-S2 S3-S4 S-S S-S S2-S2 S3-S5 S-S S3-S S-S4 S4-S5 S-S S3-S4 S-S S4-S5 S-S S3-S S2-S2 S4-S5 S-S S-S4 S4-S S5-S5 present next state output state S' S' S S2 S3' S S' S3' S S3' S2 S S3' S2 S' S3' S S' S' S3' minimized state table (S==S4) (S3==S5) S S S2 S3 S4 EES5 - Fall 2-34 Minimized FSM State minimized sequence detector for or Input Next State Output Sequence Present State X= X= X= X= Reset S S' S' + S' S3' S4' X S3' S S X S4' S S S X/ Incompletely Specified FSMs Equivalence of states is transitive when machine is fully specified ut its not transitive when don't cares are present e.g., state output S S is compatible with both S and S2 S but S and S2 are incompatible S2 No polynomial time algorithm exists for determining best grouping of states into equivalent sets that will yield the smallest number of final states S / / S3 S4 X/// EES5 - Fall 2-32 EES5 - Fall 2-35 More omplex State Minimization Multiple input example inputs here S [] S2 [] S4 [] S [] S3 [] S5 [] present next state output state S S S S2 S3 S S S3 S S4 S2 S S3 S2 S4 S3 S S S4 S5 S4 S S S2 S5 S5 S S4 S S5 symbolic state transition table EES5 - Fall 2-33