$25
Step 1: Capture the FSM: Create and draw the finite state machine that describes the desired behavior of the controller.
STATE NAME
ENCODING
S(0)
000
S(1)
001
S(2)
010
S(3)
011
S(4)
100
Step 2: Create the architecture: Create and draw standard architecture by a using stateregister of the appropriate width and combinational logic with inputs being the state register bits and the finite state machine inputs and outputs being the next state bits and the finite state machine engine.
Step 3: Encode the states: Assign a unique binary number to each state. Each binary number representing a state is known as an encoding. Any encoding will do as long as each state has a unique encoding. (The content of the following table is an example. Rename the states according to the ones you specified in the first section. Also use any encoding you want.)
S(5)
101
S(6)
110
S(7)
111
Step 4: Create the state table: Create a truth table for the combinational logic such that the logic will generate the correct FSM outputs and next state signals. Ordering the inputs with state bits first makes this truth table describe the state behavior, so the table is a state table. (Update the table according to the number of state variables that you have used. The values on the example table are wrong.)
CURRENT STATE
EXTERNAL INPUTS
NEXT STATE
OUTPUT
000
0
000
00
000
1
001
00
001
0
010
00
001
1
001
00
010
0
011
00
010
1
111
00
011
0
100
00
011
1
110
00
100
0
100
00
100
1
101
00
101
0
001
01
101
1
001
01
110
0
001
10
110
1
001
10
111
0
001
11
111
1
001
11
Step 5: Draw the combinational logic: Implement the combinatorial logic using any method (You do not need to draw the inside circuit of multiplexers or decoders if you are using any. You can show those as blocks).