1 / 61

Combinational

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.

Download Presentation

Combinational

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Combinational Hazards Brandon L Fernandes University of Southern California

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

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

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

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

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

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

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

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

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

  11. Inertial Delay Element 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 state changes and remains constant for A long time…….. Input t …..Hence output state changes Output Got filtered out Got filtered out t

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

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

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

  15. 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. uv 00 01 11 10 Transition cube 00 01 11 10 xy Initially Output =1 (S1) Funct.Hazard Output = 0 Output =1

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

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

  18. Why Does the (S1) Hazard Occur ? uv 00 01 11 10 Lets suppose that the SOP consist of AND gates A and B , followed by an OR gate. A 00 01 11 10 xy B (S1) Hazard B is ON A is ON o/p A, B are OFF 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 (S1) Hazard And finally , gate B comes on hence ………….o/p=1

  19. Avoiding the Static 1 hazard Again consider the SOP implemented function g(x,y,u,v) with input transition from uvx’y to uvxy. uv 00 01 11 10 Transition cube 00 01 11 10 xy Is Now covered by an AND Gate. Include an extra AND gate which covers the transition cube. 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.

  20. Vacuous implicants and (S0) hazards in SOP networks (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.

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

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

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

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

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

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

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

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

  29. Dynamic Hazardsin 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.

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

  31. Dynamic Hazards Without Vacuous Implicants Transition cube uv 00 01 11 10 A 00 01 11 10 xy B C 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

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

  33. Dynamic Hazards Without Vacuous Implicants Transition cube uv 00 01 11 10 A B 00 01 11 10 xy C O/p HAZARD 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

  34. How do you get rid of such a hazard? Transition cube A 00 01 11 10 B 00 01 11 10 C Just remove the AND gate B and you will get rid of the dynamic hazard

  35. Having removed the AND gate B, the K-map becomes Transition cube A 00 01 11 10 00 01 11 10 C

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

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

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

  39. 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 Boolean transformations That preserve hazards 2-level SOP Network

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

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

  42. F(x, y, z, t) = (xz’ + yz)(xy’t) 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.

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

  44. F(x, y, z, t) = (xz’ + yz)(xy’+yz’)(t) 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.

  45. 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: The ~ signifies a hazard 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 ~ ~

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

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

  48. 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. Operand 1 =1~ + Operand 2 O/p Logic 1 S1 Hazard

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

  50. 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. Operand 1 =0 ~ . Operand 2 O/p Logic 0 (S0) Hazard

More Related