Presentation is loading. Please wait.

Presentation is loading. Please wait.

Finite State Machine, Memory Systems

Similar presentations


Presentation on theme: "Finite State Machine, Memory Systems"— Presentation transcript:

1 Finite State Machine, Memory Systems
Prof. Sin-Min Lee Department of Computer Science CS147 Lecture 11

2

3

4 Characteristic Equation of FFs

5

6

7 clk T clear 1 Q Note that when Clear is 1, everything goes to 0.
When Clear is 0, this does not affect the others. clk T clear Q 1

8 Finite State Machines and Flip-Flops
X/Y: x = input y = output Now, suppose we have an FSM with two states like this: Although it may be confusing, the inputs and outputs are labeled “0” and “1”, and our two states are also have the labels “0” and “1”. This somewhat awkward naming convention means it is easier to translate this to computer code later on.

9 Finite State Machines and Flip-Flops
We can think of the starting state as Q(t) and the ending state as Q(t+1), with x and y being our inputs and outputs, leading to this chart:

10 Implementing this FSM using a T Flip-Flop
Using the values from the first chart, we can get this second chart. Then, we apply the same reverse method to determine what input values we would need to arrive at the ones listed in this second chart.

11 Implementing this FSM using a T Flip-Flop
T = XQ' + X'Q

12 Implementing this FSM using a D Flip-Flop
This time we use the same FSM and same initial chart, but now derive an equation for D.

13 Implementing this FSM using a D Flip-Flop
Since this is a delay, the corresponding chart is the same.

14 Implementing JK Flip-Flop using only a T Flip-Flop
This is the final Karnaugh map and the associated equation for T.

15 Implementing T Flip-Flop using only a JK Flip-Flop
This time, we are doing the reverse again, asking what values of J and K will give us the corresponding values in the T chart above. 00 or 01 will give 0, so we enter “0X”. X is our “don't care” value; it can be 0 or 1.

16 Implementing T Flip-Flop using only a JK Flip-Flop
Once we derive all the values, we have to split this into two, in order to get an equation that defines J and another than defines K.

17 Implementing T Flip-Flop using only a JK Flip-Flop
Here is the final implementation.

18

19

20

21

22

23

24 Implementing JK Flip-Flop using only a T Flip-Flop
Note how the areas marked off with a blue box behave like a T flip-flop, while the area within the purple box behave like a D flip-flop. From this last chart, we can derive the following chart:

25 Implementing JK Flip-Flop using only a T Flip-Flop
To derive the next chart, we work in reverse, asking, “What is the input into the T (toggle) function that will result in the output shown in the previous chart?” In this case, the first column of Q is 0 and our circled value is a 0; a 0 will give this result. The input that will give us a 1, when Q is 1, is also 0. Refer back to the T flip-flop chart to see that on 0, there is no change; 1 “toggles”.

26 Implementing this FSM using a D Flip-Flop
Finally, here is our graph.

27 Processor/Memory Bus PCI Bus I/O Busses

28 Using T Flip Flop and JK Flip Flop
log24 = 2, so 2 flip flops are needed to implement this FSA

29 Step 1 - Translate diagram into State Table

30 Step 2 - Create maps for T and JK

31 Step 3 - Determine T, J, and K equations

32 Step 4 - Draw resulting diagram

33 Implementing FSM with No Inputs Using D, T, and JK Flip Flops
Convert the diagram into a chart

34 Implementing FSM with No Inputs Using D, T, and JK Flip Flops Cont.
For D and T Flip Flops

35 Implementing FSM with No Inputs Using D, T, and JK Flip Flops Cont.
For JK Flip Flop

36 Implementing FSM with No Inputs Using D, T, and JK Flip Flops Cont.
Final Implementation

37

38

39

40

41


Download ppt "Finite State Machine, Memory Systems"

Similar presentations


Ads by Google