Simplification of two-level combinational logic

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

University of Technology

Specifying logic functions

Chapter 3 working with combinational logic

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

ENGIN 112 Intro to Electrical and Computer Engineering

A B AB CD Objectives:

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Chapter 3. Gate-Level Minimization. Outlines

CprE 281: Digital Logic

Simplification of Boolean Functions

Gate Level Minimization Map Method

Chapter 2 Combinational Logic Circuits

Working with Combinational Logic

Chapter 2. Boolean Expressions:

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

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

A graphical method of simplifying logic

Gate-Level Minimization. section instructor: Ufuk Çelikcan

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

Homework. Update on website issue Reading: Chapter 7 Homework: All exercises at end of Chapter 7 Due 9/26

Combinational Logic Circuits Part III -Theoretical Foundations

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

(Refer Slide Time 6:48)

Chapter 6. Logic Design Optimization Chapter 6

Combinational Logic & Circuits

Simplification of Boolean Functions

Programmable Logic Devices

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

Final Examination (Open Katz, asynchronous & test notes only, Calculators OK, 3 hours)

CS8803: Advanced Digital Design for Embedded Hardware

DKT 122/3 DIGITAL SYSTEM 1

Digital Logic Design (3)

ELCT201: DIGITAL LOGIC DESIGN

EECS Components and Design Techniques for Digital Systems. Lec 07 PLAs and FSMs 9/ Big Idea: boolean functions <> gates.

TWO-LEVEL COMBINATIONAL LOGIC

4 KARNAUGH MAP MINIMIZATION

ELCT201: DIGITAL LOGIC DESIGN

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

IT 201 Digital System Design Module II Notes

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

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

Objectives: 1. Design procedure. 2. Fundamental circuits. 1. Design procedure

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

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

DIGITAL CIRCUIT LOGIC UNIT 7: MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

Chapter 2 Combinational

Gate Level Minimization

Chapter 2 Combinational Logic Circuits

1. Fill in the entries in the truth table below to specify the logic function described by the expression, AB AC A B C Z

S1 Teknik Telekomunikasi Fakultas Teknik Elektro FEH2H3 2016/2017

UNIT II. Circuit minimization

! Replace maxterm OR gates with NOR gates! Place compensating inversion at inputs of AND gate

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

SEE1223: Digital Electronics

Experiment 4 Boolean Functions Implementation

ece5745-pla-notes.txt

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

Decision tables. Combinational Models. Necessary Characteristics of the Implementation. Decision tables. Deriving decision tables


Review: Standard forms of expressions

ICS 252 Introduction to Computer Design

Lecture 7 Logic Simplification

Digital Fundamentals

Combinational Logic Circuits

Module -7. Karnaugh Maps

Optimized Implementation of Logic Functions

Chapter 2: Combinational Systems

1/28/2013. Synthesis. The Y-diagram Revisited. Structural Behavioral. More abstract designs Physical. CAD for VLSI 2

2.6 BOOLEAN FUNCTIONS

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

SWITCHING THEORY AND LOGIC CIRCUITS

Boolean logic. Boolean Algebra. Introduction to Computer Yung-Yu Chuang NOT AND NOT

Gate-Level Minimization

Functional Block: Decoders

3.3 Hardware Karnaugh Maps

CMPE223/CMSE222 Digital Logic

Lecture 22: Implementing Combinational Logic

Unit 4: Formal Verification

Switching Theory And Logic Design UNIT-II GATE LEVEL MINIMIZATION

MODULE 5 - COMBINATIONAL LOGIC

Combinational Logic Circuits

Gate-Level Minimization

ECE380 Digital Logic

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

EECS /20/07 EECS

Giovanni De Micheli. Integrated Systems Centre EPF Lausanne

QUESTION BANK FOR TEST

2/8/2017. SOP Form Gives Good Performance. ECE 120: Introduction to Computing. K-Maps Can Identify Single-Gate Functions

Switching Circuits & Logic Design

Combinational Circuits Digital Logic (Materials taken primarily from:

Chapter 3 Simplification of Boolean functions

Digital Logic Lecture 7 Gate Level Minimization

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.

Identity. p ^ T p p _ F p. Idempotency. p _ p p p ^ p p. Associativity. (p _ q) _ r p _ (q _ r) (p ^ q) ^ r p ^ (q ^ r) Absorption

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

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

Alternate Algorithm for DSM Partitioning

Boolean Function Simplification

Transcription:

ombinational logic optimization! lternate representations of oolean functions " cubes " karnaugh maps! Simplification " two-level simplification " exploiting don t cares " algorithm for simplification utumn 2000 SE370 - IV - ombinational Logic Optimization 1 Simplification of two-level combinational logic! 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 (> 10) " 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 " ability to check results (on small examples) utumn 2000 SE370 - IV - ombinational Logic Optimization 2

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 = ''+' = ('+)' = ' F 1 0 1 0 has the same value in both on-set rows remains has a different value in the two rows is eliminated utumn 2000 SE370 - IV - ombinational Logic Optimization 3 oolean cubes! Visual technique for indentifying when the uniting theorem can be applied! n input variables = n-dimensional "cube" 1-cube 01 00 Y 11 10 2-cube 111 0111 1111 3-cube 000 Y Z 101 Y 0000 Z W 1000 4-cube utumn 2000 SE370 - IV - ombinational Logic Optimization 4

