FSM Worksheet PDF
FSM Worksheet PDF
Concept Inventory:
Notes:
Metastability:
(A) For each of the following FSMs please indicate if they are or are not well formed. Note that
the state names have been omitted for clarity; you may assume the state names are unique.
(B) Given the partially completed truth table and FSM diagram below. Complete all the
missing entries in the truth table and the FSM diagram. The FSM is a Moore machine, i.e.,
the Out signal is determined only by the current state. In each state circle, the top entry is
S1S0 and the bottom entry is the value of Out. Make sure that you have labeled all missing
states, inputs, and outputs, and that you have added and labeled any missing transitions in
the FSM.
(C) If this FSM is implemented using a 2-bit state register and a ROM, what size ROM would be
needed? Please specify the number of locations (entries) of the ROM, and the width of each
entry.
Please describe the operation of the FSM by filling in both the state transition diagram and the
truth table shown below. The two-digit state names in the state transition diagram are S0,S1, the
logic values present at the outputs of REG0 and REG1 after the rising edge of the clock. In the
truth table, S0’ and S1’ are the values that will loaded into REG0 and REG1 at the next rising
clock edge.
Fill in state transition diagram and truth table
Problem 3.
Consider the 1-input, 1-output finite state machine with the state transition diagram shown below.
Note that the single output P only depends on the current state of the FSM.
(A) (1 Point) The FSM has been processing inputs for a while and we would like to determine its
current state. After entering three additional inputs “000”, we observe that we have reached
a state where P=0. Please circle the possible values for the state before the additional three
inputs were entered.
(B) (2 Points) Assume that the states are represented by the 3-bit binary values given on the left
below. Please fill in the appropriate entries for the partial truth table shown on the right
where S is the current state, I is the input value, S’ is the next state, P is the output value
100 1
(C) Please identify which, if any, states are equivalent. For example, if states S1, S2, and S4 are
equivalent, please write “(S1,S2,S4)”. You may need multiple parenthesized lists if more
than one set of states is equivalent.
Perfectly Perplexing Padlocks makes an entry-level electronic lock, the P3b, built from an FSM
with two bits of state. The P3b has two buttons (“0” and “1”) that when pressed cause the FSM
controlling the lock to advance to a new state. In addition to advancing the FSM, each button
press is encoded on the B signal (B=0 for button “0”, B=1 for button “1”). The padlock unlocks
when the FSM sets the UNLOCK output signal to 1, which it does whenever—and only
whenever—the last 3 button presses correspond to the 3-digit combination. The combination
is unique, and will open the lock independently of the starting state. Unfortunately the design
notes for the P3b are incomplete.
S1 S0 B S’1 S’0 U
1 00
0 0 0 1 1 0
U= U=
0 0 1 0 0 0
0 1 0 1
0
0 1 1 1 0 1
0 1 0 0 0 1 0
0
1 1 0 1 0
U= U= 1 1 0 0
1 1 1 0
lock combination:_____________________
(B) (5 Points) Using the specification and clues from the partially completed diagrams above
fill in the information that is missing from the state transition diagram and its
accompanying truth table. When done:
• each state in the transition diagram should be assigned a 2-bit state name S1S0 (note
that in this design the state name is not derived from the combination that opens the
lock),
• the arcs leaving each state should be mutually exclusive and collectively exhaustive,
• the value for U should be specified for each state, and
• the truth table should be completed.
Below is a state transition diagram for a 4-state FSM with a single binary input B. The FSM has
single output – a light that is “on” when the FSM is in states “E” or “S”. The starting state, “W”,
is marked by the heavy circle.
B=0 N B=1
B=0
B=1 B=1
W E
B=1
B=0 S B=0
(A) (1 Point) Does this FSM have a set or sets of equivalent states that can be merged to yield an
equivalent FSM with fewer states?
(B) (5 Points) Please fill in as many entries as possible in the following truth table for the FSM.
The light output is a function of the current state and should be 1 when the light is “on” and
0 when it’s “off.”
The following circuit has two inputs (A, CLK) and four outputs (W, X, Y Z). The CLK signal is
square wave with a period tCLK=1us. The A signal makes a single 0→1 transition but the timing
of the transition is close to (within a few ns of) the active CLK edge, ignoring dynamic discipline.
All the devices are lenient and have the same propagation delay tPD=10ns.
In a test involving a large number of trials, the Z output has been examined 100ns after an active
CLK edge (and when both CLK and A have been stable for many propagation delays); at this
time, Z was found to be invalid P times. In the same test, what would you expect to observe at the
other outputs 100ns after the CLK edge? For each output, circle one of
LESS RELIABLE if you would expect the output to be invalid appreciably more than P times;
EQUALLY RELIABLE if you would expect the output to be invalid about P times; or
MORE RELIABLE if you would expect the output to be invalid appreciably less than P
For information about citing these materials or our Terms of Use, visit: https://ocw.mit.edu/terms.