Combinational Hazards Brandon L Fernandes University of Southern California.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

CS370 – Spring 2003 Hazards/Glitches. Time Response in Combinational Networks Gate Delays and Timing Waveforms Hazards/Glitches and How To Avoid Them.
ECE C03 Lecture 71 Lecture 7 Delays and Timing in Multilevel Logic Synthesis Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE 3110: Introduction to Digital Systems
Boolean Algebra and Reduction Techniques
Copyright © Cengage Learning. All rights reserved.
Boolean Algebra and Combinational Logic
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Chapter # 3: Multi-Level Combinational Logic 3.3 and Time Response.
MULTI-LEVEL GATE NETWORKS
Asynchronous Sequential Logic
ECE C03 Lecture 61 Lecture 6 Delays and Timing in Multilevel Logic Synthesis Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.

EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 4 Technology.
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Propositional Calculus Math Foundations of Computer Science.
2.7 NAND and NOR logic networks
Digital Systems Presented by Prof Tim Johnson
Digital Logic Design Lecture # 7 University of Tehran.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Digital Logic Chapter 4 Presented by Prof Tim Johnson
2-Level Minimization Classic Problem in Switching Theory
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.
Digital Logic Basics Chapter 2 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer, 
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
2-Level Minimization Classic Problem in Switching Theory Tabulation Method Transformed to “Set Covering Problem” “Set Covering Problem” is Intractable.
Chapter 3: Digital Logic Dr Mohamed Menacer Taibah University
Introduction to State Machine
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)
CH51 Chapter 5 Combinational Logic By Taweesak Reungpeerakul.
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.
Floyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd Chapter 5 © 2008 Pearson Education.
Boolean Algebra and Reduction Techniques
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
Sum-of-Products (SOP)
Logic Simplification-Using K-Maps
Lecture # 5 University of Tehran
Timing Behavior of Gates
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
ECE 171 Digital Circuits Chapter 9 Hazards Herbert G. Mayer, PSU Status 2/21/2016 Copied with Permission from prof. Mark PSU ECE.
1 CS 352 Introduction to Logic Design Lecture 4 Ahmed Ezzat Multi-level Gate Circuits and Combinational Circuit Design Ch-7 + Ch-8.
©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 Digital Design Debdeep Mukhopadhyay Associate Professor Dept of Computer Science and Engineering NYU Shanghai and IIT Kharagpur.
©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.
Chapter 3 Notes – Part II Review Questions
Chapter 11 (Part 1): Boolean Algebra
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
ECE 3110: Introduction to Digital Systems
Boolean Algebra and Combinational Logic
SLIDES FOR CHAPTER 2 BOOLEAN ALGEBRA
Reading: Hambley Chapters
Hazard.
BASIC & COMBINATIONAL LOGIC CIRCUIT
Lecture 13 Logistics Last lecture Today HW4 up, due on Wednesday PLDs
Introduction to Digital Systems
332:437 Lecture 3 Hardware Design Methodology and Advanced Logic Design Hardware design.
Chapter 3 Overview • Multi-Level Logic
ECE 352 Digital System Fundamentals
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Introductory Concepts
Combinational Logic Circuit
Laws & Rules of Boolean Algebra
ECE 352 Digital System Fundamentals
Circuit Simplification and
Presentation transcript:

Combinational Hazards Brandon L Fernandes University of Southern California

Table Of Contents  Delays in Logic Networks.  What are Hazards, and what causes them?  Coping with hazards.  Transition types.  Hazard types.  Hazard detection using the Karnaugh map.  (S1) hazards.  Vacuous implicants and (S0) hazards.

 Dynamic hazards.  Can all hazards be eliminated?  Multilevel network hazard detection.  Boolean transformation.  Substitution.  Eight-valued algebra.

Every wire within an IC can be modeled as a transmission line. Delays In Logic Networks - Line delays R C Modeled circuit (lumped) The R an C elements causes the speed of a signal to decrease as it passes through a wire.

Also, there exist a delay between the input and output transition of every gate. Input (I/p)Output (O/p) I/p O/p Gate Delays Delay

Delays and Hazards These delays (line & gate delays) may result in undesired output changes in certain asynchronous combinational networks. Such networks are said to have combinational hazards.

What do we do when there is a Hazard?  Use a synchronous network.  Redesign the logic to eliminate the hazard if possible.  Insert delays into the network. Now lets take a closer look at delays that can be inserted into a network to suppress hazards.

1 The Pure Delay Model, and 2 The Inertial Delay Model There are two different types of delay models Delay models

Input t To explain these two models, we consider the following waveform applied to the input of a delay element. Delay element InputOutput

In case of a pure delay element, the output waveform is a replica of the original waveform, delayed, by an amount T Input Output t t Pure Delay Element T

