Presentation is loading. Please wait.

Presentation is loading. Please wait.

Combinational Hazards Brandon L Fernandes University of Southern California.

Similar presentations


Presentation on theme: "Combinational Hazards Brandon L Fernandes University of Southern California."— Presentation transcript:

1

2 Combinational Hazards Brandon L Fernandes University of Southern California

3 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.

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

5 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.

6 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

7 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.

8 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.

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

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

11 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

12 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

13 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 0 0 0 AND 0 1 OR 0 1 O/p remains The same (S1) transition

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

15 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.

16 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 0000 0110 0011 0000 uv 00 01 11 10 xy Initially Output =1 Output = 0 Output =1 (S1) Funct. Hazard

17 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.

18 0000 0110 0011 0000 uv 00 01 11 10 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.

19 0000 0110 0011 0000 uv 00 01 11 10 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

20 0000 0110 0011 0000 uv 00 01 11 10 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.

21 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.

22 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: 0010 0010 0010 0010 ab 00 01 11 10 cd AND B a b OR O/p Vacuous implicant Contradictory inputs

23 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 0010 0 010 0010 0010 ab 00 01 11 10 cd AND B a b OR O/p Hence o/p = 0

24 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’

25 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

26 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.

27 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.

28 (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 0010 0010 0010 0010 uv 00 01 11 10 xy Non Vacuous Implicant Transition Cube Such transitions could generate a temporary 1 at the output. Intersection transition

29 (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 1101 1101 1101 1101 uv 00 01 11 10 xy Non Vacuous Implicate Transition Cube Such transitions could generate a temporary 0 at the output. Intersection transition

30 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.

31 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 0000 0110 0011 0000 uv 00 01 11 10 xy A B C Transition cube The transition cube is as shown.

32 Dynamic Hazards Without Vacuous Implicants 0000 0110 0011 0000 uv 00 01 11 10 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

33 Dynamic Hazards Without Vacuous Implicants 0000 0110 0011 0000 uv 00 01 11 10 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

34 Dynamic Hazards Without Vacuous Implicants uv 00 01 11 10 0000 0110 0011 0000 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

35 0000 0110 0011 0000 00 01 11 10 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

36 0000 0110 0011 0000 00 01 11 10 A C Transition cube Having removed the AND gate B, the K-map becomes

37 0000 0110 0011 0000 00 01 11 10 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

38 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.

39 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

40 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

41 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.

42 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 01010110 The transition is from 0 1 0 1 to 0 1 1 0 01 u Hence, what we have to find is F(0, 1, u, u’) u’

43 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)

44 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 01010110 The transition is from 0 1 0 1 to 0 1 1 0 0 1 u Hence, what we have to find is F(0, 1, u, u’) u’

45 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)

46 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

47 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: + = ?

48 + 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:

49 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~

50 . = ? 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:

51 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 ~

52 . = ? 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:

53 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 =

54 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.

55 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 01010110 The transition is from 0 1 0 1 to 0 1 1 0 0 1 Hence, what we have to find is F(0, 1,, ) 8 valued transition

56 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.

57 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 01010110 The transition is from 0 1 0 1 to 0 1 1 0 0 1 Hence, what we have to find is F(0,1,, ) 8 valued transition

58 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,

59 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.

60 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

61 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 4-9----4-11 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.

62 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 4-11---4-14 Slide no 39,40,41 Techniques in Advanced Switching Theory By Prof.J. Ellison Chapter 4 page 4-21--------4-22 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 4-21--------4-22 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 2001. Slide no 55 to 58 Examples 3 and 4 are taken from the homework set L given to the EE552 class during Spring 2001


Download ppt "Combinational Hazards Brandon L Fernandes University of Southern California."

Similar presentations


Ads by Google