Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang [email protected] Assistant...

27
Unit 13 Unit 13 Analysis of Analysis of Clocked Sequential Clocked Sequential Circuits Circuits Ku-Yaw Chang Ku-Yaw Chang [email protected] [email protected] Assistant Professor, Department of Assistant Professor, Department of Computer Science and Information Engineering Computer Science and Information Engineering Da-Yeh University Da-Yeh University

Transcript of Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang [email protected] Assistant...

Page 1: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

Unit 13Unit 13Analysis ofAnalysis of

Clocked Sequential CircuitsClocked Sequential Circuits

Ku-Yaw ChangKu-Yaw [email protected]@mail.dyu.edu.tw

Assistant Professor, Department of Assistant Professor, Department of Computer Science and Information EngineeringComputer Science and Information Engineering

Da-Yeh UniversityDa-Yeh University

Page 2: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

222004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

OutlineOutline

13.113.1 A Sequential Parity CheckerA Sequential Parity Checker

13.213.2 Analysis by Signal Tracing andAnalysis by Signal Tracing and Timing Charts Timing Charts

13.3 State Tables and Graphs13.3 State Tables and Graphs

13.4 General Models for Sequential Circuits13.4 General Models for Sequential Circuits

Page 3: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

332004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

State TablesState Tables

Page 4: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

442004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

State GraphState Graph

Page 5: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

552004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

1.1. Determine the flip-flop input equations and the Determine the flip-flop input equations and the output equations from the circuit.output equations from the circuit.

2.2. Derive the next-state equation for each flip-flop Derive the next-state equation for each flip-flop from its input equations, using one of the from its input equations, using one of the following relations:following relations:

D flip-flop QD flip-flop Q++ = D = DT flip-flop QT flip-flop Q++ = T = T Q Q

: :3.3. Plot a next-state map for each flip-flop.Plot a next-state map for each flip-flop.4.4. Combine these maps to form the state table.Combine these maps to form the state table.

A transition tableA transition table

Page 6: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

662004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

First ExampleFirst Example

Page 7: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

772004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

1.1. Determine the flip-flop input equations and the Determine the flip-flop input equations and the output equations from the circuit.output equations from the circuit.

2.2. Derive the next-state equation for each flip-flop Derive the next-state equation for each flip-flop from its input equations, using one of the from its input equations, using one of the following relations:following relations:

D flip-flop QD flip-flop Q++ = D = DT flip-flop QT flip-flop Q++ = T = T Q Q

: :3.3. Plot a next-state map for each flip-flop.Plot a next-state map for each flip-flop.4.4. Combine these maps to form the state table.Combine these maps to form the state table.

A transition tableA transition table

Page 8: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

882004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

Determine the flip-flop input equations and the Determine the flip-flop input equations and the output equations from the circuit.output equations from the circuit.

DDAA = X = X B’ B’

DDBB = X + A = X + A

Z = A Z = A B B

Page 9: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

992004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

1.1. Determine the flip-flop input equations and the Determine the flip-flop input equations and the output equations from the circuit.output equations from the circuit.

2.2. Derive the next-state equation for each flip-flop Derive the next-state equation for each flip-flop from its input equationsfrom its input equations, using one of the , using one of the following relations:following relations:

D flip-flop QD flip-flop Q++ = D = DT flip-flop QT flip-flop Q++ = T = T Q Q

: :3.3. Plot a next-state map for each flip-flop.Plot a next-state map for each flip-flop.4.4. Combine these maps to form the state table.Combine these maps to form the state table.

A transition tableA transition table

Page 10: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

10102004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

2.2. Derive the next-state equation for each flip-flop Derive the next-state equation for each flip-flop from its input equations, using one of the from its input equations, using one of the following relations:following relations:

D flip-flop D flip-flop QQ++ = D = DD-CE flip-flop D-CE flip-flop QQ++ = D = D ·· CE + Q CE + Q ·· CE’ CE’T flip-flop T flip-flop QQ++ = T = T Q QS-R flip-flop S-R flip-flop QQ++ = S + R’Q = S + R’QJ-K flip-flop J-K flip-flop QQ++ = JQ’ + K’Q = JQ’ + K’Q

AA++ = X = X B’ B’ BB++ = X + A = X + A

Page 11: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

11112004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

1.1. Determine the flip-flop input equations and the Determine the flip-flop input equations and the output equations from the circuit.output equations from the circuit.