In case of an inertial delay element, the output changes if the input state changes and remains constant for a large amount of time. This delay element acts like a filter. Input Output t t Input state changes and remains constant for A long time…….. …..Hence output state changes Inertial Delay Element Got filtered out

Combinational hazards are analyzed in terms of whether or not the o/p changes in response to an i/p transition. In case of a Static i/p transition, the o/p should be constantly 0 or constantly 1. Such transitions are called Static zero (SO),and Static one (S1) transitions respectively. Transition Types AND AND 0 1 OR 0 1 O/p remains The same (S1) transition

If the output of a network is supposed to change in response to an input transition, then the transition is Dynamic. AND AND 1 0 OR O/p changes Dynamic transition

Function Vs Logic Hazards A Logic Hazard is the result of poor combinational logic design. It is removable by redesigning the network. A Function Hazard is innate in the function itself and cannot be removed by redesigning the network. Note that the critical characteristic used to distinguish between the two types of hazards is whether or not the hazard is removable.

Function hazard detection by Karnaugh maps  1 Draw the transition cube for the transition. This will give you all minimal paths from source to destination.  2 If the specified function value changes more than once along some minimal path, then there is a function hazard. Transition cube uv xy Initially Output =1 Output = 0 Output =1 (S1) Funct. Hazard

Facts About Function Hazards Function hazards cannot be removed by redesign of combinational logic. The only way to get rid of it is by inserting delays. SIC (Single Input Changes) cannot cause a function hazard. -Why?- Ans: This is because the transition cube cannot have a minimal path that contains more than one output change.

uv xy Static 1 Hazards in SOP networks Consider a SOP implemented function g(x,y,u,v) with input transition from uvx’y to uvxy. If the transition cube is not covered by an AND gate then the transition will result in a (S1) Hazard. Transition cube Not covered by any AND gate In case of POS: If the transition cube is not covered by an OR gate then the transition will result in a (S0) Hazard.

uv xy Why Does the (S1) Hazard Occur ? A B Lets suppose that the SOP consist of AND gates A and B, followed by an OR gate. Initially, gate A is on, hence………………… o/p = 1 During the transition, there is a possibility that both gates A, B turn off, hence …………o/p=0 And finally, gate B comes on hence ………….o/p=1 (S1) Hazard o/p (S1) Hazard A is ON B is ON A, B are OFF

uv xy Avoiding the Static 1 hazard Again consider the SOP implemented function g(x,y,u,v) with input transition from uvx’y to uvxy. Include an extra AND gate which covers the transition cube. Transition cube Is Now covered by an AND Gate. But it’s not always possible to cover the transition cube with a AND gate. In that case, the hazard is a (S1) function hazard.

Vacuous implicants and (S0) hazards in SOP networks generally (S0) hazards generally don’t occur in SOP networks. The only way they can occur is if there exist a vacuous implicant, that comes in the transition path.

Vacuous Implicants are those that contain contradictory pair of inputs. AND A a’ c’ c What are Vacuous Implicants? Suppose that we had a 2-level SOP network for the K-map: ab cd AND B a b OR O/p Vacuous implicant Contradictory inputs

Now suppose initially a=0 b=0 c=0 c’=1, d=1 Hence o/p should continue to remain 0 Now suppose that c changes from 0 to 1 AND A a’ c’ c ab cd AND B a b OR O/p Hence o/p = 0

AND A a’ c c We redraw the AND A gate from the previous diagram, showing how c’ was obtained Lets have a closer look into the matter O/p to OR gate c’

AND A a’ c c Now suppose a=0, a’=1, b=0, c=0, c’=1 Hence o/p = 0 a’ c c’ o/p Now suppose that c changes from 0 to 1 Inverter delay (S0) Hazard Then c’ changes from 1 to 0 with some delay c’ O/p to OR gate

But Why Would Anyone Include a Vacuous Implicant? Of course, in a two level network the no one would purposely do such a thing. However when analyzing multilevel networks, we use transformations which convert multilevel networks to two level networks that sometimes have vacuous implicants.

How To Get Rid of (S0) Logic Hazards in SOP Networks It is clear that the (S0) hazard in an SOP network, due to Vacuous implicants, is a Logic Hazard. To get rid of the (S0) hazard, simply get rid of the vacuous implicant. POS networks : Vacuous implicates in the case of POS networks can give rise to (S1) logic hazard, which can be eliminated by removing the OR gates with contradictory inputs.

(S0) Function Hazards in SOP Networks If the transition cube intersects a non-vacuous implicant of some AND gate, then there is a (S0) function hazard for the network uv xy Non Vacuous Implicant Transition Cube Such transitions could generate a temporary 1 at the output. Intersection transition

