UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.

Slides:



Advertisements
Similar presentations
Techniques for Combinational Logic Optimization
Advertisements

FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary)
Logical Systems Synthesis.
ECE 3110: Introduction to Digital Systems Simplifying Sum of Products using Karnaugh Maps.
Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table.
KARNAUGH MAP Introduction Strategy for Minimization Minimization of Product-of-Sums Forms Minimization of More Complex Expressions Don't care Terms 1.
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE 301 – Digital Electronics Minterm and Maxterm Expansions and Incompletely Specified Functions (Lecture #6) The slides included herein were taken from.
ECE 331 – Digital System Design
Chapter 3 Simplification of Switching Functions
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
Example: Given a 4-bit input combination N=N 3 N 2 N 1 N 0, this function produces a 1 output for N=1,2,3,5,7,11,13, and 0 otherwise.  According to the.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Canonical Forms and Logic Miniminization
ECE 331 – Digital System Design Karnaugh Maps and Determining a Minimal Cover (Lecture #7) The slides included herein were taken from the materials accompanying.
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
EECC341 - Shaaban #1 Lec # 7 Winter Combinational Circuit Minimization Canonical sum and product logic expressions do not provide a circuit.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Two Level Logic Optimization. Two-Level Logic Minimization PLA Implementation Ex: F 0 = A + B’C’ F 1 = AC’ + AB F 2 = B’C’ + AB product term AB, AC’,
Chapter 2: Boolean Algebra and Logic Functions
Lecture 3: Incompletely Specified Functions and K Maps CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
Department of Computer Engineering
The covering procedure. Remove rows with essential PI’s and any columns with x’s in those rows.
1 Digital Logic Design Week 5 Simplifying logic expressions.
EE 261 – Introduction to Logic Circuits
Boolean Algebra 1854, George Boole created a two valued algebraic system which is now called Boolean algebra. 1938, Claude Shannon adapted Boolean algebra.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
ECE 3110: Introduction to Digital Systems Symplifying Products of sums using Karnaugh Maps.
Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Chapter3: Gate-Level Minimization Part 1 Origionally By Reham S. Al-Majed Imam Muhammad Bin Saud University.
07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
LOGIC GATES & BOOLEAN ALGEBRA
Unit 1 Minimization Techniques and Logic Gates. Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
ECE 3110: Introduction to Digital Systems
Fundamentals of digital electronics Prepared by - Anuradha Tandon Assistant Professor, Instrumentation & Control Engineering Branch, IT, NU.
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table.
C.S.Choy39 TERMINOLOGY Minterm –product term containing all input variables of a function in either true or complementary form Maxterm – sum term containing.
CSE 140: Components and Design Techniques for Digital Systems Lecture 3: Incompletely Specified Functions and K Maps CK Cheng Dept. of Computer Science.
Logic Simplification-Using K-Maps
1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
Lecture # 5 University of Tehran
EECS 270 Lecture 10. K-map “rules” – Only circle adjacent cells (remember edges are adjacent!) – Only circle groups that are powers of 2 (1, 2,
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
CHAPTER 3 Simplification of Boolean Functions
ECE 2110: Introduction to Digital Systems
Computer Organisation
ECE 3110: Introduction to Digital Systems
ECE 2110: Introduction to Digital Systems
ECE 331 – Digital System Design
EEL 3705 / 3705L Digital Logic Design
Instructor: Alexander Stoytchev
ECE 331 – Digital System Design
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
ECE 331 – Digital System Design
Presentation transcript:

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria –Area (roughly number of transistors) –Delay (roughly number of gates on longest circuit path) –Testability –Power consumption 2-Level Synthesis –Classical (Exact) –Heuristic (Non-Exact) Multilevel Synthesis

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Expressions  Circuits

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah 2-Level Circuits Assumptions: –Inputs are available in both true and complemented forms (reasonable assumption: FF outputs are available in both phases) –Gates have no fan-in or fan-out restrictions (unreasonable assumption: typically FI < 4, FO < 6) Correspond to SOP or POS forms of a switching function: –SOP  AND/OR (NAND/NAND) –POS  OR/AND (NOR/NOR) # of 1st level AND (OR) gates = # of nontrivial product (sum) terms Fan-in of 2nd level OR (AND) gate = total # of product (sum) terms Usually implemented using regular structures: –Read-Only Memories (ROMs) –Programmable Logic Arrays (PLAs)

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah AND/OR  NAND/NAND

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Terminology Review Literal: A variable or its complement –Ex: Product Term: A single literal or a product of two or more literals –Ex: Sum of Products: A sum of product terms Minterm: A product term where every variable of the function appears once as a literal (i.e., in complemented or uncomplemented form) Canonical Sum: A sum of minterms. Every function has a unique canonical sum

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Canonical Sum Representations Canonical sum uniquely defines a function, but can be long. A minterm list is a list of the row numbers of minterms included in the canonical sum. –Also known as the on-set Three canonical ways of representing functions –truth table –canonical sum –minterm list

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Canonical Product Representation Sum Term: A single literal or a sum of two or more literals Product of Sums: A product of sum terms Maxterm: A sum term where every variable in the function appears once as a literal Canonical Product: A product of maxterms Maxterm List: A list of the truth table row numbers of the maxterms of a function –Also known as the off-set

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Canonical Sum: Circuit: Cost of implementation: 3 3-input ANDs (9 literals) input OR

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Canonical sum is not (in general) the least-cost way to implement a function How to get smaller circuits? –One way: Switching algebra theorems! Cost: 2 2-input ANDs (4 literals) input OR! Applying theorems directly becomes more difficult as canonical sums get bigger… –Another (perhaps easier) way: Karnaugh maps Idempotency Combining

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Karnaugh Maps Karnaugh map (K-map) is a 2D representation of truth table that present a graphical way to find the minimal SOP (or POS) of a function –Each cell represents a minterm –Cells with a common edge are logically adjacent (i.e., they will combine) –K-map is actually a doughnut: outside edges connect We’ll omit 0s for clarity 11 and 10 are swapped!

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Key K-map property: adjacent cells represent minterms that will combine! Minimal SOP:

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Four Variable K-map How do we find the product terms to include in the minimal SOP?

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah K-map “rules” –Only circle adjacent cells (remember edges are adjacent!) –Only circle groups that are powers of 2 (1, 2, 4, 8, …) –Only circle 1-cells

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Covering g = input combinations for which g outputs 1 Space of all 2 n input combinations (minterms) f = input combinations for which f outputs 1 f covers g if f=1 whenever g=1 f ≥ g

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Implicants g = input combinations for which g outputs 1 h f = input combinations for which f outputs 1 If g is a product term & g≤f, Then g is an implicant of f. Space of all 2 n input combinations (minterms) = input combinations for which h outputs 1

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Prime Implicants Removing a literal from any product term (any implicant) makes it cover twice as many minterms. –Removing a literal “grows” the term –ex. 3 variables:ab’c covers 1 minterm ab’ aceach cover 2 minterms b’c f ab’c ab’ ac b’c Any way of removing a literal makes ab’c no longer imply f. So ab’c is a prime implicant of f. Any way of removing a literal makes ab’c no longer imply f. So ab’c is a prime implicant of f. ab’c is an implicant of f.

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Implicant: Any product term that implies a function F (i.e., if, for some input combination, product term P = 1, then F = 1 for the same input combination) Prime Implicant: An implicant such that if one literal is removed, the resulting product term no longer implies F Essential Prime Implicant: A prime implicant that covers a minterm that is not covered by any other prime implicants Theorem: The minimal SOP of a function is a sum of prime implicants These are only a few of the implicants of this function…

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah K-map minimization procedure : 1)Find all prime implicants (PIs) 2)Determine which PIs are essential prime implicants (EPIs) and include those in the minimal SOP. Remove all EPIs and the 1-cells they cover 3)Remove all PIs that are eclipsed (dominated) –Prime implicant X eclipses prime implicant Y if X covers at least all of the 1-cells that Y covers 4)Find secondary EPIs, include secondary-EPIs in minimal SOP, and remove 1-cells they cover. If there are any 1-cells remaining, goto step 3 Note: If, at any stage, there are no remaining EPIs, all remaining combinations of PIs must be considered for the minimal SOP

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah In Class Exercise Find the minimal SOP for the following function:

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah In Class Exercise Find the minimal SOP for the following function: The minimal SOP may not always be unique! or

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Using K-maps to find minimal POS 1)Find minimal SOP for F 2)Use DeMorgan’s to get minimal POS for F

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Don’t Care Outputs Sometimes when designing a function, some input combinations may never occur Design Example - Encoder: Converts 3-bit one-hot code to equivalent binary code How to assign unused input combinations? 6 literals 4 literals Don’t cares allow us to easily assign 1 or 0 to unused input combinations in order to minimize implementation cost!

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah When finding minimal SOP with don’t cares: –U–Use d cells to make PIs as large as possible –N–No prime implicant should include only d’s –O–Only 1-cells should be considered when finding minimal covering set of PIs

Minimal SOP vs. Minimal POS w/ Don’t Cares F SOP has a smaller literal cost than F POS WXYZ = 1110: When don’t cares are involved, in general the minimal SOP for a function is not equal to the minimal POS for the function –But that’s ok! We don’t care about the input combinations where they differ… F SOP (1,1,1,0) = 1, F POS (1,1,1,0) = 0 → F SOP ≠ F POS !!!

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah 5 Variable K-Maps Every cell is adjacent to 5 other cells Keep life simple by splitting on the MSB!

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah

Tabular Generation of Prime Implicants (Quine-McCluskey Procedure) Main Theorems: –Adjacency: x’ p + x p = p (create “larger” implicants) –Absorption: p + x p = p (delete subsumed implicants) Procedure: –Arrange product terms in groups such that all terms in one group have the same number of 1s in their binary representation, their Group Index –Starting from minterms, arrange groups in ascending-index order –Apply adjacency theorem to product terms from adjacent groups only –Remove subsumed product terms using absorption theorem Product term representation: p = p n p n-1 … p 2 p 1 where

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah QM Example indexmintermABCDE ptermABCDE

UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah QM Example indexmintermABCDE ptermABCDE 1, , , , , ,