cmput329 - fall 2003

38
CMPUT 329 - Computer Org anization and Architectu re II 1 CMPUT329 - Fall 2003 Topic C: State Minimization José Nelson Amaral

Upload: freya-gaines

Post on 01-Jan-2016

38 views

Category:

Documents


0 download

DESCRIPTION

CMPUT329 - Fall 2003. Topic C: State Minimization José Nelson Amaral. Reading Assignment. Chapter 7, section 7.10.3. N 1. Z 1. p. X. N 2. Z 2. q. Equivalent States. Given two sequential circuits N 1 and N 2. Let Z 1 be the output sequence produced from state p in N 1 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

1

CMPUT329 - Fall 2003

Topic C: State Minimization José Nelson Amaral

Page 2: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

2

Reading Assignment

Chapter 7, section 7.10.3

Page 3: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

3

Equivalent States

State p in N1 is equivalent to a state q in N2 if Z1= Z2 for all input sequences X.

N1

N2

p

qX

Z1

Z2

Given two sequential circuits N1 and N2.

Let Z1 be the output sequence produced from state p in N1with input sequence X.

Let Z2 be the output sequence produced from state q in N2with input sequence X.

Page 4: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

4

How to Find Equivalent States?

States that have the same next states and thatproduce the same output are equivalent.

Page 5: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

5

Eliminating Redundant States by Row Matching

Next State Present Output

Present State

X=0 X=1 X=0 X=1 A B C 0 0 B D E 0 0 C F G 0 0 D H I 0 0 E J K 0 0 F L M 0 0 G N P 0 0 H A A 0 0 I A A 0 0 J A A 0 1 K A A 0 0 L A A 0 1 M A A 0 0 N A A 0 0 P A A 0 0

HH

H HH

Page 6: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

6

Eliminating Redundant States by Row Matching

Next State Present Output

Present State

X=0 X=1 X=0 X=1 A B C 0 0 B D E 0 0 C F G 0 0 D H H 0 0 E J H 0 0 F L H 0 0 G H H 0 0 H A A 0 0 J A A 0 1 L A A 0 1

J

Next State Present Output

Present State

X=0 X=1 X=0 X=1 A B C 0 0 B D E 0 0 C F G 0 0 D H I 0 0 E J K 0 0 F L M 0 0 G N P 0 0 H A A 0 0 I A A 0 0 J A A 0 1 K A A 0 0 L A A 0 1 M A A 0 0 N A A 0 0 P A A 0 0

HH

H HH

Page 7: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

7

Eliminating Redundant States by Row Matching

Next State Present Output

Present State

X=0 X=1 X=0 X=1 A B C 0 0 B D E 0 0 C F G 0 0 D H H 0 0 E J H 0 0 F J H 0 0 G H H 0 0 H A A 0 0 J A A 0 1

D

Next State Present Output

Present State

X=0 X=1 X=0 X=1 A B C 0 0 B D E 0 0 C F D 0 0 D H H 0 0 E J H 0 0 F J H 0 0 H A A 0 0 J A A 0 1

E

Page 8: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

8

Eliminating Redundant States by Row Matching

Next State Present Output

Present State

X=0 X=1 X=0 X=1 A B C 0 0 B D E 0 0 C E D 0 0 D H H 0 0 E J H 0 0 H A A 0 0 J A A 0 1

Next State Present Output

Present State

X=0 X=1 X=0 X=1 A B C 0 0 B D E 0 0 C F G 0 0 D H I 0 0 E J K 0 0 F L M 0 0 G N P 0 0 H A A 0 0 I A A 0 0 J A A 0 1 K A A 0 0 L A A 0 1 M A A 0 0 N A A 0 0 P A A 0 0

Page 9: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

9

Equivalent States

States that have equivalent next states and thatproduce the same output are also equivalent.

But these equivalences cannot be identifiedby inspection of the state table.

How can we identify these states?

Page 10: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

10

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b

c

d

e

f

g

h

a b c d e f g

Page 11: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

11

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b

c

d

e

f

g

h

a b c d e f g

Page 12: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

12

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b

c

d

e

f

g

h

a b c d e f g

Page 13: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

13

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b

c

d

e

f

g

h

a b c d e f g

d-fc-h

Page 14: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

14

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b

c

d

e

f

g

h

a b c d e f g

d-fc-h

a-dc-e

Page 15: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

15

Implication Table Method

b

c

d

e

f

g

h

a b c d e f g

d-fc-h

c-e

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

Page 16: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

16

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b

c

d

e

f

g

h

a b c d e f g

d-fc-h

c-e

b-dc-h

Page 17: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

17

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b-f

a-be-h

e-fb-d

c-fa-b

a-d

a-fe-h

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

d-fc-h

c-e

b-dc-h

Page 18: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

18

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b-f

a-be-h

e-fb-d

c-fa-b

a-d

a-fe-h

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

d-fc-h

c-e

b-dc-h

Page 19: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

19

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b-f

a-be-h

e-fb-d

c-fa-b

a-d

a-fe-h

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 20: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

20

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b-f

a-be-h

e-fb-d

c-fa-b

a-d

a-fe-h

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 21: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

21

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b-f

a-be-h

e-fb-d

c-fa-b

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 22: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

22

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

b-f

a-be-h

e-fb-d

c-fa-b

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 23: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

23

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-be-h

e-fb-d

c-fa-b

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 24: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

24

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-be-h

e-fb-d

c-fa-b

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 25: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

25

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-be-h

c-fa-b

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 26: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

26

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-be-h

c-fa-b

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 27: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

27

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

c-fa-b

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 28: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

28

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

c-fa-b

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 29: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

29

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 30: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

30

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

c-ed-g

a-gc-fb-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 31: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

31

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

c-ed-g

a-g

b

c

d

e

f

g

h

a b c d e f g

c-e

b-dc-h

Page 32: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

32

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

c-ed-g

a-g

b

c

d

e

f

g

h

a b c d e f g

c-e

Page 33: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

33

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

a-g

b

c

d

e

f

g

h

a b c d e f g

c-e

Page 34: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

34

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

b

c

d

e

f

g

h

a b c d e f g

c-e

a c

d e

1

0

1

010

0

1

Page 35: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

35

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

b

c

d

e

f

g

h

a b c d e f g

c-e

a

c-e

d

1

0

1

10

1

0

Page 36: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

36

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

b

c

d

e

f

g

h

a b c d e f g

c-e

a-d c-e

10

10

Page 37: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

37

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

b

c

d

e

f

g

h

a b c d e f g

c-e

a

a

Page 38: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

38

Implication Table Method

Next State

Present State

X=0 X=1

Present Output

a d c 0 b f h 0 c e d 1 d a e 0 e c a 1 f f b 1 g b h 0 h c g 1

a-d

b

c

d

e

f

g

h

a b c d e f g

c-e

a

ac