Mapping truth tables onto oolean cubes! Uniting theorem combines two "faces" of a cube into a larger "face"! Example: F 1 0 1 0 01 00 F 11 10 two faces of size 0 (nodes) combine into a face of size 1(line) ON-set = solid nodes OFF-set = empty nodes -set = 'd nodes varies within face, does not this face represents the literal ' utumn 2000 SE370 - IV - ombinational Logic Optimization 5 Three variable example! inary full-adder carry-out logic in out 1 0 1 1 000 ('+)in 111 101 (in'+in) (+')in the on-set is completely covered by the combination (OR) of the subcubes of lower dimensionality - note that 111 is covered three times out = in++in utumn 2000 SE370 - IV - ombinational Logic Optimization 6

Higher dimensional cubes! Sub-cubes of higher dimension than 2 F(,,) = Σm(4,5,6,7) 011 010 110 111 on-set forms a square i.e., a cube of dimension 2 represents an expression in one variable i.e., 3 dimensions 2 dimensions 000 001 100 101 is asserted (true) and unchanged and vary This subcube represents the literal utumn 2000 SE370 - IV - ombinational Logic Optimization 7 m-dimensional cubes in a n-dimensional oolean space! In a 3-cube (three variables): " a 0-cube, i.e., a single node, yields a term in 3 literals " a 1-cube, i.e., a line of two nodes, yields a term in 2 literals " a 2-cube, i.e., a plane of four nodes, yields a term in 1 literal " a 3-cube, i.e., a cube of eight nodes, yields a constant term "1"! In general, " an m-subcube within an n-cube (m < n) yields a term with n m literals utumn 2000 SE370 - IV - ombinational Logic Optimization 8

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 1 0 2 1 1 3 F 1 0 1 0 utumn 2000 SE370 - IV - ombinational Logic Optimization 9 Karnaugh maps (cont d)! Numbering scheme based on Gray code " e.g., 00, 01, 11, 10 " only a single bit changes in code for adjacent map cells 01 0 0 2 1 1 3 10 6 4 7 5 0 4 1 5 12 8 13 9 0 2 1 3 6 4 7 5 3 7 2 6 15 11 14 10 13 = 1101= utumn 2000 SE370 - IV - ombinational Logic Optimization 10

djacencies in Karnaugh maps! Wrap from first to last column! Wrap top row to bottom row 0010 1100 011 010 110 111 001101 000 001 100 101 utumn 2000 SE370 - IV - ombinational Logic Optimization 11 Karnaugh map examples! F =! out =! f(,,) = Σm(0,4,6,7) + in +in in + + obtain the complement of the function by covering 0s with subcubes utumn 2000 SE370 - IV - ombinational Logic Optimization 12

More Karnaugh map examples G(,,) = F(,,) = Σm(0,4,5,7) =+ F' simply replace 1's with 0's and vice versa F'(,,) = Σ m(1,2,3,6) = + utumn 2000 SE370 - IV - ombinational Logic Optimization 13 Karnaugh map: 4-variable example! F(,,,) = Σm(0,2,3,5,6,7,8,10,11,14,15) F = + + 0111 1111 0000 1000 find the smallest number of the largest possible subcubes to cover the ON-set (fewer terms with fewer inputs per term) utumn 2000 SE370 - IV - ombinational Logic Optimization 14

Karnaugh maps: don t cares! f(,,,) = Σ m(1,3,5,7,9) + d(6,12,13) " without don't cares f = + 0 1 0 utumn 2000 SE370 - IV - ombinational Logic Optimization 15 Karnaugh maps: don t cares (cont d)! f(,,,) = Σ m(1,3,5,7,9) + d(6,12,13) " f = ' + '' without don't cares " f = ' + ' with don't cares 0 0 1 by using don't care as a "1" a 2-cube can be formed rather than a 1-cube to cover this node don't cares can be treated as 1s or 0s depending on which is more advantageous utumn 2000 SE370 - IV - ombinational Logic Optimization 16

ctivity! Minimize the function F = Σ m(0, 2, 7, 8, 14, 15) + d(3, 6, 9, 12, 13) 1 1 1 F = + + + + + F = + + F = + + 1 1 1 utumn 2000 SE370 - IV - ombinational Logic Optimization 17 1 1 1 esign example: two-bit comparator N1 N2 LT EQ GT block diagram and truth table < = > LT EQ GT 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 we'll need a 4-variable Karnaugh map for each of the 3 output functions utumn 2000 SE370 - IV - ombinational Logic Optimization 18

esign example: two-bit comparator (cont d) K-map for LT K-map for EQ K-map for GT LT = EQ = GT = ' ' + ' + ' ' ' ' ' + ' ' + + ' = ( xnor ) ( xnor ) ' ' + ' + ' LT and GT are similar (flip / and /) utumn 2000 SE370 - IV - ombinational Logic Optimization 19 esign example: two-bit comparator (cont d) two alternative implementations of EQ with and without OR EQ EQ NOR is implemented with at least 3 simple gates utumn 2000 SE370 - IV - ombinational Logic Optimization 20

esign example: 2x2-bit multiplier 1 2 1 2 block diagram and truth table P1 P2 P4 P8 2 1 2 1 P8 P4 P2 P1 1 0 1 0 1 0 1 1 1 0 1 1 4-variable K-map for each of the 4 output functions utumn 2000 SE370 - IV - ombinational Logic Optimization 21 esign example: 2x2-bit multiplier (cont d) 2 K-map for P8 1 K-map for P4 P4 = 221' + 21'2 2 1 2 1 P8 = 2121 2 1 2 K-map for P2 1 K-map for P1 P1 = 11 2 1 2 1 P2 = 2'12 + 121' + 22'1 + 21'1 2 1 utumn 2000 SE370 - IV - ombinational Logic Optimization 22

esign example: increment by 1 I1 I2 I4 I8 block diagram and truth table O1 O2 O4 O8 I8 I4 I2 I1 O8 O4 O2 O1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 4-variable K-map for each of the 4 output functions utumn 2000 SE370 - IV - ombinational Logic Optimization 23 esign example: increment by 1 (cont d) I8 1 O8 O4 I8 0 I2 0 I4 I8 0 I1 O2 O8 = I4 I2 I1 + I8 I1' O4 = I4 I2' + I4 I1' + I4 I2 I1 I2 O2 = I8 I2 I1 + I2 I1' O1 = I1' O1 0 I4 I8 1 I1 0 I1 0 I1 I2 I4 I2 I4 utumn 2000 SE370 - IV - ombinational Logic Optimization 24

efinition of terms for two-level simplification! Implicant " single element of ON-set or -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 " -set used to form prime implicants but not to make implicant essential! Objective: " grow implicant into prime implicants (minimize literals per term) " cover the ON-set with as few prime implicants as possible (minimize number of product terms) utumn 2000 SE370 - IV - ombinational Logic Optimization 25 Examples to illustrate terms 0 6 prime implicants: '', ',, '',, ' essential minimum cover: + ' + '' 5 prime implicants:, ',, ', '' essential minimum cover: 4 essential implicants utumn 2000 SE370 - IV - ombinational Logic Optimization 26

lgorithm for two-level simplification! lgorithm: minimum sum-of-products expression from a Karnaugh map " Step 1: choose an element of the ON-set " Step 2: find "maximal" groupings of 1s and s adjacent to that element consider top/bottom row, left/right column, and corner adjacencies this forms prime implicants (number of elements always a power of 2) " Repeat Steps 1 and 2 to find all prime implicants " Step 3: revisit the 1s in the K-map if covered by single prime implicant, it is essential, and participates in final cover 1s covered by essential prime implicant do not need to be revisited " Step 4: if there remain 1s not covered by essential prime implicants select the smallest number of prime implicants that cover the remaining 1s utumn 2000 SE370 - IV - ombinational Logic Optimization 27 lgorithm for two-level simplification (example) 1 1 1 0 0 0 0 2 primes around ''' 0 0 2 primes around ' 1 1 1 0 0 3 primes around ''' 0 0 2 essential primes 0 0 minimum cover (3 primes) utumn 2000 SE370 - IV - ombinational Logic Optimization 28

ctivity utumn 2000 SE370 - IV - ombinational Logic Optimization 29 ombinational logic optimization summary! lternate representations of oolean functions " cubes " karnaugh maps! Simplification " two-level simplification! Later (in SE 467) " automation of simplification " optimization of multi-level logic " verification/equivalence utumn 2000 SE370 - IV - ombinational Logic Optimization 30