Penn ESE534 Spring2012 -- DeHon 1 ESE534: Computer Organization Day 2: January 18, 2012 Universality, Gates, Logic Work Preclass Exercise.

Slides:



Advertisements
Similar presentations
FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary)
Advertisements

Modular Combinational Logic
Penn ESE534 Spring DeHon 1 ESE534: Computer Organization Day 14: March 19, 2014 Compute 2: Cascades, ALUs, PLAs.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
Caltech CS184a Fall DeHon1 CS184a: Computer Architecture (Structures and Organization) Day2: September 27, 2000 Logic, Gate, FSMs.
ECE 667 Synthesis and Verification of Digital Systems
ECE 331 – Digital System Design
EDA (CS286.5b) Day 15 Logic Synthesis: Two-Level.
Technology Mapping.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 2: January 23, 2008 Covering.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 4: February 25, 2009 Two-Level Logic-Synthesis.
Penn ESE Fall DeHon 1 ESE (ESE534): Computer Organization Day 19: March 26, 2007 Retime 1: Transformations.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 11, 2008 Static Timing Analysis and Multi-Level Speedup.
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 11: February 14, 2007 Compute 1: LUTs.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 16: March 23, 2009 Covering.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 11, 2009 Dataflow.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 2: January 10, 2007 Logic and FSM Review.
Canonical Forms and Logic Miniminization
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 18, 2009 Static Timing Analysis and Multi-Level Speedup.
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 5: January 24, 2007 ALUs, Virtualization…
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 13, 2008 Retiming.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
EEE324 Digital Electronics Ian McCrumRoom 5B18, Lecture 4: Boolean Algebra.
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.
Department of Computer Engineering
Penn ESE534 Spring DeHon 1 ESE534: Computer Organization Day 9: February 24, 2014 Operator Sharing, Virtualization, Programmable Architectures.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 2: January 26, 2015 Covering Work preclass exercise.
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Optimization Algorithm
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 19: April 6, 2015 Two-Level Logic-Synthesis.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 4: October 5, 2005 Two-Level Logic-Synthesis.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Caltech CS184 Winter DeHon CS184a: Computer Architecture (Structure and Organization) Day 2: January 8, 2003 Logic and FSM Review.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
ITEC 352 Lecture 3 Low level components(2). Low-level components Review Electricity Transistors Gates Really simple circuit.
05 BA2 Page 1 ECEn/CS 224 Boolean Algebra – Part 2.
Penn ESE534 Spring DeHon 1 ESE534: Computer Organization Day 2: January 20, 2010 Universality, Gates, Logic Work Preclass Exercise.
Penn ESE370 Fall DeHon 1 ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems Day 22: October 31, 2011 Pass Transistor Logic.
Technology Mapping. 2 Technology mapping is the phase of logic synthesis when gates are selected from a technology library to implement the circuit. Technology.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 15: March 4, 2002 Two-Level Logic-Synthesis.
1 COMP541 Combinational Logic - 3 Montek Singh Jan 21, 2015.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect10: Two-level Logic Minimization.
Standard & Canonical Forms COE 202 Digital Logic Design Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd University of Petroleum.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 4, 2011 Static Timing Analysis and Multi-Level Speedup.
CBSSS 2002: DeHon Universal Programming Organization André DeHon Tuesday, June 18, 2002.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 13, 2013 High Level Synthesis II Dataflow Graph Sharing.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 2: September 28, 2005 Covering.
©2010 Cengage Learning SLIDES FOR CHAPTER 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use.
UNIT 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use the ESC key to exit this chapter. This.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
CHAPTER 3 Simplification of Boolean Functions
ESE534: Computer Organization
ECE 331 – Digital System Design
ESE535: Electronic Design Automation
Combinatorial Logic Circuit
Optimization Algorithm
Programmable Configurations
ESE535: Electronic Design Automation
Overview Part 2 – Circuit Optimization
ESE535: Electronic Design Automation
Technology Mapping I based on tree covering
ESE535: Electronic Design Automation
ECE 352 Digital System Fundamentals
ESE 150 – Digital Audio Basics
ECE 331 – Digital System Design
Presentation transcript:

