Glitches/Hazards and ALUs

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.
Glitches & Hazards.
Figure 4.1. The function f (x1, x2, x3) =  m(0, 2, 4, 5, 6).
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.
1 Combinational Logic Network design Chapter 4 (continued ….)
Tutorial: Wednesday Week 3 Hand in on Monday, Do the questions for tutorials 1 & 2 at the back of the course notes (answers to tutorial 3 will be published.
ECE 331 – Digital System Design
Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Chapter # 3: Multi-Level Combinational Logic 3.3 and Time Response.
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.
Arithmetic II CPSC 321 E. J. Kim. Today’s Menu Arithmetic-Logic Units Logic Design Revisited Faster Addition Multiplication (if time permits)
Give qualifications of instructors: DAP
Chapter 3 Simplification of Switching Functions
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
ECE C03 Lecture 61 Lecture 6 Delays and Timing in Multilevel Logic Synthesis Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.

Canonical Forms and Logic Miniminization
CS 151 Digital Systems Design Lecture 32 Hazards
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
ECE 331 – Digital System Design Power Dissipation and Additional Design Constraints (Lecture #14) The slides included herein were taken from the materials.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Adders, subtractors, ALUs
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
Chapter # 5: Arithmetic Circuits
Chapter 6-1 ALU, Adder and Subtractor
5-1 Programmable and Steering Logic Chapter # 5: Arithmetic Circuits.
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Adders, subtractors, ALUs.
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,
Csci 136 Computer Architecture II – Constructing An Arithmetic Logic Unit Xiuzhen Cheng
1/8/ L3 Data Path DesignCopyright Joanne DeGroat, ECE, OSU1 ALUs and Data Paths Subtitle: How to design the data path of a processor.
1 Boolean Logic & Number Systems Today: Some Announcements First Hour: Introduction to Logic –Section 1.2, 1.3 of Katz’s Textbook –In-class Activity #1.
1 Building Larger Circuits Today: Combinational Building BlocksFirst Hour: Combinational Building Blocks –Section 4.1 of Katz’s Textbook –In-class Activity.
Computing Systems Designing a basic ALU.
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
V - Combinational Logic Case Studies © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Combinational logic design case studies General design procedure.
CS/EE 3700 : Fundamentals of Digital System Design Chris J. Myers Lecture 4: Logic Optimization Chapter 4.
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.
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.
Arithmetic-Logic Units. Logic Gates AND gate OR gate NOT gate.
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
1 Lecture 11: Hardware for Arithmetic Today’s topics:  Logic for common operations  Designing an ALU  Carry-lookahead adder.
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.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
©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.
Chapter 5 Combinational Logic 组合逻辑
Lecture 9 Topics Glitches and Hazards Types of Functions and Delays
Combinational Circuits
Lecture 11 Logistics Last lecture Today HW4 due on Wednesday PLDs
Lecture #6 EGR 277 – Digital Logic
ECE 3110: Introduction to Digital Systems
Swamynathan.S.M AP/ECE/SNSCT
Lecture 8 Combinational Network Design and Issues
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.
Arithmetic Circuits (Part I) Randy H
Lecture 13 Logistics Last lecture Today HW4 up, due on Wednesday PLDs
CSE 370 – Winter Combinational Implementation - 1
Introduction to Digital Systems
Combinational logic design case studies
Chapter 3 Overview • Multi-Level Logic
Presentation transcript:

Glitches/Hazards and ALUs Today: First Hour: Glitches and Hazards Section 3.4 of Katz’s Textbook In-class Activity #1 Second Hour: ALU Section 5.3 of Katz’s Textbook In-class Activity #2

What are Glitches? Glitches are a kind of logic noise They are unwanted transients that occur in otherwise steady-state waveforms They are caused by propagation delays and timing defects in combinational logic circuits Hence, they are called 'glitches' taken from the German word "Glitsche" meaning slip or error. “Hazard” = potential glitch in a circuit

Kinds of Hazards Static Hazards A glitch that occurs in a logically steady-state 0 or 1 output when a single input changes A single input has a delay asymmetry in path to output Static1-hazard (also called SOP hazard) Static 0-hazard (also called POS hazard) Dynamic Hazards Multiple transition glitches that occur in a multilevel circuit A single input has 3 or more delay asymmetries in path to output Function Hazards A glitch that occurs when 2 or more inputs to a gate change at (almost) the same time

Glitch Related Definitions Coupled Variable is complemented in one term of the output expression and uncomplemented in another Coupled Term has only one coupled variable Residue is that part of a coupled term that remains after removing the coupled variable Hazard Cover (or Consensus term) is the Redundant Prime Implicant (RPI) required to eliminate the static hazard

Example of Definitions Consensus Theorem Forms X is the coupled (complemented) variable X Y and X' Z or (X + Y) and (X' + Z) are coupled terms Y and Z are residues and Y ZSOP or (Y + Z)POS is the Redundant Prime Implicant (RPI)

Static Hazard Detection Example: X = A' B + A C = (A' + C)(A + B) 00 01 11 10 0 0 1 0 0 1 0 1 1 1 AB C SOP Hazard: Coupled variable = A Coupled terms = A' B, A C Residues = B, C RPI = B C, hazard cover  X = A' B + A C + B C When input of X changes, a glitch occurs because the circuit needs to switch over to a new prime implicant. A B C  A' B C 1 1 1  0 1 1

