Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No. 11-1 Chapter # 3: Multi-Level Combinational Logic 3.3 and 3.4 -- Time Response.

Slides:



Advertisements
Similar presentations
CS370 – Spring 2003 Hazards/Glitches. Time Response in Combinational Networks Gate Delays and Timing Waveforms Hazards/Glitches and How To Avoid Them.
Advertisements

ECE C03 Lecture 71 Lecture 7 Delays and Timing in Multilevel Logic Synthesis Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
1 ECE 4436ECE 5367 Computer Arithmetic I-II. 2 ECE 4436ECE 5367 Addition concepts 1 bit adder –2 inputs for the operands. –Third input – carry in from.
Introduction So far, we have studied the basic skills of designing combinational and sequential logic using schematic and Verilog-HDL Now, we are going.
Chapter 4 -- Modular Combinational Logic. Decoders.
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
ECE 3110: Introduction to Digital Systems
1 Lecture 12: Hardware for Arithmetic Today’s topics:  Designing an ALU  Carry-lookahead adder Reminder: Assignment 5 will be posted in a couple of days.
Comparator.
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
ECE 331 – Digital System Design
EECS Components and Design Techniques for Digital Systems Lec 17 – Addition, Subtraction, and Negative Numbers David Culler Electrical Engineering.
Chapter # 3: Multi-Level Combinational Logic
EECC341 - Shaaban #1 Lec # 8 Winter Combinational Logic Circuit Transient Vs. Steady-state Output Gate propagation delay: The time between.
Give qualifications of instructors: DAP
Asynchronous Sequential Logic
1 Lecture 4: Arithmetic for Computers (Part 3) CS 447 Jason Bakos.
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Chapter # 5: Arithmetic Circuits Contemporary Logic Design Randy H
Lecture 8 Arithmetic Logic Circuits
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
ECE C03 Lecture 61 Lecture 6 Delays and Timing in Multilevel Logic Synthesis Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
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.