2.2. Derive the next-state equation for each flip-flop Derive the next-state equation for each flip-flop from its input equations, using one of the from its input equations, using one of the following relations:following relations:

D flip-flop QD flip-flop Q++ = D = DT flip-flop QT flip-flop Q++ = T = T Q Q

: :3.3. Plot a next-state map for each flip-flop.Plot a next-state map for each flip-flop.4.4. Combine these maps to form the state table.Combine these maps to form the state table.

A transition tableA transition table

Page 12: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

12122004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

3.3. Plot a next-state map for each flip-flop.Plot a next-state map for each flip-flop.

A+ = X B’B+ = X + A

Page 13: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

13132004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

1.1. Determine the flip-flop input equations and the Determine the flip-flop input equations and the output equations from the circuit.output equations from the circuit.

2.2. Derive the next-state equation for each flip-flop Derive the next-state equation for each flip-flop from its input equations, using one of the from its input equations, using one of the following relations:following relations:

D flip-flop QD flip-flop Q++ = D = DT flip-flop QT flip-flop Q++ = T = T Q Q

: :3.3. Plot a next-state map for each flip-flop.Plot a next-state map for each flip-flop.4.4. Combine these maps to form the state table.Combine these maps to form the state table.

A transition tableA transition table

Page 14: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

14142004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

4.4. Combine these maps to form the state table.Combine these maps to form the state table. A transition tableA transition table

Page 15: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

15152004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Moore State GraphMoore State Graph

Page 16: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

16162004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Second ExampleSecond Example

Page 17: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

17172004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

Determine the flip-flop input equations and the Determine the flip-flop input equations and the output equations from the circuit.output equations from the circuit.

JJAA = XB, K = XB, KAA = X = X

JJBB = X, K = X, KBB = XA = XA

Z = XB’+XA+X’A’BZ = XB’+XA+X’A’B

Page 18: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

18182004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

2.2. Derive the next-state equation for each flip-flop Derive the next-state equation for each flip-flop from its input equations, using one of the from its input equations, using one of the following relations:following relations:

D flip-flop D flip-flop QQ++ = D = DD-CE flip-flop D-CE flip-flop QQ++ = D = D ·· CE + Q CE + Q ·· CE’ CE’T flip-flop T flip-flop QQ++ = T = T Q QS-R flip-flop S-R flip-flop QQ++ = S + R’Q = S + R’QJ-K flip-flop J-K flip-flop QQ++ = JQ’ + K’Q = JQ’ + K’Q

AA++ = J = JAAA’ + KA’ + KAA’A = XBA’ + X’A’A = XBA’ + X’A

BB++ = J = JBBB’ + KB’ + KBB’B = XB’ + (AX)’B = XB’+ X’B + A’B’B = XB’ + (AX)’B = XB’+ X’B + A’B Z = X’A’B + XB’ + XAZ = X’A’B + XB’ + XA

Page 19: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

19192004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

3.3. Plot a next-state and output map.Plot a next-state and output map.

Page 20: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

20202004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Construct the State TableConstruct the State Table

4.4. Combine these maps to form the state table.Combine these maps to form the state table.

Page 21: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

21212004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Mealy State GraphMealy State Graph

Page 22: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

22222004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Third ExampleThird Example

Serial AdderSerial Adderxxii yyii ccii cci+1i+1 ssii

00 00 00 00 00

00 00 11 00 11

00 11 00 00 11

00 11 11 11 00

11 00 00 00 11

11 00 11 11 00

11 11 00 11 00

11 11 11 11 11

Page 23: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

23232004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Timing DiagramTiming Diagram

Page 24: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

24242004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Serial AdderSerial Adder

Initially the carry flip-flop must be clearedInitially the carry flip-flop must be cleared CC00=0=0

Start by adding the least-significant Start by adding the least-significant (rightmost) bits in each word.(rightmost) bits in each word.

Reading the sum output just before the Reading the sum output just before the rising edge of the clockrising edge of the clock

Page 25: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

25252004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

State GraphState Graph

A Mealy machineA Mealy machine Inputs: xInputs: xii and y and yii

Output: sOutput: sii

Two states represent Two states represent a carry (ca carry (cii)) SS00 for 0 and S for 0 and S11 for 1 for 1

Page 26: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

26262004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Multiple Inputs and OutputsMultiple Inputs and Outputs

Page 27: Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information.

27272004/05/242004/05/24 Analysis of Clocked Sequential CircuitsAnalysis of Clocked Sequential Circuits

Multiple Inputs and OutputsMultiple Inputs and Outputs