Analysis of sequential circuit Moore- and Mealy models ...

30
Lecture 4 Analysis of sequential circuit Moore- and Mealy models Synthesis of sequential circuit 1 TNE094 Digitalteknik och konstruktion Lecture 4

Transcript of Analysis of sequential circuit Moore- and Mealy models ...

Page 1: Analysis of sequential circuit Moore- and Mealy models ...

Lecture 4

• Analysis of sequential circuit • Moore- and Mealy models • Synthesis of sequential circuit

1 TNE094 Digitalteknik och konstruktion

Lecture 4

Page 2: Analysis of sequential circuit Moore- and Mealy models ...

Model for Moore type sequential circuit

TNE094 Digitalteknik och konstruktion Lecture 4

2

Page 3: Analysis of sequential circuit Moore- and Mealy models ...

Model for Mealy type sequential circuit

TNE094 Digitalteknik och konstruktion Lecture 4

3

Page 4: Analysis of sequential circuit Moore- and Mealy models ...

Synthesis of sequential circuit

1. Analysis of typical input and output data

2. Draw a state diagram

3. Draw a state table

4. Draw a state table after state assignment

5. Draw Karnaugh diagrams for all q+ and output signals

6. Write minimal SP-form logic expressions for q+ and output signals

7. Draw a circuit schematic diagram

TNE094 Digitalteknik och konstruktion

Lecture 4 4

Page 5: Analysis of sequential circuit Moore- and Mealy models ...

Example: Sdet1_mo (Moore type)

Step 1. Analysis of typical input and output data

TNE094 Digitalteknik och konstruktion Lecture 4

5

The Moore type sequence detector detects 3 consecutive 1’s in the input data.

Page 6: Analysis of sequential circuit Moore- and Mealy models ...

Step 2. Draw a state diagram (Moore type)

TNE094 Digitalteknik och konstruktion Lecture 4

6

Page 7: Analysis of sequential circuit Moore- and Mealy models ...

TNE094 Digitalteknik och konstruktion Lecture 4

7

Page 8: Analysis of sequential circuit Moore- and Mealy models ...

Step 3. Draw a state table (Moore type)

TNE094 Digitalteknik och konstruktion Lecture 4

8

Page 9: Analysis of sequential circuit Moore- and Mealy models ...

Step 4. Draw a state table after state assignment (state coding)

TNE094 Digitalteknik och konstruktion Lecture 4

9

Page 10: Analysis of sequential circuit Moore- and Mealy models ...

Step 5. Draw Karnaugh diagrams for q+ and output signals

TNE094 Digitalteknik och konstruktion Lecture 4

10

Step 6. Write logic expressions

Page 11: Analysis of sequential circuit Moore- and Mealy models ...

Step 7. Draw a circuit schematic diagram

TNE094 Digitalteknik och konstruktion Lecture 4

11

Page 12: Analysis of sequential circuit Moore- and Mealy models ...

Other possible codes for state coding

• Gray code

TNE094 Digitalteknik och konstruktion Lecture 4

12

Page 13: Analysis of sequential circuit Moore- and Mealy models ...

• One-hot code

TNE094 Digitalteknik och konstruktion Lecture 4

13

Page 14: Analysis of sequential circuit Moore- and Mealy models ...

TNE094 Digitalteknik och konstruktion Lecture 4

14

Moore type sequence detector, Sdet1_mo The Moore type sequence detector detects 3 consecutive 1’s in the input data.

Page 15: Analysis of sequential circuit Moore- and Mealy models ...

Mealy type sequence detector, Sdet1_me The Mealy type sequence detector detects 3

consecutive 1’s in the input data.

TNE094 Digitalteknik och konstruktion Lecture 4

15

Notice that State 11 is not used.

Page 16: Analysis of sequential circuit Moore- and Mealy models ...

TNE094 Digitalteknik och konstruktion Lecture 4

16

Compare timing diagrams of Sdet1_mo and Sdet1_me

Page 17: Analysis of sequential circuit Moore- and Mealy models ...

Schematic diagram of Sdet1_me (Mealy type)

TNE094 Digitalteknik och konstruktion Lecture 4

17

Page 18: Analysis of sequential circuit Moore- and Mealy models ...

Example: TwoComp

TNE094 Digitalteknik och konstruktion Lecture 4

18

Page 19: Analysis of sequential circuit Moore- and Mealy models ...

Two’s complement of a binary number

TNE094 Digitalteknik och konstruktion Lecture 4

19

Page 20: Analysis of sequential circuit Moore- and Mealy models ...

8-bit binary number in 2’s complement representation

TNE094 Digitalteknik och konstruktion Lecture 4

20

Page 21: Analysis of sequential circuit Moore- and Mealy models ...

TwoComp (Mealy type)

TNE094 Digitalteknik och konstruktion Lecture 4

21

Step 1. Analysis of typical input and output data

01010100 -> 10101100

Step 2. Draw a state diagram (Mealy type)

Page 22: Analysis of sequential circuit Moore- and Mealy models ...

TNE094 Digitalteknik och konstruktion Lecture 4

22

Step 3. Draw a state table (Mealy type)

Page 23: Analysis of sequential circuit Moore- and Mealy models ...

TNE094 Digitalteknik och konstruktion Lecture 4

23

Step 4. Draw a state table after state assignment (state coding)

Page 24: Analysis of sequential circuit Moore- and Mealy models ...

TNE094 Digitalteknik och konstruktion Lecture 4

24

Step 5. Draw Karnaugh diagrams for q+ and output signals

Step 6. Write logic expressions

Page 25: Analysis of sequential circuit Moore- and Mealy models ...

TNE094 Digitalteknik och konstruktion Lecture 4

25

Step 7. Draw a circuit schematic diagram

Page 26: Analysis of sequential circuit Moore- and Mealy models ...

Timing diagram of TwoComp (Mealy type)

TNE094 Digitalteknik och konstruktion Lecture 4

26

Page 27: Analysis of sequential circuit Moore- and Mealy models ...

Transform a Mealy type state diagram to a Moore type state diagram

TNE094 Digitalteknik och konstruktion Lecture 4

27

Page 28: Analysis of sequential circuit Moore- and Mealy models ...

Sequence generator Sgen1

TNE094 Digitalteknik och konstruktion Lecture 4

28

Page 29: Analysis of sequential circuit Moore- and Mealy models ...

State diagram of Sgen1

TNE094 Digitalteknik och konstruktion Lecture 4

29

Page 30: Analysis of sequential circuit Moore- and Mealy models ...

General model of sequential circuits

TNE094 Digitalteknik och konstruktion Lecture 4

30