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

Similar documents
Chapter 4 Optimized Implementation of Logic Functions

CS 226: Digital Logic Design

14:332:231 DIGITAL LOGIC DESIGN

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

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

CMSC 313 Preview Slides

This form sometimes used in logic circuit, example:

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

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

Logic Design. Chapter 2: Introduction to Logic Circuits

Logic Design 2013/9/26. Introduction. Chapter 4: Optimized Implementation of Logic Functions. K-map

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

Unit 2 Session - 6 Combinational Logic Circuits

211: Computer Architecture Summer 2016

Chapter 2: Switching Algebra and Logic Circuits

WEEK 3.1 MORE ON KARNAUGH MAPS

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

SYNCHRONOUS SEQUENTIAL CIRCUITS

Combinational Logic (mostly review!)

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

Combinational Logic. Review of Combinational Logic 1

Digital Circuit And Logic Design I. Lecture 3

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

EEE130 Digital Electronics I Lecture #4

CHAPTER III BOOLEAN ALGEBRA

Review for Test 1 : Ch1 5

Chapter 2 Combinational logic

Lecture A: Logic Design and Gates

Combinatorial Logic Design Principles

Possible logic functions of two variables

CHAPTER III BOOLEAN ALGEBRA

Chapter 2 Combinational Logic Circuits

Boolean Algebra and Logic Simplification

Chapter 7 Logic Circuits

Week-I. Combinational Logic & Circuits

CPE100: Digital Logic Design I

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

Digital Logic Design. Combinational Logic

Chapter 2 Combinational Logic Circuits

ELCT201: DIGITAL LOGIC DESIGN

Logic Design Combinational Circuits. Digital Computer Design

Chap 2. Combinational Logic Circuits

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

Lecture 2 Review on Digital Logic (Part 1)

CprE 281: Digital Logic

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

Gate-Level Minimization

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

Part 1: Digital Logic and Gates. Analog vs. Digital waveforms. The digital advantage. In real life...

WEEK 2.1 BOOLEAN ALGEBRA

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

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

Digital Circuit And Logic Design I. Lecture 4

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

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

Standard Expression Forms

Combinational Logic Circuits Part II -Theoretical Foundations

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Chapter 2 Combinational Logic Circuits

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

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

CSE 140 Midterm I - Solution

MC9211 Computer Organization

Chapter 2 Boolean Algebra and Logic Gates

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

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

Optimizations and Tradeoffs. Combinational Logic Optimization

Computer Organization I. Lecture 13: Design of Combinational Logic Circuits

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

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

12/31/2010. Overview. 10-Combinational Circuit Design Text: Unit 8. Limited Fan-in. Limited Fan-in. Limited Fan-in. Limited Fan-in

Boolean Algebra & Logic Gates. By : Ali Mustafa

Simpler Functions for Decompositions

Fundamentals of Computer Systems

DO NOT COPY DO NOT COPY

EC-121 Digital Logic Design

CHAPTER1: Digital Logic Circuits Combination Circuits

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

Chapter 2 Boolean Algebra and Logic Gates

Goals for Lecture. Binary Logic and Gates (MK 2.1) Binary Variables. Notation Examples. Logical Operations

Digital Design. Digital Design

ELC224C. Karnaugh Maps

EECS Variable Logic Functions

Computer Organization I

Fundamentals of Computer Systems

Fundamentals of Computer Systems

Number System conversions

Lecture 5. Karnaugh-Map

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

COSC3330 Computer Architecture Lecture 2. Combinational Logic

CHAPTER 7 MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

Combinational Logic Fundamentals

CprE 281: Digital Logic

CprE 281: Digital Logic

ENG2410 Digital Design Combinational Logic Circuits

Chapter 2 Boolean Algebra and Logic Gates

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

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

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

Transcription:

Motivation CS/EE 37 : Funamentals o Digital System Design Chris J. Myers Lecture 4: Logic Optimization Chapter 4 Algebraic manipulation is not systematic. This chapter presents methos that can be automate in CAD tools. Although tools use or logic optimization, esigners must unerstan the process. Figure 4. The unction = Σ m(, 2, 4, 5, 6) x x 2 m m m 2 m 3 x m m 2 m m 3 (a) Truth table (b) Karnaugh map Figure 4.2 Location o two-variable minterms Figure 2.5 A unction to be synthesize x m m m 2 m 3 m 4 m 5 m 6 m 7 x m m m 3 m 2 m 6 m 7 (b) Karnaugh map m 4 m 5 (a) Truth table Figure 4.4 Location o three-variable minterms

x x x x 2 3 m m m 5 m 3 m 2 m 6 m 4 m 2 m 3 m 8 m 9 m 7 m 5 m m 4 m x Figure 4.6 A our-variable Karnaugh map x x 2