(S1) Function Hazards in POS Networks If the transition cube intersects a non-vacuous implicate of some OR gate, then there is a (S1) function hazard for the network uv xy Non Vacuous Implicate Transition Cube Such transitions could generate a temporary 0 at the output. Intersection transition

Dynamic Hazards in SOP networks There are two types of dynamic hazards The first kind is caused because of vacuous implicants. The second type is relatively difficult to spot, and arises due to unmatched gate speeds.

Dynamic Hazards Without Vacuous Implicants Now suppose that there is a dynamic transition from uvx’y’ to u’vx’y Consider a function implemented as a SOP with AND gates A, B and C following uv xy A B C Transition cube The transition cube is as shown.

Dynamic Hazards Without Vacuous Implicants uv xy A B C Transition cube We assume that A is a slow gate and B is a fast gate We also assume the following transition uvx’y’ to uvx’y to u’vx’y

Dynamic Hazards Without Vacuous Implicants uv xy A B C Transition cube Consider the first transition O/p Because of our assumption that A is a slower gate than B, B comes on and causes the output to go high

Dynamic Hazards Without Vacuous Implicants uv xy A B C Transition cube O/p Now consider the second transition The B gate responds first and its output goes to 0, causing the o/p to go to 0 After a long time, the A gate responds and goes high causing the o/p to go high HAZARD

A B C Transition cube How do you get rid of such a hazard? Just remove the AND gate B and you will get rid of the dynamic hazard

A C Transition cube Having removed the AND gate B, the K-map becomes

A C Transition cube By removing the and gate, you have introduced a (S1) hazard Does removing the AND Gate solve our problem ? Yes and NO

So, the conclusion we draw from the example is: You are always able to redesign the network to eliminate any particular logic hazard, but………….. You may not be able to get rid of all the logic hazards.

Hazards in Multilevel Logic Realization We cannot analyze logic hazards in multilevel networks using Karnaugh map techniques. Some of the techniques used to analyze multilevel networks are:  Boolean Transformation  Substitution  Eight Valued Algebra

Multilevel Hazard Analysis Using Boolean Transformations In the case of Boolean transformations, we convert a multilevel network into an equivalent 2-level SOP network. Only Boolean transformations that preserve logic hazards Can be used in the transformations. Multilevel Network 2-level SOP Network Boolean transformations That preserve hazards

What Kind of Boolean Transformations Can We Use? The following transformations preserve logic hazards Double Inversionx = x Commutative Laws Associative laws The following principles do not preserve logic hazards x + x= 1 x = 0 DeMorgans Law Distributive laws preserve static hazards only. Function hazards are not affected by any the above transformations.

Example 1 (Generalized substitution): Suppose that we have to find out if the following network implementation had a hazard: F(x, y, z, t) = (xz’ + yz)(xy’t) For the input transition The transition is from to u Hence, what we have to find is F(0, 1, u, u’) u’

We have to find F(0,1,u,u’) F(0, 1, u, u’) = (0u’ +1u)(0.0.u’) = ( 0 + u)(0) = 0 Hence, this is a hazardless transition. F(x, y, z, t) = (xz’ + yz)(xy’t)

Example 2 (Generalized substitution): Suppose that we have to find out if the following network implementation had a hazard: F(x,y,z,t)=(xz’ + yz)(xy’+yz’)(t) For the input transition The transition is from to u Hence, what we have to find is F(0, 1, u, u’) u’

We have to find F(0,1,u,u’) F(0, 1, u, u’) = (0u’ +1u)(0.0+1u’)(u’) =( u )( u’)(u’) Resist the temptation to simplify this as = 0 Doing so will destroy hazards. If the simplification yields anything other than 1,0, u, or u’, then there is a hazard present. Hence the transition has a hazard. F(x, y, z, t) = (xz’ + yz)(xy’+yz’)(t)

Hazard Detection Using 8 Valued Algebra This method differentiates between static and dynamic hazards but not between logic and function hazards It makes use of 8 values, hence the name: 0 0~ 1 1~ Static 0 transition Static 0 transition with a hazard Static 1 transition Static 1 transition with a hazard Dynamic transition from 1 to 0 Dynamic transition from 0 to 1 with a hazard Dynamic transition from 0 to 1 Dynamic transition from 0 to 1 with hazard ~ ~ The ~ signifies a hazard

8 Valued algebra Just like Boolean algebra, Boolean operations like and, or can be carried out with these 8 values. Evaluation of these operations entails intuitions for Worst case situations Lets consider an example: + = ?

+ We observe that the operation involves the or + operator. We also observe that the operands are hazardless 0 to1 and 1to 0 transitions. Because the operator is or the output must continue to remain high Logic 1 O/p Operand 1 Operand 2 (expected) Example:

