Presentation is loading. Please wait.

Presentation is loading. Please wait.

COE 202: Digital Logic Design Sequential Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem.

Similar presentations


Presentation on theme: "COE 202: Digital Logic Design Sequential Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem."— Presentation transcript:

1 COE 202: Digital Logic Design Sequential Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem

2 Objectives Analysis of Synchronous Sequential Circuits Procedure Examples KFUPM

3 Analysis of Sequential Circuits Analysis is describing what a given circuit will do The behavior of a clocked (synchronous) sequential circuit is determined from the inputs, the output, and the states of FF Steps: Obtain state equations FF input equations Output equations Fill the state table Put all combinations of inputs and current states Fill the next state and output Draw the state diagram KFUPM

4 Analysis of Combinational vs Sequential Circuits Combinational : Boolean Equations Truth Table Output as a function of inputs Sequential : State Equations State Table State Diagram Output as a function of input and current state Next state as a function of inputs and current state. KFUPM

5 State Equations A state equation is a Boolean expression which specifies the next state and output as a function of the present state and inputs. Example: The shown circuit has two D-FFs (A,B), an input x and output y. The D input of a FF determines the next state A(t+1) = A(t)x+B(t)x = Ax+Bx B(t+1) = A(t)x = Ax Output: y = (A+B)x KFUPM

6 State Table A state table is a table enumerating all present states, inputs, next states and outputs. Present state, inputs: list all combinations Next states, outputs: derived from state equations KFUPM 4 sections

7 State Table KFUPM 2-D Form A state table is a table enumerating all present states, inputs, next states and outputs. Present state, inputs: list all combinations Next states, outputs: derived from state equations

8 State Diagram The state diagram is a graphical representation of a state table (provides same information) Circles are states (FFs), Arrows are transitions between states Labels of arrows represent inputs and outputs KFUPM

9 Analysis of Sequential Circuits Analysis is describing what a given circuit will do The behavior of a clocked (synchronous) sequential circuit is determined from the inputs, the output, and the states of FF Steps: Obtain state equations FF input equations Output equations Fill the state table Put all combinations of inputs and current states Fill the next state and output Draw the state diagram KFUPM

10 Example 1 Analyze this circuit? Is this a sequential circuit? Why? How many inputs? How many outputs? How many states? What type of memory? KFUPM

11 Example 1 (cont.) KFUPM Q(t)DQ(t+1) D Q(t+1) = D Characteristic Tables and Equations D Flip Flop (review)

12 Example 1 (cont.) KFUPM

13 Example 1 (cont.) State equations: D A = AX + BX D B = A X Y = (A + B) X KFUPM

14 Example 1 (cont.) State equations: D A = AX + BX D B = A X Y = (A + B) X State table: KFUPM

15 Example 1 (cont.) State equations: D A = AX + BX D B = A X Y = (A + B) X State table (2D): KFUPM

16 Example 1 (cont.) State equations: D A = AX + BX D B = A X Y = (A + B) X State table: KFUPM State diagram:

17 Example 2 KFUPM Analyze this circuit. What about the output? This circuit is an example of a Moore machine (output depends only on current state) Mealy machines is the other type (output depends on inputs and current states)

18 Example 2 (cont.) Equation: D A = A X Y KFUPM

19 Example 2 (cont.) KFUPM Equation: D A = A X Y

20 Example 3 KFUPM Analyze this circuit? Is this a sequential circuit? Why? How many inputs? How many outputs? How many states? What type of memory?

21 Example 3 (cont.) KFUPM JKQ(t+1) 00Q(t) Q(t+1) = JQ + KQ Characteristic Tables and Equations JK Flip Flop (review)

22 Example 3 (cont.) KFUPM

23 Example 3 (cont.) KFUPM State equations: J A = B, K A = B X J B = X, K B = A X by substitution: A = J A A + K A A = A B + A B + A X B = B X + A B X + A B X

24 Example 3 (cont.) KFUPM State equations: J A = B, K A = B X J B = X, K B = A X by substitution: A = J A A + K A A = A B + A B + A X B = B X + A B X + A B X

25 Example 3 (cont.) KFUPM State equations: J A = B, K A = B X J B = X, K B = A X by substitution: A = J A A + K A A = A B + A B + A X B = B X + A B X + A B X

26 Example 4 KFUPM Analyze this circuit? Is this a sequential circuit? Why? How many inputs? How many outputs? How many states? What type of memory?

27 Example 4 (cont.) State equations: J A = BX K A = BX + BX D B = X Y = XAB by substitution: A(t+1) = J A A + K A A KFUPM

28 Example 4 (cont.) KFUPM Current StateInputNext StateOutput A(t)B(t)XA(t+1)B(t+1)Y State equations: J A = BX K A = BX + BX D B = X Y = XAB by substitution: A(t+1) = J A A + K A A

29 Example 5 KFUPM Analyze this circuit? Is this a sequential circuit? Why? How many inputs? How many outputs? How many states? What type of memory?

30 Example 5 (cont.) KFUPM TQ(t+1) 0Q(t) 1 Q(t+1) = TQ + TQ Characteristic Tables and Equations T Flip Flop (review)

31 Example 5 (cont.) KFUPM

32 Example 5 (cont.) KFUPM State equations: T A = BX T B = X Y = AB by substitution: A(t+1) = T A A + T A A

33 Example 5 (cont.) KFUPM State equations: T A = BX T B = X Y = AB by substitution: A(t+1) = T A A + T A A

34 Example 5 (cont.) KFUPM State equations: T A = BX T B = X Y = AB by substitution: A(t+1) = T A A + T A A The output depends only on current state. This is a Moore machine What does this circuit do?

35 Mealy vs Moore Finite State Machine (FSM) Mealy FSM: Output depends on current state and input Output is not synchronized with the clock Moore FSM: Output depends on current state only KFUPM

36 Summary To analyze a sequential circuit: Obtain state equations FF input equations Output equations Fill the state table Put all combinations of inputs and current states Fill the next state and output For the next state use characteristic table/equation Draw the state diagram Two types of synchronous sequential circuits (Mealy and Moore) KFUPM


Download ppt "COE 202: Digital Logic Design Sequential Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem."

Similar presentations


Ads by Google