Penn ESE534 Spring DeHon 1 ESE534: Computer Organization Day 2: January 18, 2012 Universality, Gates, Logic Work Preclass Exercise

Penn ESE534 Spring DeHon 2 Last Time Computational Design as an Engineering Discipline Importance of Costs

Penn ESE534 Spring DeHon 3 Today Simple abstract computing building blocks –gates, Boolean Equations –RTL Logic (at least the logic part) Universality Logic in Gates –optimization –properties –Costs

Preclass 1 Do the Case 1 circuits calculate the same thing? Case 2? Penn ESE534 Spring DeHon 4

General How do we define equivalence? –How do we determine if two circuits are equivalent? Penn ESE534 Spring DeHon 5

6 Model: Stateless Functions (Combinational Logic) Compute some “function” –f(i 0,i 1,…i n )  o 0,o 1,…o m Each unique input vector –implies a particular, deterministic, output vector

Boolean Equivalence Two functions are equivalent when –They have the same outputs for every input vector –i.e., they have the same truth table There is a canonical specification for a Boolean function –its Truth Table Penn ESE534 Spring DeHon 7

Boolean Logic  Gates Implement Boolean functions with gates –E.g. Problems 1 on preclass How does a gate relate to Boolean functions? Penn ESE534 Spring DeHon 8

9 Implementation in Gates Gate: small Boolean function Goal: assemble gates to cover our desired Boolean function –Combine small Boolean functions to implement arbitrarily large Boolean function Collection of gates should implement same function I.e. collection of gates and Boolean function should have same Truth Table

Penn ESE534 Spring DeHon 10 Netlist Netlist: collection of interconnected gates –A list of all the gates and what they are connected to –Net: set of terminals electrically connected together A D B C E i0 i1 i3 i2

Penn ESE534 Spring DeHon 11 Netlist Netlist: –A list of all the gates and what they are connected to A D B C E i0 i1 i3 i2 Netlist: A=nand i0 i1 C=nand i2 i3 B=nand A B D=nand A D E=nand B D

Penn ESE534 Spring DeHon 12 Boolean Equations o=/a*/b*c+/a*b*/c+a*b*/c+a*/b*c Another way to express Boolean functions a b c o

Penn ESE535 Spring DeHon 13 Terminology Literals -- a, /a, b, /b, …. –Qualified, single inputs Minterms -- –full set of literals covering one input case –in y=a*b+a*c a*b*c a*/b*c

Penn ESE534 Spring DeHon 14 Boolean Equations o=/a*/b*c+/a*b*/c+a*b*/c+a*/b*c Truth table has one row for each minterm a b c o

Penn ESE534 Spring DeHon 15 Boolean Equations o=/a*/b*c+/a*b*/c+a*b*/c+a*/b*c This particular equation has a an expression for every minterm whose output is a 1 a b c o

Boolean Equations Can be more compact: O=a*b*c*d*e+/a*/b*/c*/d*/e How many rows would truth table require? Often use in Register Transfer Language (RTL) expressions –Write logic (boolean equations) occur between registers Penn ESE534 Spring DeHon 16

Penn ESE534 Spring DeHon 17 If’s If (a*b + /a*/b) c=d else c=e t=a*b+/a*/b c=t*d + /t*e How does this turn into Boolean logic?

Penn ESE534 Spring DeHon 18 If  Mux Conversion Often convenient to think of IF’s as Multiplexers If (a*b + /a*/b) c=d else c=e

Penn ESE534 Spring DeHon 19 Muxes Mux: –Selects one of two (several) inputs based on control bit

Penn ESE534 Spring DeHon 20 Mux Logic Of course, Mux is just logic: –mux out = /s*a + s*b –Another small Boolean function Two views logically equivalent –mux view more natural/abstract when inputs are multibit values (datapaths)

Penn ESE534 Spring DeHon 21 Sum of Products o=/a*/b*c+/a*b*/c+a*b*/c+a*/b*c o=(a+b)(/b+/c) o a*b+a*/c+b*/c o=(a+/b)(b+c)+/b*/c o a*b+a*c+/b*c +/b*/c

Implementation How can I implement any Boolean function with gates? Penn ESE534 Spring DeHon 22