Operand 2 Logic 1 O/p Operand 1 Now as a worst case, lets assume that the first input (operand 1) goes high after the second input (operand 2) goes low. As you can see this causes a hazard in the output waveform. + S1 Hazard = 1~

. = ? We observe that the operation involves the AND operator. We also observe that the operands are hazardless 0 to1 and 1to 0 transitions. Because the operator is AND the output must continue to remain low. Logic 0 O/p Operand 1 Operand 2 (expected) Example:

Operand 2 Logic 0 O/p Operand 1 Now as a worst case, lets assume that the first input (operand 1) goes high before the second input (operand 2) goes low. As you can see this causes a hazard in the output waveform.. (S0) Hazard = 0 ~

. = ? We observe that the operation involves the AND operator. We also observe that the operands are hazardless 0 to1 transitions. Because the operator is and, the output must go from 0 to 1. Logic 1 O/p Operand 1 Operand 2 (expected) Example:

Operand 2 Logic 1 O/p Operand 1 Now as a worst case, lets assume that the first input (operand 1) goes high after the second input (operand 2) goes high. As you can see there is no hazard in the output waveform. + No Hazard =

There are many different combinations of the 8 operands and operators, but the results need not be memorized. They can be easily derived as we have just seen. Techniques in Advanced Switching Theory gives detailed truth tables. You are advised to practice obtaining some of the results, using the method of worst case analysis described before.

Example 3 ( 8 Valued algebra): Suppose that we have to find out if the following network implementation had a Hazard: F(x,y,z,t)=(xz’ + yz)(xy’t) For the input transition The transition is from to Hence, what we have to find is F(0, 1,, ) 8 valued transition

F(x, y, z, t) = (xz’ + yz)(xy’t) What we have to find is F(0,1,, ) F(0,1,, ) = (0 +1 )(0.0 ) = 0 Hence, this is a (S0) hazardless transition.

Example 4 (8 Valued algebra): Suppose that we have to find out if the following network implementation had a Hazard: F(x, y, z, t) = (xz’ + yz)(xy’+z’y)(t) For the input transition The transition is from to Hence, what we have to find is F(0,1,, ) 8 valued transition

F(x, y, z, t) = (xz’ + yz)(xy’+z’y)(t) What we have to find is F(0,1,, ) F(0,1,, ) = (0 + 1 )(0.0+ 1)( ) = ( )( )( ) This transition results in a static 0 hazard. =0~( we have proved this before) = ( )( ) We can prove that ( )( ) = hence,

References  Techniques in Advanced Switching Theory by Professor J. Ellison, Chapter on Combinational Hazards (Ch4).  USC’s EE 552 Lecture Notes Spring 2001, Professor. J Ellison.  EE 552 Spring 2001 Handout Set 3-Part on Combinational Hazards.  EE 552 Spring 2001 Homework L.

Referenced material: Slide no. 5 EE 552 Class Notes Spring 2001 –Lecture on Combinational Hazards-Prof. Ellison Slide no.6 EE 552 Class Notes Spring 2001 –Lecture on Combinational Hazards-Prof. Ellison Slide no 7 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page 4-1 Slide no 8 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page 4-2 Slide no 9,10,11,12 EE 552 Class Notes Spring 2001 –Lecture on Combinational Hazards-Prof. Ellison

Slide no 13 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page 4-3 (Definitions of Static and Dynamic transitions) Slide no 14 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page 4-3 (Definitions of Static and Dynamic transitions) Slide no 15 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page 4-3 (Definitions of Logic and function Hazards) Slide no 16 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 section 4.3 (Method of Function Hazard detection Using Transition Cubes) Slide no 17 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page 4-7 Slide no 18,19,20 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 Paraphrased from Theorem 1 ( Static One hazards for SOP networks) and its Dual. Slide no 21 to 29 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 Paraphrased from Theorem 2 ( Static 0 hazards for SOP networks) and its Dual. Pages EE 552 Class Notes Spring 2001 –Lecture on Combinational Hazards-Prof. Ellison The example on how a vacuous implicant actually works, is taken from the lecture notes.

Slide no 30 to 38 This part of the presentation explains in detail with animation,how (S0) hazards can arise in the case of non vacuous implicants. It builds from material in the Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page Slide no 39,40,41 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page Slide no 42,43,44,45 The Example 1 and example 2 are taken from the homework set given to the ee552 class during spring 2001 Slide no 46 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page Slide no 47 to 54 These slides explain how to derive the tables 4.2, 4.3, 4.4 of Techniques in Advanced Switching Theory By Prof.J. Ellison. These slides were made on basis of Prof. Ellison’s EE 522 lecture on hazards during Spring Slide no 55 to 58 Examples 3 and 4 are taken from the homework set L given to the EE552 class during Spring 2001