CS 151 Digital Systems Design Lecture 32 Hazards
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Chapter # 3: Multi-Level Combinational Logic
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Abdullah Aldahami ( ) Feb26, Introduction 2. Feedback Switch Logic 3. Arithmetic Logic Unit Architecture a.Ripple-Carry Adder b.Kogge-Stone.
Digital Arithmetic and Arithmetic Circuits
Fall 2004EE 3563 Digital Systems Design EE 3563 Comparators  Comparators determine if two binary inputs are equal  Some will signal greater than/less.
Chapter # 5: Arithmetic Circuits
Chapter 6-1 ALU, Adder and Subtractor
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
5-1 Programmable and Steering Logic Chapter # 5: Arithmetic Circuits.
1 Digital Design: Time Behavior of Combinational Networks Credits : Slides adapted from: J.F. Wakerly, Digital Design, 4/e, Prentice Hall, 2006 C.H. Roth,
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Glitches/Hazards and ALUs
Computing Systems Designing a basic ALU.
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
COE 202: Digital Logic Design Combinational Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
1 Lecture 12 Time/space trade offs Adders. 2 Time vs. speed: Linear chain 8-input OR function with 2-input gates Gates: 7 Max delay: 7.
1 Carry Lookahead Logic Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here.
Lecture 11 Timing diagrams Hazards.
No. 3-1 Chapter # 3: Multi-Level Combinational Logic.
Timing Behavior of Gates
Addition and multiplication Arithmetic is the most basic thing you can do with a computer, but it’s not as easy as you might expect! These next few lectures.
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
ECE 171 Digital Circuits Chapter 9 Hazards Herbert G. Mayer, PSU Status 2/21/2016 Copied with Permission from prof. Mark PSU ECE.
Lecture #23: Arithmetic Circuits-1 Arithmetic Circuits (Part I) Randy H. Katz University of California, Berkeley Fall 2005.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
Electrical Engineering Engineering the Future Digital Circuits Fundamentals Hands-on Full-Adder Simulation (afternoon)
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
©2010 Cengage Learning SLIDES FOR CHAPTER 8 COMBINATIONAL CIRCUIT DESIGN AND SIMULATION USING GATES Click the mouse to move to the next page. Use the ESC.
©2010 Cengage Learning SLIDES FOR CHAPTER 8 COMBINATIONAL CIRCUIT DESIGN AND SIMULATION USING GATES Click the mouse to move to the next page. Use the ESC.
1 Arithmetic Building Blocks Today: Signed ArithmeticFirst Hour: Signed Arithmetic –Section 5.1 of Katz’s Textbook –In-class Activity #1 Second Hour: Adder.
Lecture 12 Logistics Last lecture Today HW4 due today Timing diagrams
Lecture 11 Logistics Last lecture Today HW4 due on Wednesday PLDs
Combinational Circuits
CSE Winter 2001 – Arithmetic Unit - 1
Overview Last Lecture Conversion of two-level logic to NAND or NOR forms Multilevel logic AOI and OAI gates Today Timing and hazards Multiplexers and demultiplexers.
Lecture 14 Logistics Last lecture Today
Arithmetic Circuits (Part I) Randy H
Lecture 13 Logistics Last lecture Today HW4 up, due on Wednesday PLDs
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
Lecture 14 Logistics Last lecture Today
Chapter 3 Overview • Multi-Level Logic
Presentation transcript:

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Chapter # 3: Multi-Level Combinational Logic 3.3 and Time Response and Hazards / Glitches Timing Issues Chapter # 5: Arithmetic Circuits Networks for Binary Addition

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition 1. Half Adder -- Review With twos complement numbers, addition is sufficient Half-adder Schematic

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition 2. Full Adder -- Review Cascaded Multi-bit Adder usually interested in adding more than two bits this motivates the need for the full adder

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Full Adder S = CI  A  B CO = B CI + A CI + A B = CI (A + B) + A B

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Full Adder/Half Adder A A A B B B CI S CO Alternative Implementation: 5 Gates -- cascading half adders A B + CI (A xor B) = A B + B CI + A CI Standard Approach: 6 Gates +

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition 3. Adder/Subtractor A - B = A + (-B) = A + B + 1 Control = 0 ==> Add Control = 1 ==> Subtract

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No For the adder circuit, Ai and Bi are summed in parallel. Bu for Si to be correct, the adder requires serial propagation of the carry outputs from the right most lowest-order stage to the left- most highest order stage. The rippling of the carry from one stage to another determines the adder’s ultimate delay. Networks for Binary Addition

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition 4. Carry Lookahead Circuits A A B B @N+2 Critical delay: the propagation of carry from low to high order stages late arriving signal two gate delays to compute CO Assume the adder stages are implemented as the ‘S’ and ‘CO’ circuits on previous slide and all gates have the same delay. For the ‘S’ circuit, At time 0, Ai, Bi, and CI are presented to the adder. Within 2 gate delays, one delay for each XOR gate, S0 will be valid For ‘C0’ circuit, Ai=Bi=1, the carryout is computed in two gate delay and independent of the carry-in ==> C0 always = 1 Ai=Bi=0, the carryout is computed in two gate delay and independent of the carry-in ==> C0 always = 0 Ai  Bi, the calculation of the carry out takes three gate delays (C0 depends on the CI)

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Carry Lookahead Circuits Critical delay: the propagation of carry from low to high order stages 4 stage adder final sum and carry Addition for worst case:

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Carry Lookahead Circuits Critical delay: the propagation of carry from low to high order stages worst case addition T0: Inputs to the adder are valid T2: Stage 0 carry out (C1) T4: Stage 1 carry out (C2) T6: Stage 2 carry out (C3) T8: Stage 3 carry out (C4) T0T2T4T6T8 S0, C1 ValidS1, C2 ValidS2, C3 ValidS3, C4 Valid

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No gate delay seems acceptable for a 4-bit adder Cascaded delays become intolerable for adders of greater widths, such as 32 or 64 bits A 32 stage adder (32 bits) take 64 gate delays to final stage carryout Led to carry look ahead schemes Ways to calculate the carry inputs in parallel rather than in series. So that it will never take more than 2 gate delays to compute any of the carry outputs. Networks for Binary Addition Carry Lookahead Circuits

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Carry Lookahead Logic -- General Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here. This [asses propagates the carry across the stage Si = Ai xor Bi xor Ci = Pi xor Ci Ci+1 = Ai Bi + Ai Ci + Bi Ci = Ai Bi + Ci (Ai + Bi) = Ai Bi + Ci (Ai xor Bi) = Gi + Ci Pi Sum and Carry can be reexpressed in terms of generate/propagate: We introduce 2 new functions,

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Carry Lookahead Logic Reexpress the carry logic as follows: C1 = G0 + P0 C0 C2 = G1 + P1 C1 = G1 + P1 G0 + P1 P0 C0 C3 = G2 + P2 C2 = G2 + P2 G1 + P2 P1 G0 + P2 P1 P0 C0 C4 = G3 + P3 C3 = G3 + P3 G2 + P3 P2 G1 + P3 P2 P1 G0 + P3 P2 P1 P0 C0 Each of the carry equations can be implemented in a two-level logic network Variables are the adder inputs and carry in to stage 0 (C0)!

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Carry Lookahead Implementation Adder with Propagate and Generate Outputs 1 gate delay Ci 2 gate delays Bi Ai 1 gate delay

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Carry Lookahead Implementation Increasingly complex logic C0 P0 G0 C1 P1 G1 C2 P2 G2 C3 P3 G3 C4 When Pi and Gi are available, the subsequent C1, C2, C3, C4 are computed after two more gate delays (3 gate delays total). The sum bits can be computed in just one more gate delay.

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Carry Lookahead Logic 5. Cascaded Carry Lookahead Carry lookahead logic generates individual carries sums computed much faster

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition Carry Lookahead Logic Cascaded Carry Lookahead 4 bit adders with internal carry lookahead second level carry lookahead unit, extends lookahead to 16 bits

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Networks for Binary Addition 6. Carry Select Adder Redundant hardware to make carry calculation go faster compute the high order sums in parallel one addition assumes carry in = 0 the other assumes carry in = 1 C8 is selected from adder high when C4=1and Is the AND of the carries of adder low and high when C4=0.

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks emphasis on timing behavior of circuits waveforms to visualize what is happening simulation to create these waveforms momentary change of signals at the outputs: hazards can be useful— pulse shaping circuits can be a problem — glitches: incorrect circuit operation Terms: gate delay— time for change at input to cause change at output minimum delay vs. typical/nominal delay vs. maximum delay careful designers design for the worst case! rise time— time for output to transition from low to high voltage fall time— time for output to transition from high to low voltage

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Gate Delays for Typical TTL Families Various families of TTL exhibit tradeoffs between delay and power. Faster a component, the more power it consumes. Delays depend on whether a gate is going from low to high or high to low.

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Pulse Shaping Circuit -- It generates a periodic sequence of pulses. A' A = 0 F is not always 0! 3 gate delays (corresponding to the 3 inverters) D remains high for three gate delays after A changes from low to high A change at its input causes a short duration pulse at the output Each gate has propagation delay of 10 time units

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Hazards/Glitches and How to Avoid Them Glitch -- unwanted pulse at the output of a combinational logic network. Hazard -- a circuit with the potential for a glitch is said to have a hazard. Occur because delay paths through the circuit experience different propagation delays Danger if logic "makes a decision" while output is unstable OR hazard output controls an asynchronous input (these respond immediately to changes rather than waiting for a synchronizing signal called a clock) Usual solutions: wait until signals are stable (by using a clock) never, never, never use circuits with asynchronous inputs design hazard-free circuits Suggest that first two approaches be used, but we'll tell you about hazard-free design since some components unavoidably have asynchronous inputs.

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Hazards/Glitches and How to Avoid Them Kinds of Hazards Input change causes output to go from 1 to 0 to 1 when it should have remained at 1. Input change causes output to go from 0 to 1 to 0 when it should have remained at 0. Output signal has the potential to change more than once when it is expected to make a single transition from 0 to 1 OR from 1 to 0.

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Circuits Glitch Example F = A' D + A C' input change within product term-- G1 G1 G2 G3 A \C \A D F G1 G2 G3 A \C \A D F ABCD = 1100 ABCD = 1101 Lets look at what happens when input changes from > 1101

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Circuits Glitch Example input change that spans product terms output changes from 1 to 0 to 1 Examine K-Map: When the intial and final inputs are covered by the same prime implicant, no glitch is possible. When the input change spans prime implicants, a glitch can happen. gate delay F = A glitch happened

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Glitch Example -- Eliminate static hazards General Strategy: add redundant prime implicant terms F = A' D + A C' becomes A' D + A C' + C' D This eliminates 1-hazard. How about 0-hazard? Re-express F in PoS form: F = (A' + C')(A + D) Glitch present! Add term: (C' + D) This expression is equivalent to the hazard-free SoP form of F

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Glitch Example -- Eliminate static hazards Start with expression that is free of static 1-hazards F = A C' + A' D + C' D F' = (A C' + A' D + C' D)' = (A' + C) (A + D') (C + D') = A C + A C D' + C D' + A' C D' + A' D' = A C + C D' + A' D' covers all the adjacent 0's in the K-map free of static-1 and static-0 hazards! F = (A’ + C’) (C’ + D) (A + D) Work with complement: Alternative approach to eliminate 0-hazards

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks General Strategy for Static Hazard Elimination Static 1-Hazards Examine the K-map to make sure that all adjacent elements of the on-set are covered by a prime implicant. If not, add redundant prime implicants until all elements of the on- set are covered Static 0-Hazards Reexpress function in POS form Verify that adjacent elements of the off-set are covered by a common prime implicant in the PoS form. If necessary, add more prime implicants to cover any uncovered adjacencies.

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Detecting Static Hazards in Multi-Level Circuits Map the multi-level function into a two-level form called transient output function variables and complements are treated as independent variables cannot use X + X' = 1 or X X' = 0 for simplifications F = A B C + (A + D) (A' + C') F1 = A B C + A A' + A C' + A' D + C' D Example: 2-level form ABCD: 1111 to 1110, covered by term ABC, so no 1-hazard present some static hazards are present! ABCD: 1110 to 1100, term ABC goes low while term AC' goes high 1111 to to 1101 Examine K-map for static 1-hazards

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Static 1-hazards Solution: Add redundant terms to insure all adjacent transitions are covered by terms F2 = A C' + A' D + C' D + A B + B D 1's hazards in F corrected in F to 0111, 1111 to 1101

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Static 0-Hazards Similar to previous case, but work with the complement of F If terms of the transient output function cover all 0 transitions, then no 0-hazards are present F = [A B C + (A + D) (A' + C')]' = (A' + B' + C') (A' D' + A C) = A' D' + A' B’ D' + A' C’ D' + A B' C = A' D' + A B' C 0-hazard on transition from 1010 to B' C D' F3 = (A + D) (A' + B + C') (B + C' + D) 0-hazard free equivalent to F2 on last slide Add redundant term

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Static 0-Hazards 0-Hazard Corrected in F3

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Designing Networks for Hazard-free operation Simply place transient output function in a form that guarantees that all adjacent ones are covered by a term no term of the transient output function contains both a variable and its complement F(A,B,C,D) =  m(1,3,5,7,8,9,12,13,14,15) F = A B + A' D + B D + A C' + C' D = (A' + B + C') D + A (B + C') (factored by distributive law, which does not introduce hazards since it does not depend on the complementarity laws for its validity)

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Time Response in Combinational Networks Dynamic Hazards -- happens because of multiple paths in the underlying multilevel network, each with its own assymetric delay Example with Dynamic Hazard Three different paths from B or B' to output ABC = 000, F = 1 to ABC = 010, F = 0different delays along the paths: G1 slow, G4 very slow Handling dynamic hazards very complex. Beyond our scope fast A multilevel network free of static hazards may still have dynamic hazards. So if a hazard-free network is needed, it is best to design a two-level static hazard-free network.

Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No HW #11 -- Sections 5.2, 3.3, 3.4