Implementation Start with truth table Single output {0, 1} –Use inverters to produce complements of inputs –For each input case (minterm) If output is a 1 –Develop an AND to detect that case »Decompose AND into gates –OR together all such minterms Decompose OR into gates Multiple outputs –Repeat for each output Penn ESE534 Spring DeHon 23

Universal set of primitives What primitives did we need to support previous implementation set? Conclude: can implement any Boolean function by a netlist of gates selected from a small set. Homework (pr3): How small can set be? Penn ESE534 Spring DeHon 24

Penn ESE534 Spring DeHon 25 Engineering Goal Minimize resources –area, gates Exploit structure of logic “An Engineer can do for a dime what everyone else can do for a dollar.”

Penn ESE534 Spring DeHon 26 Minimum Sum of Products o=/a*/b*c+/a*b*/c+a*b*/c+a*/b*c /b*c + b*/c

Penn ESE534 Spring DeHon 27 Minimum Sum of Products o=(a+b)(/b+/c) ab c a*/b+a*/c+b*/c a*/b + b*/c a*/b+a*/c+b*/c Term a*/c is redundant Note: Preclass 1

Penn ESE534 Spring DeHon 28 Least Cost is not always MSP o=(a+b)(c+d) 3 2-input gates –a*b+a*c+b*c +b*d –(a*b+a*c)+(b*c+b*d) 7 2-input gates Product of Sums smaller…

Logic Optimization There are many logical equivalent specifications for a function. Freedom to choose Exploit to select one that costs the least Potentially different from the one specified by the designer –Value of canonical form, equivalence Penn ESE534 Spring DeHon 29

Cheapest? Which of the equivalent solutions is cheapest depends on the cost model. Penn ESE534 Spring DeHon 30

Penn ESE534 Spring DeHon 31 Minimize Area (preclass 4) Area minimizing solutions depends on the technology cost structure

Penn ESE534 Spring DeHon 32 Minimize Area (preclass 4cd) –I1: ((a*b) + (c*d))*e*f –I2: ((a*b*e*f)+(c*d*e*f)) Area: –I1: 2*A(and2)+1*A(or2)+1*A(and3) –I2: 2*A(and4)+1*A(or2) all gates take unit area:  A(l2)=3 < A(l1)=4 gate size proportional to number of inputs:  A(I1)=2*2+2+3=9 < A(I2)=2*4+2=10

Penn ESE534 Spring DeHon 33 Best Solution Depends on Costs This is a simple instance of the general point: …When technology costs change  the optimal solution changes. In this case, we can develop an algorithm that takes the costs as a parameter.

Penn ESE534 Spring DeHon 34 Don’t Cares Sometimes will have incompletely specified functions: a b c o x x How should pick x’s to minimize area?

Penn ESE534 Spring DeHon 35 Don’t Cares Will want to pick don’t care values to minimize implementation costs: a b c o x x a b c o

Penn ESE534 Spring DeHon 36 Logic Optimization –Two Level Minimization –Covering w/ reconvergent fanout Can be formulated precisely and solved optimally –We can write programs to do this for us! Is formally a hard problem.

Penn ESE534 Spring DeHon 37 Logic Optimization is NP-hard Technically: NP-hard in general –Informally: unlikely we will be able to guarantee to solve the problem in time less than exponential in the number of inputs –Practically: 100s of inputs in seconds Most problems not exponential Cover how to attack in an ESE535 –can point you at rich literature –can find software to do it for you

Penn ESE534 Spring DeHon 38 Delay in Gates Simple model: –each gate contributes a fixed delay for passing through it –can be different delay for each gate type –e.g. inv = 10ps nand2=15ps nand3=20ps and2=25ps

Penn ESE534 Spring DeHon 39 Path Delay Simple Model: Delay along path is the sum of the delays of the gates in the path Path Delay = Delay(Or2)+Delay(Or2)

Penn ESE534 Spring DeHon 40 Critical Path Path lengths in circuit may differ Worst-case performance of circuit determined by the longest path Longest path designated Critical Path

Penn ESE534 Spring DeHon 41 Multiple Paths Path Delay = Delay(Or2)+Delay(Or2) Path Delay = Delay(Or2i1)+Delay(And2)+Delay(Or2)

