Hazards and glitches n n n glitch unwanted

  • Slides: 16
Download presentation
Hazards and glitches n n n glitch: unwanted output A circuit with the potential

Hazards and glitches n n n glitch: unwanted output A circuit with the potential for a glitch has a hazard. Glitches occur when different pathways have different delays ¡ ¡ Causes circuit noise Dangerous if logic makes a decision while output is unstable 1

Hazards and glitches n Solutions ¡ Design hazard-free circuits n ¡ Difficult when logic

Hazards and glitches n Solutions ¡ Design hazard-free circuits n ¡ Difficult when logic is multilevel Wait until signals are stable 2

Types of hazards n ¡ ¡ n Output should stay logic 1 Gate delays

Types of hazards n ¡ ¡ n Output should stay logic 1 Gate delays cause brief glitch to logic 0 Static 0 -hazard ¡ ¡ n 1 Static 1 -hazard ¡ ¡ 1 0 Output should stay logic 0 Gate delays cause brief glitch to logic 1 Dynamic hazards 1 0 Output should toggle cleanly 0 Gate delays cause multiple transitions 0 1 1 0 1 3 0

Static hazards n Often occurs when a literal and its complement momentarily assume the

Static hazards n Often occurs when a literal and its complement momentarily assume the same value ¡ ¡ Through different paths with different delays Causes an (ideally) static output to glitch 4

Static hazards A multiplexer A S A B F S S' B F S'

Static hazards A multiplexer A S A B F S S' B F S' static-0 hazard 5

Timing diagram for F = A + BC 6

Timing diagram for F = A + BC 6

F = A + BC in 2 -level logic C 0 1 B 0

F = A + BC in 2 -level logic C 0 1 B 0 A 0 canonical product-of-sums F 3 7

Timing diagram for F = A + BC 8

Timing diagram for F = A + BC 8

F = A + BC in 2 -level logic C 1 0 B 0

F = A + BC in 2 -level logic C 1 0 B 0 1 A 1 0 F 1 canonical sum-of-products 9

Dynamic hazards n Often occurs when a literal assumes multiple values ¡ ¡ Through

Dynamic hazards n Often occurs when a literal assumes multiple values ¡ ¡ Through different paths with different delays Causes an output to toggle multiple times Dynamic hazards 10

Dynamic hazards 3 A 2 B C B 1 1 C F A B

Dynamic hazards 3 A 2 B C B 1 1 C F A B 2 B 3 F Dynamic hazard 11

Eliminating static hazards n Key idea: Glitches happen when a changing input spans separate

Eliminating static hazards n Key idea: Glitches happen when a changing input spans separate K-map encirclements ¡ Example: 1101 to 0101 change can cause a static-1 glitch A AB CD 00 01 11 10 00 0 0 1 1 C 01 1 1 11 1 1 0 0 10 0 0 B D 12

Eliminating static hazards n ABCD: 1101 0101 A AB CD 00 01 11 10

Eliminating static hazards n ABCD: 1101 0101 A AB CD 00 01 11 10 00 0 0 1 1 F = AC' + A'D 0 1 1 1 0 1 A C' A' D 1 0 0 F 1 0 0 1 C 01 1 1 11 1 1 0 0 10 0 0 D B 13

Eliminating static hazards n Solution: Add redundant K-map encirclements Ensure that all single-bit changes

Eliminating static hazards n Solution: Add redundant K-map encirclements Ensure that all single-bit changes are covered by same block ¡ First eliminate static-1 hazards: Use SOP form ¡ If need to eliminate static-0 hazards, use POS form Technique only works for 2 -level logic ¡ n 14

Eliminating static hazards A AB CD 00 01 11 10 00 0 0 1

Eliminating static hazards A AB CD 00 01 11 10 00 0 0 1 1 F = AC' + A'D + C'D A C' A' D C' D F C 01 1 1 11 1 1 0 0 10 0 0 D B 15

Summary of hazards n We can eliminate static hazards in 2 -level logic for

Summary of hazards n We can eliminate static hazards in 2 -level logic for single-bit changes ¡ n Eliminating static hazards also eliminates dynamic hazards Hazards are a difficult problem ¡ ¡ ¡ Multiple-bit changes in 2 -level logic are hard Static hazards in multilevel logic are harder Dynamic hazards in multilevel logic are harder yet 16