x x x = 5 x x = 5 Figure 4.8 A ive-variable Karnaugh map Terminology A variable either uncomplemente our complemente is calle a literal. A prouct term that inicates when a unction is equal to is calle an implicant. An implicant that cannot have any literal elete an still be a vali implicant is calle a prime implicant. x x 2 Figure 4.9 Three-variable unction = Σ m(,, 2, 3, 7) Terminology (cont) A collection o implicants that accounts or all input combinations in which a unction evaluates to is calle a cover. An essential prime implicant inclues a minterm covere by no other prime. Cost is number o gates plus number o gate inputs. Assume primary inputs available in both true an complemente orm. Minimization Proceure Generate all prime implicants. Fin all essential prime implicants. I essential primes o not orm a cover, then select minimal set o non-essential primes. 3

x x Figure 4. Four-variable unction = Σ m(2, 3, 5, 6, 7,,, 3, 4) Figure 4. The unction = Σ m(, 4, 8,,, 2, 3, 5) x Minimization o POS Forms Fin a cover o the s an orm maxterms. x x x 2 3. Figure 4.2 The unction = Σ m(, 2, 4, 5,,, 3, 5) x x x x 2 3 4 Incompletely Speciie Functions Oten certain input conitions cannot occur. Impossible inputs are calle on t cares. A unction with on t cares is calle an incompletely speciie unction. Don t cares can be use to improve the quality o the logic esigne. Figure 4.4 POS minimization o = Π M(,, 4, 8, 9, 2, 5) 4

x x Figure 4.5 Two implementations o = Σ m(2, 4, 5, 6, ) + D(2, 3, 4, 5) Figure 4.5 Two implementations o = Σ m(2, 4, 5, 6, ) + D(2, 3, 4, 5) Multiple-Output Circuits Necessary to implement multiple unctions. Circuits can be combine to obtain lower cost solution by sharing some gates. x (a) Function x (b) Function 2 Figure 4.6 An example o multiple-output synthesis x x 2 (c) Combine circuit or an 2 x (a) Optimal realization o 3 (b) Optimal realization o 4 Figure 4.7 An example o multiple-output synthesis x 5

x x (c) Optimal realization o 3 an 4 together x x x 3 4 () Combine circuit or 3 an 4 Figure 4.7 An example o multiple-output synthesis x x 3 (a) Function x x 3 (b) Function 2 x (a) Optimal realization o x 3 (b) Optimal realization o 4 x x (a) x = x + x x x x x (b) x + = x x x Figure 4.8 DeMorgan s theorem in terms o logic gates Figure 4.9 Using NAND gates to implement a sum-o-proucts 6

x x Multilevel Synthesis x SOP or POS circuits have 2-levels o gates. Only eicient or unctions with ew inputs. Many inputs can lea to an-in problems. Multilevel circuits can also be more area eicient. Figure 4.2 Using NOR gates to implement a prouct-o-sums (rom interconnection wires) x unuse PAL-like block D Q x x A x 6 C x 5 E C B x 7 A B D D E Figure 4.2 Implementation in a CPLD Figure 4.22 Implementation in an FPGA 7 inputs x Figure 4.23 Using 4-input AND gates to realize a 7-input prouct term Figure 4.24 A actore circuit 7

Example 4.5 x 2 Figure 4.25 A multilevel circuit Impact on Wiring Complexity Space on chip is use by gates an wires. Wires can be a signiicant portion. Each literal correspons to a wire. Factoring reuces literal count, so it can also reuce wiring complexity. Functional Decomposition Multilevel circuits oten require less area. Complexity is reuce by ecomposing 2-level unction into subcircuits. Subcircuit implements unction that may be use in multiple places. Example 4.6 x g Figure 4.26 A multilevel circuit 8

x x x g x g = = h Figure 4.27 The structure o a ecomposition x x x g x (a) Sum-o-proucts implementation k x (b) NAND gate implementation Figure 4.28 An example o ecomposition Figure 4.29 a Implementation o XOR Example 4.8 = x = x + x = x (x + ) + (x + ) x g x (c) Optimal NAND gate implementation Figure 4.29 b Implementation o XOR 9

Practical Issues Functional ecomposition can be use to implement general logic unctions in circuits with built-in constraints. Enormous numbers o possible subunctions leas to necessity or heuristic algorithms. x x (a) Circuit with AND an OR gates (b) Inversions neee to convert tonands Figure 4.3 Conversion to a NAND-gate circuit x x (b) Inversions neee to convert tonands x (a) Circuit with AND an OR gates x (a) Inversions neee to convert tonors Figure 4.3 Conversion to a NAND-gate circuit Figure 4.3 Conversion to a NOR-gate circuit x x P P 3 P 4 P 5 x P 2 Figure 4.3 Conversion to a NOR-gate circuit Figure 4.32 Circuit example or analysis