Penn ESE534 Spring DeHon 42 Critical Path = Longest Path Delay = 2 Path Delay = 3

Penn ESE534 Spring DeHon 43 Critical Path There is always a set of critical paths –set such that the path length of the members is at least as long as any other path length May be many such paths

Penn ESE534 Spring DeHon 44 Delay also depend on Costs Delay: –I1: D(and2)+D(or2)+D(and3) –I2: D(and4)+D(or2)

Penn ESE534 Spring DeHon 45 Delay also depend on Costs (4f) Delay: –I1: D(and2)+D(or2)+D(and3) –I2: D(and4)+D(or2) D(and2)=22ps, D(and3)=27ps, D(and4)=33ps  D(I2)=63ps  D(I1)=79ps

Gate Delay Penn ESE534 Spring DeHon 46 Why delay increase with number inputs?

Penn ESE534 Spring DeHon 47 Delay also depend on Costs (4g) Delay: –I1: D(and2)+D(or2)+D(and3) –I2: D(and4)+D(or2) D(and2)=22ps, D(and3)=27ps, D(and4)=33ps  D(I2)=63ps < D(I1)=79ps D(and2)=22ps, D(and3)=27ps, D(and4)=55ps  D(I2)=79  D(I1)=85

Penn ESE534 Spring DeHon 48 Delay and Area Optimum Differ –I1: ((a*b) + (c*d))*e*f –I2: ((a*b*e*f)+(c*d*e*f)) D(and2)=22ps, D(and3)=27ps, D(and4)=33ps  D(I2)<D(I1) gate size proportional to number of inputs:  A(I1)<A(I2) Induced Tradeoff -- cannot always simultaneously minimize area and delay cost

Penn ESE534 Spring DeHon 49 Does delay in Gates make Sense? Consider a balanced tree of logic gates of depth (tree height) n. Does this have delay n? – (unit delay gates) How big is it? (unit gate area) Depth n

Penn ESE534 Spring DeHon 50 Does delay in Gates make Sense? Consider a balanced tree of logic gates of depth (tree height) n. Does this have delay n? – (unit delay gates) How big is it? (unit gate area) 2 n How long a side?

How long is a side? Penn ESE534 Spring DeHon 51

Penn ESE534 Spring DeHon 52 Delay in Gates make Sense? (continuing example) How big is it? (unit gate area) 2 n How long a side? Sqrt(2 n )= 2 (n/2) Minimum wire length from input to output?

Minimum wire length? Penn ESE534 Spring DeHon 53

Penn ESE534 Spring DeHon 54 Delay in Gates make Sense? (continuing example) How big is it? (unit gate area) 2 n How long a side? Sqrt(2 n )= 2 (n/2) Minimum wire length from input to output? –Ballpark ~ 2 (n/2) Delay relate to wire length? (hint: think speed of light limit) –Delay  wire length (if buffer properly)

Penn ESE534 Spring DeHon 55 Delay in Gates make Sense? Minimum wire length from input to output? –Ballpark ~ 2 (n/2) Delay relate to wire length? –Delay  wire length (if buffer properly) –Say: Delay=WireLength*c TotalDelay=n*Dgate + WireLength*c TotalDelay=n*Dgate+2 (n/2) *c

Penn ESE534 Spring DeHon 56 It’s not all about costs... …or maybe it is, just not always about a single, linear cost. Must manage complexity –Cost of developing/verifying design –Size of design can accomplish in fixed time (limited human brainpower) Today: human brainpower is most often the bottleneck resource limiting what we can build.

Penn ESE534 Spring DeHon 57 Admin: Reminder Slides on web (morning before class) –Post-class may updated if feedback/class indicates something unclear Reading: Monday’s on Blackboard Assignment 1 Due Monday –Beginning of class Piazza group created Feedback sheets

Penn ESE534 Spring DeHon 58 Big Ideas [MSB Ideas] Can implement any Boolean function in gates –Small set of gates are universal, allowing us to implement any Boolean function

Penn ESE534 Spring DeHon 59 Big Ideas [MSB-1 Ideas] Canonical representation for combinational logic Transformation –don’t have to implement the input literally –only have to achieve same semantics –trivial example: logic minimization Minimum depends on cost model Often tradeoff between costs (area-delay)