Synthesis of Moore Machine Controllable Die Example - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Synthesis of Moore Machine Controllable Die Example

Description:

... a Die by Lighting up Combinations of 7 Lights to Form the Various Faces of a Die. ... Comb Ckt. Output Is Only a Function of Present State. Output. Clock ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 36
Provided by: teal9
Category:

less

Transcript and Presenter's Notes

Title: Synthesis of Moore Machine Controllable Die Example


1
Synthesis of Moore MachineControllable Die
Example
  • ECE-331, Digital Design
  • Dr. Ron Hayne
  • Electrical and Computer Engineering

2
Controllable Die Word Problem
  • Design an FSM to Simulate the Roll of a Die by
    Lighting up Combinations of 7 Lights to Form the
    Various Faces of a Die.
  • Assume the Die Is Controlled by Starting and
    Stopping a Clock Sufficiently Fast That User
    Cannot Make It Stop on a Particular Number.
  • Use Binary Encoded States

3
Controllable Die Word Problem
  • Include a Cheat/(Honest-Bar) Switch
  • C 0, outputs 1, 2, 3, 4, 5, 6
  • C 1, outputs 1, 2, 3, 4, 5, 6, 6
  • Design the Minimum Machine by Considering State 7
    a Dont Know.
  • Use D FFs to Store the State.
  • Implement as a synchronous Moore Machine.

4
Die Face of 7 lights
5
6 Die Face Patterns
1
2
3
4
5
6
6
Synchronous Moore Machine
Input
Comb Ckt
Output
Present State
Next State
Output Is Only a Function of Present State
Clock
7
Moore Die FSM
  • M ( S, I, O, ?, ? )
  • S 0, 1, 2, 3, 4, 5, 6, 7
  • I C 0, 1 Honest, Cheat
  • O a, b, c, d, e, f, g 7 lights
  • ? State/Output Diagram
  • ? State/Output Diagram

8
State Diagram Key
9
Moore Die FSM Abbreviated State Diagram
?
?
?
10
Flip-Flop Excitation Table
Q Q D T S R J K
0 0 0 0 0 d 0 d
0 1 1 1 1 0 1 d
1 0 0 1 0 1 d 1
1 1 1 0 d 0 d 0
11
Controllable Die State Table (1)
In Present State Present State Present State NextState NextState NextState Excit. Variables Excit. Variables Excit. Variables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables
mt C Q2 Q1 Q0 Q2 Q1 Q0 D2 D1 D0 a b c d e f g die
0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1
1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 2
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
12
Moore Die FSM Abbreviated State Diagram
?
?
?
13
Controllable Die State Table (1)
In Present State Present State Present State NextState NextState NextState Excit. Variables Excit. Variables Excit. Variables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables
mt C Q2 Q1 Q0 Q2 Q1 Q0 D2 D1 D0 a b c d e f g die
0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1
1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 2
2 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 3
3 0 0 1 1 1 0 0 1 0 0 1 1 0 0 0 1 1 4
4 0 1 0 0 1 0 1 1 0 1 1 1 0 1 0 1 1 5
5 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 1 1 6
6 0 1 1 0 TBD TBD TBD d d d 1 1 1 0 1 1 1 6
7 0 1 1 1 TBD TBD TBD d d d d d d d d d d d
14
Moore Die FSM Abbreviated State Diagram
?
?
?
15
Controllable Die State Table (2)
In Present State Present State Present State NextState NextState NextState Excit. Variables Excit. Variables Excit. Variables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables
mt C Q2 Q1 Q0 Q2 Q1 Q0 D2 D1 D0 a b c d e f g die
8 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1
9 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 2
10 1 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 3
11 1 0 1 1 1 0 0 1 0 0 1 1 0 0 0 1 1 4
12 1 1 0 0 1 0 1 1 0 1 1 1 0 1 0 1 1 5
13 1 1 0 1 1 1 0 1 1 0 1 1 1 0 1 1 1 6
14 1 1 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 6
15 1 1 1 1 TBD TBD TBD d d d d d d d d d d d
16
Minimization
  • Minimization Is Carried Out on All Output
    Variables and Excitation Variables
  • D-FFs Are Easy to Design with Because NS
    Excitation Variables
  • Other FFs Require Application of Excitation Table
    Depending on Type of FF