Static Hazard Detection Example: X = A' B + A C = (A' + C)(A + B) 00 01 11 10 0 0 1 0 0 1 0 1 1 1 AB C POS Hazard: Coupled variable = A Coupled terms = A + B, A' + C Residues = B, C RPI = B + C, hazard cover  X = (A' + C)(A + B)(B + C) Solution: add a RPI (circuit segment) based upon the consensus theorem so that the transition is is covered in the new prime implicant (circuit segment). (A + B + C)  (A' + B + C) 1 1 1  0 1 1

Glitch Procedure Identify the coupled SOP or POS terms Add RPI consensus term(s) The circuit will not longer be minimized Reject any set of two terms containing more than one coupled variable Read the initial and final states from the coupled terms in hazardous transition (i.e., minterms for SOP, Maxterms for POS)

4 Variable Example - SOP SOP Hazards AB 00 01 11 10 00 0 1 1 0 CD 00 01 11 10 00 0 1 1 0 01 1 1 0 0 11 1 0 0 1 10 1 0 0 1 AB CD hazard cover

4 Variable Example - POS POS Hazards AB 00 01 11 10 00 0 1 1 0 CD 00 01 11 10 00 0 1 1 0 01 1 1 0 0 11 1 0 0 1 10 1 0 0 1 AB CD hazard cover

Alternate Procedure Detect static 1-hazards in SOP expression for F Add RPI(s) to obtain SOP hazard-free expression Convert SOP-hazard free to POS for F’ Detect static 0-hazards in POS expression Add RPI(s) to obtain POS hazard-free expression Final expression is both static 1- and 0- hazard-free

Katz Alternative Method 4 Variable Example - Alt. Katz Alternative Method 1. Get FSOP+ 2. Look at (FSOP+)' 3. Check (FSOP+)' SOP and make 0-hazard free, if needed 00 01 11 10 00 0 1 1 0 01 1 1 0 0 11 1 0 0 1 10 1 0 0 1 AB CD 0-hazard free

Apply glitch/hazard detection, elimination techniques Do Activity #1 Now Apply glitch/hazard detection, elimination techniques

Arithmetic Logic Unit ALU CONTROL INPUTS SIGNALS OUTPUTS Si-1 … S0 M Bn-1 … B0 An-1 … A0 INPUTS ALU Fn-1 … F0 Cn OUTPUTS

Sample ALU Specification Logical and Arithmetic Operations S1 1 S0 Function Fi = Ai Fi = not Ai Fi = Ai xor Bi Fi = Ai xnor Bi Comment Input Ai transferred to output Complement of Ai transferred to output Compute XOR of Ai, Bi Compute XNOR of Ai, Bi M = 0, Logical Bitwise Operations M = 1, C0 = 0, Arithmetic Operations (with no carry in) 1 F = A F = not A F = A plus B F = (not A) plus B Input A passed to output Complement of A passed to output Sum of A and B Sum of B and complement of A M = 1, C0 = 1, Arithmetic Operations (with carry in) 1 F = A plus 1 F = (not A) plus 1 F = A plus B plus 1 F = (not A) plus B plus 1 Increment A Twos complement of A Increment sum of A and B B minus A Not all operations appear useful, but "fall out" of internal logic

Sample ALU Bit Slice Design 1 S1 S0 Ci X Ai Bi Fi Ci+1 X 1 X 1 X X X 1 X 1 X X 1 X X X 1 X X Traditional Design Approach: Truth Table S0, S1 = Select bits M = Mode (arithmetic/logic) Ai, Bi = Inputs Ci = Carry in Fi = Output Ci+1 = Carry out 1 X 1 X X 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Sample ALU Design Design Comparisons 1. espresso SOP implementation: 25 gates, 2 levels 2. MisII (a multilevel synthesis tool) optimized implementation: 12 gates, 2 levels 3. Clever hand design: 8 gates, 4 levels (but uses XORs)

Clever Hand Design Implementation Multilevel ALU Design Clever Hand Design Implementation S1 Bi S0 Ai S1 = 0  Bi is blocked Then operations involve Ai only S0 controls operation of X1 S0 = 0, X1 passes Ai S0 = 1, X1 passes Ai' The XOR gate acts as an invertering or non-inverting buffer M = 0  Ci is blocked This decouples the bit slices M = 1  Carry in ripples thru OR gate O1 output: Ci+1 = Ai•Ci + Bi•(Ai  Ci) XOR gate X3 output: Fi = Ai  Bi  Ci M Ci X1 A1 A2 8 Gates (3 are XOR) X2 A3 A4 X3 O1 Ci+1 Fi

Active High Inputs & Outputs, Active Low Carries 74181 TTL ALU Active High Inputs & Outputs, Active Low Carries Selection M = H, Logic M = L, Arithmetic Functions S3 S2 S1 S0 Functions Cn = H Cn = L L L L L A' A A plus 1 L L L H (A + B)' A + B (A + B) plus 1 L L H L A' B A + B' (A + B') plus 1 L L H H 0 minus 1 zero L H L L (A B)' A plus A B' A plus A B' plus 1 L H L H B' (A + B) plus A B' (A + B) plus A B' plus 1 L H H L A  B A minus B minus 1 A minus B L H H H A B' A B minus 1 A B H L L L A' + B A plus A B A plus AB plus 1 H L L H (A  B)' A plus B A plus B plus 1 H L H L B (A + B') plus A B (A + B') plus A B plus 1 H L H H A B A B minus 1 A B H H L L 1 A plus A = 2A 2A plus 1 H H L H A + B' (A + B) plus A (A + B) plus A plus 1 H H H L A + B (A + B') plus A (A + B') plus A plus 1 H H H H A A minus 1 A

74181 ALU & 74182 Carry Lookahead Units The sense of the carry in and carry out are OPPOSITE from the input bits (no bubbles) 181 A3 A2 A1 A0 B3 B2 B1 B0 Cn M S3 S2 S1 S0 F3 F2 F1 F0 A=B G P Cn+4 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 182 P3 P2 P1 P0 G3 G2 G1 G0 Cn+z Cn+x Cn+y 12 Fortunately, the carry lookahead generator maintains the correct sense of the signals

with Carry Lookahead Unit CLU speeds up calculations of multi-chip ALU 182 P3 P2 P1 P0 G3 G2 G1 G0 Cn Cn+z Cn+x P G Cn+y 13 3 1 14 5 4 2 15 6 12 11 9 10 7 181 A3 A2 A1 A0 B3 B2 B1 B0 M S3 S2 S1 S0 F3 F2 F1 F0 A=B Cn+4 8 16 17 18 19 20 21 22 23 C0 C16 16-bit ALU Carry out with Carry Lookahead Unit Group G & P CLU speeds up calculations of multi-chip ALU Carry in

Do Activity #2 Now For Next Class: Due: End of Class Today RETAIN THE LAST PAGE (#3)!! For Next Class: Bring Randy Katz Textbook, & TTL Data Book Required Reading: Sec 6.1 of Katz This reading is necessary for getting points in the Studio Activity!