Lecture 11 Timing diagrams Hazards.

21
1 Lecture 11 Timing diagrams Hazards

description

Timing diagrams (waveforms) Shows time-response of circuits Like a sideways truth table Example: F = A + BC

Transcript of Lecture 11 Timing diagrams Hazards.

Page 1: Lecture 11 Timing diagrams Hazards.

1

Lecture 11

Timing diagrams Hazards

Page 2: Lecture 11 Timing diagrams Hazards.

2

Timing diagrams (waveforms)

Shows time-response of circuits Like a sideways truth table Example: F = A + BC

Page 3: Lecture 11 Timing diagrams Hazards.

3

Timing diagrams

Real gates have real delays Example: A' • A = 0?

Delays cause transient F=1

FA B C D

time

width of 3 gate delays

Page 4: Lecture 11 Timing diagrams Hazards.

4

F = A + BC in 2-level logic

minimized product-of-sums

F1

F2

F3

B

C

A

F4

canonical product-of-sums

minimized sum-of-products

canonical sum-of-products

Page 5: Lecture 11 Timing diagrams Hazards.

5

Timing diagram for F = A + BC

Time waveforms for F1 – F4 are identical except for glitches

Page 6: Lecture 11 Timing diagrams Hazards.

6

Hazards and glitches

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

Page 7: Lecture 11 Timing diagrams Hazards.

7

Hazards and glitches

Solutions Design hazard-free circuits

Difficult when logic is multilevel Wait until signals are stable

Page 8: Lecture 11 Timing diagrams Hazards.

8

Types of hazards

Static 1-hazard Output should stay logic 1 Gate delays cause brief glitch to logic 0

Static 0-hazard Output should stay logic 0 Gate delays cause brief glitch to logic 1

Dynamic hazards Output should toggle cleanly Gate delays cause multiple transitions

10 0

1 10 0

1 10 0

01 1

Page 9: Lecture 11 Timing diagrams Hazards.

9

Static hazards

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

Page 10: Lecture 11 Timing diagrams Hazards.

10

Static hazards

F

A

B

S

S'

F

static-0 hazard

AS

B

S'

A multiplexer

Page 11: Lecture 11 Timing diagrams Hazards.

11

Timing diagram for F = A + BC

Page 12: Lecture 11 Timing diagrams Hazards.

12

F = A + BC in 2-level logic

F3

B

C

A

canonical product-of-sums

0

0

0

1

Page 13: Lecture 11 Timing diagrams Hazards.

13

Timing diagram for F = A + BC

Page 14: Lecture 11 Timing diagrams Hazards.

14

F = A + BC in 2-level logic

01

10

F1B

C

A

canonical sum-of-products10

Page 15: Lecture 11 Timing diagrams Hazards.

15

Dynamic hazards

Often occurs when a literal assumes multiple values Through different paths with different

delays Causes an output to toggle multiple times

Dynamic hazards

Page 16: Lecture 11 Timing diagrams Hazards.

16

Dynamic hazards

A

C

B1

B2

B3

F

Dynamic hazard

A

C

B

F

1

2

3

Page 17: Lecture 11 Timing diagrams Hazards.

17

Eliminating static hazards

Key idea: Glitches happen when a changing input spans separate K-map encirclements Example: 1101 to 0101 change can cause a

static-1 glitch

0 0 1 11 1 1 11 1 0 00 0 0 0

ABCD

B

D

00 01 11 10000111

10C

A

Page 18: Lecture 11 Timing diagrams Hazards.

18

Eliminating static hazards

AC'A'D

F

0 0 1 11 1 1 11 1 0 00 0 0 0

ABCD

B

D

00 01 11 10000111

10C

AF = AC' +

A'D1101

0101

0111

1

01

0

00

0

11

ABCD: 1101 0101

Page 19: Lecture 11 Timing diagrams Hazards.

19

Eliminating static hazards

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

Page 20: Lecture 11 Timing diagrams Hazards.

20

Eliminating static hazards

AC'A'D F

0 0 1 11 1 1 11 1 0 00 0 0 0

ABCD

B

D

00 01 11 10000111

10C

A

C'D

F = AC' + A'D + C'D

Page 21: Lecture 11 Timing diagrams Hazards.

21

Summary of hazards

We can eliminate static hazards in 2-level logic for single-bit changes 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