Lecture 5 Multilevel Logic Synthesis

Slides:



Advertisements
Similar presentations
Switching circuits Composed of switching elements called “gates” that implement logical blocks or switching expressions Positive logic convention (active.
Advertisements

Combinational Logic : NAND – NOR Gates CS370 – Spring 2003.
Boolean Algebra and Reduction Techniques
III - Working with Combinational Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Working with combinational logic Simplification  two-level.
Chapter # 3: Multi-Level Combinational Logic
MULTI-LEVEL GATE NETWORKS
CS 151 Digital Systems Design Lecture 11 NAND and XOR Implementations.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
ENGIN112 L11: NAND and XOR Implementation September 26, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 11 NAND and XOR Implementations.
Logic Synthesis 1 Outline –Logic Synthesis Problem –Logic Specification –Two-Level Logic Optimization Goal –Understand logic synthesis problem –Understand.
Lecture 14 Today we will Learn how to implement mathematical logical functions using logic gate circuitry, using Sum-of-products formulation NAND-NAND.
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Lecture 8 Arithmetic Logic Circuits
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.
ECE 331 – Digital System Design Multi-level Logic Circuits and NAND-NAND and NOR-NOR Circuits (Lecture #8) The slides included herein were taken from the.
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
EE 231 Digital Electronics Fall 01 Week 4-1 Multi-Level Logic: Conversion of Forms NAND-NAND and NOR-NOR Networks DeMorgan's Law: A + B = A B; A B = A.
Overview Part 1 – Design Procedure 3-1 Design Procedure
Digital Logic Design Adil Waheed. BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION AND gate F = A.B OR gate F = A + B NOT gate F = A NAND gate F = A.B NOR gate.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals with PLD Programming.
Unit 7 Multi-Level Gate Circuits / NAND and NOR Gates Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Chapter # 3: Multi-Level Combinational Logic
Overview of Chapter 3 °K-maps: an alternate approach to representing Boolean functions °K-map representation can be used to minimize Boolean functions.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Lecture 12 – Design Procedure.
1 Lecture 10 PLDs  ROMs Multilevel logic. 2 Read-only memories (ROMs) Two dimensional array of stored 1s and 0s  Input is an address  ROM decodes all.
Boolean Algebra and Digital Circuits
ECE 331 – Digital System Design
ECE 331 – Digital System Design NAND and NOR Circuits, Multi-level Logic Circuits, and Multiple-output Logic Circuits (Lecture #9) The slides included.
Digital Electronics Lecture 6 Combinational Logic Circuit Design.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
October 29, 2015 EASTERN MEDITERRANEAN UNIVERSITY1 Digital Logic Design I Gate-Level Minimization Mustafa Kemal Uyguroğlu.
Unit 7 Multi-Level Gate Circuits Nand and Nor Gates Fundamentals of Logic Design Roth and Kinny.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Logic Design CS221 1 st Term Logic-Circuit Implementation Cairo University Faculty of Computers and Information.
Gate-Level Minimization
ETE 204 – Digital Electronics
Chapter 3 Gate-level Minimization. 3-7 NAND and NOR Implementation Digital circuits are frequently constructed with NAND or NOR gates rather than with.
Multi-Level Gate Networks NAND and NOR Gates
CHAPTER 7 MULTI-LEVEL GATE CIRCUITS / NAND AND NOR GATES
LOGIC GATES & BOOLEAN ALGEBRA
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
1 K-Maps, Multi-level Circuits, Time Response Today: Reminder: Test #1, Thu 7-9pm K-map example, espressoFirst Hour: K-map example, espresso –Section 2.3.
CS 121 Digital Logic Design Gate-Level Minimization Chapter 3.
Lecture 09 NAND and XOR Implementations. Overview °Developing NAND circuits °Two-level implementations Convert from AND/OR to NAND (again!) °Multi-level.
Digital Integrated Circuit Design Laboratory Department of Computer Science and Information Engineering National Cheng Kung University Experiment on digital.
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
Floyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd Chapter 5 © 2008 Pearson Education.
Boolean Algebra and Reduction Techniques
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
No. 3-1 Chapter # 3: Multi-Level Combinational Logic.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
1 CS 352 Introduction to Logic Design Lecture 4 Ahmed Ezzat Multi-level Gate Circuits and Combinational Circuit Design Ch-7 + Ch-8.
CHAPTER 7 MULTI-LEVEL GATE CIRCUITS / NAND AND NOR GATES
Digital Fundamentals Floyd Chapter 5 Tenth Edition
CHAPTER 1 : INTRODUCTION
Digital Fundamentals Floyd Chapter 5 Tenth Edition
BASIC & COMBINATIONAL LOGIC CIRCUIT
CSE 370 – Winter Combinational Implementation - 1
EECS150 - Digital Design Lecture 7 - Boolean Algebra II
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Chapter 3 Overview • Multi-Level Logic
VLSI CAD Flow: Logic Synthesis, Placement and Routing Lecture 5
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Chapter 5 Combinational Logic Analysis
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Combinational Logic Circuit
Presentation transcript:

Lecture 5 Multilevel Logic Synthesis Hai Zhou ECE 303 Advanced Digital Logic Design Spring 2002 ECE C03 Lecture 5

Outline Mapping 2-level logic to NAND logic, NOR logic CAD Tools for Multilevel Logic: MIS Algorithm Factored forms Flattening READING: Katz 3.1, 3.2 ECE C03 Lecture 5

Multi-Level Logic: Advantages Reduced sum of products form: x = A D F + A E F + B D F + B E F + C D F + C E F + G 6 x 3-input AND gates + 1 x 7-input OR gate (may not exist!) 25 wires (19 literals plus 6 internal wires) A D 1 F A E 2 F A B B 1 D 3 C F B x D 2 3 x E 4 7 E 4 F F C G D 5 F Factored form: x = (A + B + C) (D + E) F + G 1 x 3-input OR gate, 2 x 2-input OR gates, 1 x 3-input AND gate 10 wires (7 literals plus 3 internal wires) C E 6 F G ECE C03 Lecture 5

Multi-Level Logic: Conversion of Forms NAND-NAND and NOR-NOR Networks DeMorgan's Law: (A + B)' = A' • B'; (A • B)' = A' + B' Written differently: A + B = (A' • B')'; (A • B) = (A' + B')' In other words, OR is the same as NAND with complemented inputs AND is the same as NOR with complemented inputs NAND is the same as OR with complemented inputs NOR is the same as AND with complemented inputs OR/NAND Equivalence A 1 A 1 B 1 B 1 A + B 1 A • B 1 A + B 1 A • B 1 A º A OR OR B B A º A Nand Nand B B ECE C03 Lecture 5

Multi-Level Logic: Conversion Between Forms AND/NOR Equivalence A 1 A 1 B 1 B 1 A • B 1 A + B 1 A • B 1 A + B 1 A º A AND AND B B A º A NOR NOR B B It is possible to convert from networks with ANDs and ORs to networks with NANDs and NORs by introducing the appropriate inversions ("bubbles") To preserve logic levels, each introduced "bubble" must be matched with a corresponding "bubble" ECE C03 Lecture 5

Map AND/OR network to NAND/NAND network B C D NAND A B C D NAND NAND ECE C03 Lecture 5

Map AND/OR Network to NOR/NOR Network \B NOR B Z Z C NOR NOR \C D \D Step 1 Step 2 Conserve "Bubbles" Conserve "Bubbles" ECE C03 Lecture 5

Map OR/AND Network to NAND/NAND Conserve Bubbles! Conserve Bubbles! ECE C03 Lecture 5

Multi-Level Logic: More than Two Levels ƒ = A (B + C D) + B C' Original AND-OR Network Introduction and Conservation of Bubbles Redrawn in terms of conventional NAND Gates ECE C03 Lecture 5

Multi-Level Logic: More than Two-Levels Conversion Example Original circuit Add double bubbles at inputs Distribute bubbles some mismatches Insert inverters to fix mismatches ECE C03 Lecture 5

Multi-Level Logic: AND-OR-Invert Block AOI Function: Three stage logic— AND, OR, Invert Multiple gates "packaged" as a single circuit block logical concept possible switch implementation AND OR Invert two-input two-stack 2x2 AOI Schematic Symbol 3x2 AOI Schematic Symbol ECE C03 Lecture 5

Multi-Level Logic: AND-OR-Invert Example: XOR implementation A xor B = A' B + A B' = ( ? )' AOI form (A' B + A B')' (A + B') (A' + B) (A B + A' B') General procedure to place in AOI form: Compute the complement in Sum of Products form by circling the 0's in the K-map! A 0 1 B 0 1 1 0 1 ƒ = (A' B' + A B)' ECE C03 Lecture 5

Multi-Level Logic: AND-OR-Invert Example: F = B C' + A C' + A B F' = A' B' + A' C + B' C Implemented by 2-input 3-stack AOI gate F = (A + B) (A + C') (B + C') F' = (B' + C) (A' + C) (A' + B') Implemented by 2-input 3-stack OAI gate F' K-map Example: 4-bit Equality Function Z = (A0 B0 + A0' B0') (A1 B1 + A1' B1') (A2 B2 + A2' B2') (A3 B3 + A3' B3') Each implemented in single 2x2 AOI gate ECE C03 Lecture 5

AOI Implementation of 4 bit Equality Checker High if A0 ° B0, Low if A0 = B0 A = B active low A1 B0 Conservation of bubbles B1 C0 If all inputs are low (asserted in negative logic) then Ai = Bi, i=0,...,3 Output Z asserted C1 NOR D0 D1 ECE C03 Lecture 5

Multi-Level Logic: CAD Tools for Simplification Multi-Level Optimization: 1. Factor out common sublogic (reduce fan-in, increase gate levels), subject to timing constraints 2. Map factored form onto library of gates 3. Minimize number of literals (correlates with number of wires) Factored Form: sum of products of sum of products . . . X = (A B + B' C) (C + D (E + A C')) + (D + E)(F G) ECE C03 Lecture 5

Multi-Level Logic: CAD Tools for Simplification Operations on Factored Forms: • Decompostion • Extraction • Factoring • Substitution • Collapsing Manipulate network by interactively issuing the appropriate instructions There exists no algorithm that guarantees "optimal" multi-level network will be obtained ECE C03 Lecture 5

Decomposition Take a single Boolean expression and replace with collection of new expressions: F = A B C + A B D + A' C' D' + B' C' D' F rewritten as: F = X Y + X' Y' X = A B Y = C + D (12 literals) (4 literals) A B C A A B B D F A F C C D D B C D Before Decomposition After Decomposition ECE C03 Lecture 5

Extraction Extraction: common intermediate subfunctions are factored out F = (A + B) C D + E G = (A + B) E' H = C D E can be re-written as: F = X Y + E G = X E' H = Y E X = A + B Y = C D (11 literals) (7 literals) "Kernels": primary divisors E A X A B B F F C Y C D D E G G A C B D H H E Before Extraction After Extraction ECE C03 Lecture 5

Factoring Factoring: expression in two level form re-expressed in multi-level form F = A C + A D + B C + B D + E can be rewritten as: F = (A + B) (C + D) + E (9 literals) (5 literals) A C A D A B B F F C C D B E D E Before Factoring After Factoring ECE C03 Lecture 5

Substitution Substitution: function G into function F, express F in terms of G F = A + B C G = A + B F rewritten in terms of G: F = G (A + C) (5 literals) (2 literals) Collapsing: reverse of substitution; use to eliminate levels to meet timing constraints F = G (A + C) = (A + B) (A + C) = A A + A C + A B + B C = A + B C ¦ ECE C03 Lecture 5

Another Example of Resubstitution Given a set of Boolean functions X = ac + ad + bc + bd + e Y = a + b This requires 11 literals The function Y is a divisor of X hence we can rewrite as X = Y(c+d) + e This requires 6 literals ECE C03 Lecture 5

Node Simplification During multilevel logic synthesis, the sum of products form of each expression needs to be minimized Example: F = af + bf + ag + cg + ade + bde + cde Conceptually you can think of this as using Karnaugh Maps, Quine McCluskey or ESPRESSO to simply these expressions using Boolean algebra F = a’b + ac + bc => a’b + bc ab 00 01 11 10 c 1 0 1 0 0 0 1 1 1 ECE C03 Lecture 5

MIS CAD Tool Session misII Session with the Full Adder UC Berkeley, MIS Release #2.1 (compiled 3-Mar-89 at 5:32 PM) misII> re full.adder misII> p {co} = a b ci + a b ci' + a b' ci + a' b ci {sum} = a b ci + a b' ci' + a' b ci' + a' b' ci misII> pf {co} = a b' ci + b (ci (a' + a) + a ci') {sum} = ci (a' b' + a b) + ci' (a b' + a' b) misII> sim1 * {co} = a b + a ci + b ci {co} = ci (b + a) + a b misII> gd * {co} = a [2] + b ci {sum} = a' [3]' + a [3] [2] = ci + b [3] = b' ci' + b ci read eqntott equations two level minimization good decomposition technology independent up to this point ECE C03 Lecture 5

MIS Script Session read library & perform technology mapping misII> rlib msu.genlib misII> map misII> pf [361] = b' ci' + a' [328] = b' [329] = ci' {co} = [328]' [329]' + [361]' [3] = b ci' + b' ci {sum} = [3] a' + [3]' a misII> pg [361] 1890:physical 32.00 [328] 1310:physical 16.00 [329] 1310:physical 16.00 {co} 1890:physical 32.00 [3] 2310:physical 40.00 {sum} 2310:physical 40.00 misII> pat ... using library delay model {sum} : arrival=( 2.2 2.2) {co} : arrival=( 2.2 2.2) [328] : arrival=( 1.2 1.2) [361] : arrival=( 1.2 1.2) [329] : arrival=( 1.2 1.2) [3] : arrival=( 1.2 1.2) ci : arrival=( 0.0 0.0) b : arrival=( 0.0 0.0) a : arrival=( 0.0 0.0) misII> quit % read library & perform technology mapping gates that implement the various nodes and their relative areas timing simulation unit delay plus 0.2 time units per fan-out ECE C03 Lecture 5

Multi-Level Logic: CAD Tools for Simplification misII and the MSU gate library Number Name Function 1310 inv A' 1120 nor2 (A+B)' 1130 nor3 (A+B+C)' 1140 nor4 (A+B+C+D)' 1220 nand2 (A•B)' 1230 nand3 (A•B•C)' 1240 nand4 (A•B•C•D)' 1660 and2/nand2 [A•B, (A•B)'] 1670 and3/nand3 [A•B•C, (A•B•C)'] 1680 and4/nand4 [A•B•C•D, (A•B•C•D)'] 1760 or2/nor2 [A+B, (A+B)'] 1770 or3/nor3 [A+B+C, (A+B+C)'] 1780 or4 (A+B+C+D) 1870 aoi22 (A•B + C•D)' 1880 aoi21 (A + B•C)' 1860 oai22 [(A + B)(C + D)]' 1890 oai21 [A (B + C)]' 1970 ao22 A•B + D•E 1810 ao222 A•B + C•D + E•F 1910 ao2222 A•B + C•D + E•F + G•H 1930 ao33 A•B•C + D•E•F 2310 xor2 A•B' + A'•B 2350 xnor2 A•B + A'•B' VLSI Standard Cells B [3] CI SUM 2310 A 2310 A [361] B & + CI + CO & 1890 1890 [328] B 1310 [329] CI 1310 NOTE: OR-AND-INVERT equivalent to INVERT-AND-OR ECE C03 Lecture 5

More Examples of MIS mis with standard simplification script: misII -f script -t pla <espresso truth table file> Full Adder: mis pla style outputs .model full.adder .inputs a b ci .outputs sum co .names a b ci co sum 1--0 1 -1-0 1 --10 1 111- 1 .names a b ci co 11- 1 1-1 1 -11 1 .end input variables output variable SUM = A CO' + B CO' + CI CO' + A B CI (9 literals) CO = A B + A CI + B CI (6 literals) Note that A xor B xor CI = A' B' CI + A B' CI' + A' B CI' + A B CI (12 literals!) ECE C03 Lecture 5

MIS Output of Full Adder B B CO A CI SUM CI B CI A B CI Multilevel Implementation of Full Adder: 5 Logic Levels! ECE C03 Lecture 5

MIS Implementation of Two-Bit Adder Z = B' D + B D' + A' C D' [22] = A D Z' X = [22] + A C + C Z' Y = A X + C [22] + B C X' + C D X' + D X' Z' .inputs a b c d .outputs x y z .names a c z [22] x ---1 1 11-- 1 -10- 1 .names a b c d x z [22] y 1---0-- 1 --1---1 1 -11-0-- 1 --110-- 1 ---100- 1 .names a b c d z -0-1 1 -1-0 1 0-10 1 .names a d z [22] 110 1 .end \X [22] B C D Z A A X A Y A Mis Output 8 logic levels! ECE C03 Lecture 5

MIS Implementation of BCD Incrementer .model bcd.increment .inputs a b c d .outputs w x y z .names a b c d z w 1---1 1 0111- 1 .names a b c w z x 01-0- 1 0-100 1 .names a c z y -11 1 000 1 .names a b c d z 0--0 1 -000 1 .end Z = A' D' + B' C' D' Y = C Z + A' C' Z' W = A Z + A' B C D X = A' B W' + A' C W' Z' A W \A B Mis Output C D \A \A B \D Z C Y X \B \A \C \A C \D \C ECE C03 Lecture 5

Summary Mapping 2-level logic to NAND logic, NOR logic CAD Tools for Multilevel Logic: MIS Algorithm Factored forms Flattening NEXT LECTURE: Arithmetic Logic Circuits READING: Katz 5.2.1, 5.2.2, 5.2.4, 5.3, 4.6 ECE C03 Lecture 5