17
Minimization Example
18
After Minimization (1)
In Present State Present State Present State NextState NextState NextState Excit. Variables Excit. Variables Excit. Variables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables
mt C Q2 Q1 Q0 Q2 Q1 Q0 D2 D1 D0 a b c d e f g die
0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1
1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 2
2 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 3
3 0 0 1 1 1 0 0 1 0 0 1 1 0 0 0 1 1 4
4 0 1 0 0 1 0 1 1 0 1 1 1 0 1 0 1 1 5
5 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 1 1 6
6 0 1 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 6
7 0 1 1 1 1 0 0 1 0 0 1 1 1 0 1 1 1 6
19
After Minimization (2)
In Present State Present State Present State NextState NextState NextState Excit. Variables Excit. Variables Excit. Variables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables OutputVariables
mt C Q2 Q1 Q0 Q2 Q1 Q0 D2 D1 D0 a b c d e f g die
8 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1
9 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 2
10 1 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 3
11 1 0 1 1 1 0 0 1 0 0 1 1 0 0 0 1 1 4
12 1 1 0 0 1 0 1 1 0 1 1 1 0 1 0 1 1 5
13 1 1 0 1 1 1 0 1 1 0 1 1 1 0 1 1 1 6
14 1 1 1 0 0 0 0 0 0 0 1 1 1 0 1 1 1 6
15 1 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 6
20
State Diagram After Determining Dont Know States
6
21
Self-Starting
  • Two Choices to Insure Proper Machine Operation
  • Start machine in known state when power up
  • RC circuit connected to asynchronous clear
    input of state FFs initializes state to state 0
  • Minimize and verify that if machine starts in
    unallowed state, or erroneously gets to unallowed
    state, that it will jump back into proper
    operating state

22
Self-Starting
  • Depending on Machine Application, Self-Starting
    May Not Be Enough or Minimization May Cause
    Hazardous Operation
  • Launch weapon
  • Start equipment unexpectedly

23
Self-Starting Alternative
  • Do Not Design Minimum Machine, but Define All
    States and Outputs So That No Hazardous Situation
    Exists
  • More Costly, but Risk Associated With Not Doing
    It May Demand It
  • Die Example Is Self-starting Therefore Does Not
    Require Redesign

24
Design with J-K Flip-flops
Q Q D T S R J K
0 0 0 0 0 d 0 d
0 1 1 1 1 0 1 d
1 0 0 1 0 1 d 1
1 1 1 0 d 0 d 0
25
Controllable Die State Table (1)
In Present State Present State Present State NextState NextState NextState Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables
mt C Q2 Q1 Q0 Q2 Q1 Q0 J2 K2 J1 K1 J0 K0
0 0 0 0 0 0 0 1 0 d
1 0 0 0 1 0 1 0 0 d
2 0 0 1 0 0 1 1 0 d
3 0 0 1 1 1 0 0 1 d
4 0 1 0 0 1 0 1 d 0
5 0 1 0 1 0 0 0 d 1
6 0 1 1 0 TBD TBD TBD d d d d d d
7 0 1 1 1 TBD TBD TBD d d d d d d
26
Controllable Die State Table (2)
In Present State Present State Present State NextState NextState NextState Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables
mt C Q2 Q1 Q0 Q2 Q1 Q0 J2 K2 J1 K1 J0 K0
8 1 0 0 0 0 0 1 0 d
9 1 0 0 1 0 1 0 0 d
10 1 0 1 0 0 1 1 0 d
11 1 0 1 1 1 0 0 1 d
12 1 1 0 0 1 0 1 d 0
13 1 1 0 1 1 1 0 d 0
14 1 1 1 0 0 0 0 d 1
15 1 1 1 1 TBD TBD TBD d d d d d d
27
Minimization
28
Minimization
29
Controllable Die State Table (1)
In Present State Present State Present State NextState NextState NextState Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables
mt C Q2 Q1 Q0 Q2 Q1 Q0 J2 K2 J1 K1 J0 K0
0 0 0 0 0 0 0 1 0 0
1 0 0 0 1 0 1 0 0 1
2 0 0 1 0 0 1 1 0 1
3 0 0 1 1 1 0 0 1 1
4 0 1 0 0 1 0 1 0 0
5 0 1 0 1 0 0 0 0 1
6 0 1 1 0 0 TBD TBD 0 1 d d d d
7 0 1 1 1 0 TBD TBD 1 1 d d d d
30
Controllable Die State Table (2)
In Present State Present State Present State NextState NextState NextState Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables
mt C Q2 Q1 Q0 Q2 Q1 Q0 J2 K2 J1 K1 J0 K0
8 1 0 0 0 0 0 1 0 0
9 1 0 0 1 0 1 0 0 0
10 1 0 1 0 0 1 1 0 1
11 1 0 1 1 1 0 0 1 1
12 1 1 0 0 1 0 1 0 0
13 1 1 0 1 1 1 0 0 0
14 1 1 1 0 0 0 0 0 1
15 1 1 1 1 0 TBD TBD 1 1 d d d d
31
End of Lecture
  • Controllable Die e.g.
  • Moore Machine
  • Dont Cares
  • Dont Knows (TBD states)
  • Self-starting

