Top Banner
How Computers Work Lecture 7 Page 1 How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines
30

How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

Jan 27, 2016

Download

Documents

Vourou Vourou

How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines. D. Q. CLK. What do these have in common?. A. 0. Q. B. 1. S. The Selector. Truth Table S Q 0 A 1 B. No bubble, so positive logic (H = 1 , L = 0). B. AB. 00. 01. 11. 10. S. 0. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 1

How Computers WorkLecture 7

Under the Hood of Synchronous Finite State Machines

Page 2: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 2

What do these have in common?

D Q

CLK

Page 3: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 3

The Selector

A

B

Q

S

0

1

No bubble, so positive logic(H = 1 , L = 0)

Truth Table

S Q

0 A1 B

Page 4: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 4

The Selector’s K-Map

SAB

00 01 11 10

0

1

A

B

S

Truth Table

S Q

0 A1 B 0000 11 11

111100 00

Page 5: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 5

Selector’s K-Map

SAB

00 01 11 10

0

1

A

B

S

A

B

S

0

1 1 1

1 1

00

0 0

P1

P2

Page 6: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 6

Review: The Selector’s MinimumSOP Implementation

P1

P2

Q

SB

A

Page 7: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 7

The Trouble with Transitions

Suppose: A = B = 1 (H)

S:

P1

P2

Q

Page 8: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 8

Hazards• Static Hazards:

Output Enters Forbidden Zone Unnecessarily– 1-Hazards– 0-Hazards

• Dynamic Hazards:Output Enters Same Valid Zone Again after

Entering Opposite Valid Zone– 0-1 Hazards– 1-0 Hazards

Page 9: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 9

What You Should Expect

S

H

H

S

Q

Q

T cd = t pd minT cd = t pd min

T pd maxT pd max

Page 10: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 10

What Hazard-Free Means

S

H

H

S

Q

Q

Page 11: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 11

Fundamental Mode SIC (Single Input Change) rule

• Only 1 Input Bit Can Change “At a Time”

> Tw

Page 12: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 12

Fixing the Selector’s 1-Hazardwith a redundant product term

SAB

00 01 11 10

0

1

A

B

S

0

0 1 1

110

0

S

A

B

Page 13: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 13

Rules for Fixing Hazardsin SIC SOP situations

• Avoid using X and X in a single product term– This insures product terms have no SIC hazards

• prevents all dynamic hazards and static 0-hazards

• Cover all adjacent 1 cells in K-map with at least 1 product term– This insures at least 1 product term remains steadily high

during SIC• prevents static 1-hazards

• Remember - This Only Applies for SIC !!!

Page 14: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 14

A First Taste of Asynchronous (Fundamental Mode)

State Machines

D

G

Q0

1

MUX Implementationof the Transparent Latch

G

D

Q

Yea!

Page 15: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 15

State Diagramof D-Latch

0 1

G D

G D

G + DG + D

D Q

G

Page 16: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 16

Definition:Fundamental Mode

Finite State Machine (FSM)

• Finite # of States• Output = f(State, Input)

– May just be f(State)

• State Transitions occur asynchronously due to asynchronous (no clock) input level changes.

Page 17: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 17

Architecture ofFundamental Mode FSM

C.L.

IN OUT

STATE

Page 18: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 18

Fundamental Mode SIC (Single Input Change) rule

• Only 1 Input Bit Can Change “At a Time”

> Tw

Page 19: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 19

SIC Conditions for theTransparent Latch

D

G

Ts = ____________________

Th = ________________

Setup timeSetup time

Hold timeHold time

Page 20: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 20

The Set-Reset (SR) Flip-Flop

S

R

Q

S

SR00 01 11 10

0H

1L

S

R

Q

0H

1L 0H 1L

1L1L0H

1L

Q

0 1 S + R

R S

S

Page 21: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 21

Dual Forms of SR Flops

S

R

Q

Q

S

R

Q

Q

Note : Q is true inverse of Q only when S R = 0

Page 22: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 22

Simple Rules for 2-State Fundamental Mode State

Machines• SIC Assumption

• No Free-Running Oscillators

• Logic Is Hazard-Free

0 1

Set

Reset

ResetSet

Page 23: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 23

More Complex Fundamental Mode FSMs

• > 2 States possible, with somewhat more complex rules

• Good behavior for non-SIC also possible, with somewhat more complex rules

• Only Certain Hazards are Important

For More Information, read:

The Essence of Logic Circuits, by Stephen H. Unger, Prentice-Hall, 1989.

Page 24: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 24

Building a Latchfrom an SR Flop

G

D

R

S

_____

_____QQ

_Q

_Q

Page 25: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 25

The Edge-Triggered Flip-Flop(also called D-FF or Register)

D Q

CLK

CLK

D

Q

Page 26: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 26

Building an Edge Triggered FFout of 2 Latches

D Q

G

D Q

G

D Q

CLK

CLK=_________

CLK=_________

HH

LL

Page 27: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 27

Edge-Triggered F-F Timing

D

CLK

Ts = ____________________

Th = ________________Hold TimeHold Time

Setup TimeSetup Time

Page 28: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 28

A Pneumatic Flip-Flop

Page 29: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 29

A Mechanical Flip-Flop

• Clock Escapement

Page 30: How Computers Work Lecture 7 Under the Hood of Synchronous Finite State Machines

How Computers Work Lecture 7 Page 30

Another Exampleof a Flip-Flop

1 Sear - lets hammer fall when trigger is pulled.2 Hammer hits firing pin, pin dents primer, ignites gunpowder, propels bullet.3 Gas from burning gunpowder opens bolt, ejects case, pulls hammer back4 Disconnector - holds hammer back

Semi-Automatic : until trigger is releasedFully-Automatic : until bolt fully closes