x P P 9 x P x P2 x2 P 4 x3 P 3 x3 P 2 P 3 P 7 P 6 P 8 P x4 (a) NAND-gate circuit x4 x5 (b) Moving bubbles to convert to ANDs an ORs P 5 x x2 x3 x4 x5 (c) Circuit with AND an OR gates Figure 4.33 Circuit example or analysis Figure 4.34 Circuit example or analysis x P P 2 P 4 CAD Tools P 3 espresso ins exact an heuristic solutions to the 2-level synthesis problem. sis perorms multilevel logic synthesis. Numerous commercial CAD packages are available rom Caence, Mentor, Synopsys, an others. Figure 4.35 Circuit example or analysis Design conception Design entry, initial synthesis, an unctional simulation (see section 2.8) Logic synthesis/optimization Physical esign Timing simulation No Design correct? Yes Chip coniguration Figure 4.46 A complete CAD system Figure 4.42 VHDL coe or the unction = Σ m(, 4, 5, 6)

Physical Design Physical esign etermines how logic is to be implemente in the target technology. Placement etermines where in target evice a logic unction is realize. Routing etermines how evices are to be interconnecte using wires. Figure 4.43 Logic synthesis options in MAX+PLUS II Timing Simulation Functional simulation oes not consier signal propagation elays. Ater physical esign, more accurate timing inormation is available. Timing simulation can be use to check i a esign meets perormance requirements. Figure 4.44 Results o physical esign Design conception Design entry, initial synthesis, an unctional simulation (see section 2.8) (a) Timing in an FPGA Logic synthesis/optimization Physical esign Timing simulation No Design correct? Yes (b) Timing in a CPLD Chip coniguration Figure 4.45 Timing simulation results Figure 4.46 A complete CAD system 2

STD_LOGIC type Deine in ieee.st_logic_64 package. Enumerate type with 9 values. strong one strong zero X strong unknown Z high impeence H weak one W weak unknown L weak zero U uninitialize - on t care We will almost always use STD_LOGIC. Figure 4.47 VHDL coe using STD_LOGIC (rom interconnection wires) x unuse PAL-like block D Q Figure 4.48 VHDL coe or the unction = Σ m(, 2, 4, 5, 6) Figure 4.49 Implementation o the VHDL coe or the unction = Σ m(, 2, 4, 5, 6) (rom interconnection wires) x unuse i i 2 i 3 i 4 PAL-like block D Q x i i 2 i 3 i 4 LUT Figure 4.5 Implementation using XOR synthesis ( = x ) Figure 4.5 VHDL coe or = Σ m(, 2, 4, 5, 6) implemente in a LUT 3

Figure 4.52 The VHDL coe or = Σ m(2, 3, 9,,, 3) Figure 4.53 VHDL coe or a 7-variable unction x x x x + Logic Function Representation x x (a) Sum-o-proucts realization (b) Factore realization Truth tables Algebraic expressions Venn iagrams Karnaugh maps n-imensional cubes Figure 4.54 Two implementations o a 7-variable unction x x x x x x xx x x x x Figure 4.36 Representation o = Σ m(, 2, 3) Figure 4.37 Representation o = Σ m(, 2, 4, 5, 6) 4

n-dimensional Hypercube xx x xx Function o n variables maps to n-cube. Size o a cube is number o vertices. A cube with k x s consists o 2 k vertices. n-cube has 2 n vertices. 2 vertices are ajacent i they ier in one coorinate. Each vertex in n-cube ajacent to n others. Figure 4.38 Representation o = Σ m(, 2, 3, 6, 7, 8,, 5) C = A * B such that. C = i A i * B i = or more than one i. 2. Otherwise, C i = A i * B i when A i * B i an C i = x or the coorinate where A i * B i =. B A i i x x o o x A i * B i Using *-operation to Fin Primes is speciie using a set o cubes, C k o. Let c i an c j be any two cubes in C k. Apply *-operation to all pairs o cubes in C k : G k+ = c i * c j or all c i, c j in C k Form new cover or as ollows: C k+ = C k G k+ reunant cubes A is reunant i exists a B s.t. A i = B i or B i = x or all i. Repeat until C k+ = C k. Figure 4.39 The coorinate *-operation Example 4.4 Example 4.5 5

C = A # B, such that. C = A i A i # B i = or some i. 2. C = i A i # B i = ε or all i. 3. Otherwise, C = i (A, A 2,..., B i,... A n ), where the union is or all i or which A i = x an B i x. B A i i x x ε o ε o ε ε ε A i # B i Fining Essential Primes Let P be set o all prime implicants. Let p i enote one prime implicant in P. Let DC enote the on t cares vertices or. Then p i is an essential prime implicant i: p i # (P p i ) # DC Figure 4.4 The coorinate #-operation Example 4.6 Example 4.7 Proceure to Fin Minimal Cover Let C = ON DC be the initial cover o. Fin all primes, P, o C using *-operation. Fin the essential primes using #-operation. I essentials cover ON-set then one else Delete any nonessential prime that is more expensive than some other prime. Use branching technique to select lowest cost primes which cover ON-set. x x = = Figure 4.4 An example our-variable unction 6

Summary Describe 2-level logic synthesis methos. Discusse multilevel logic synthesis. Introuce CAD tools or logic synthesis. 7