32
Controllable Die State Table (1)
In Present State Present State Present State NextState NextState NextState Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables
mt C Q2 Q1 Q0 Q2 Q1 Q0 J2 K2 J1 K1 J0 K0
0 0 0 0 0 0 0 1 0 0 0 d
1 0 0 0 1 0 1 0 0 1 1 d
2 0 0 1 0 0 1 1 0 1 d 0
3 0 0 1 1 1 0 0 1 1 d 1
4 0 1 0 0 1 0 1 0 0 0 d
5 0 1 0 1 0 0 0 0 1 0 d
6 0 1 1 0 0 TBD TBD 0 1 d d d d
7 0 1 1 1 0 TBD TBD 1 1 d d d d
33
Controllable Die State Table (2)
In Present State Present State Present State NextState NextState NextState Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables
mt C Q2 Q1 Q0 Q2 Q1 Q0 J2 K2 J1 K1 J0 K0
8 1 0 0 0 0 0 1 0 0 0 d
9 1 0 0 1 0 1 0 0 0 1 d
10 1 0 1 0 0 1 1 0 1 d 0
11 1 0 1 1 1 0 0 1 1 d 1
12 1 1 0 0 1 0 1 0 0 0 d
13 1 1 0 1 1 1 0 0 0 1 d
14 1 1 1 0 0 0 0 0 1 d 1
15 1 1 1 1 0 TBD TBD 1 1 d d d d
34
Controllable Die State Table (1)
In Present State Present State Present State NextState NextState NextState Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables
mt C Q2 Q1 Q0 Q2 Q1 Q0 J2 K2 J1 K1 J0 K0
0 0 0 0 0 0 0 1 0 0 0 d 1 d
1 0 0 0 1 0 1 0 0 1 1 d d 1
2 0 0 1 0 0 1 1 0 1 d 0 1 d
3 0 0 1 1 1 0 0 1 1 d 1 d 1
4 0 1 0 0 1 0 1 0 0 0 d 1 d
5 0 1 0 1 0 0 0 0 1 0 d d 1
6 0 1 1 0 0 TBD TBD 0 1 d d d d
7 0 1 1 1 0 TBD TBD 1 1 d d d d
35
Controllable Die State Table (2)
In Present State Present State Present State NextState NextState NextState Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables Excitation Variables
mt C Q2 Q1 Q0 Q2 Q1 Q0 J2 K2 J1 K1 J0 K0
8 1 0 0 0 0 0 1 0 0 0 d 1 d
9 1 0 0 1 0 1 0 0 0 1 d d 1
10 1 0 1 0 0 1 1 0 1 d 0 1 d
11 1 0 1 1 1 0 0 1 1 d 1 d 1
12 1 1 0 0 1 0 1 0 0 0 d 1 d
13 1 1 0 1 1 1 0 0 0 1 d d 1
14 1 1 1 0 0 0 0 0 1 d 1 0 d
15 1 1 1 1 0 TBD TBD 1 1 d d d d
Write a Comment
User Comments (0)
About PowerShow.com