|
Ben Bitdiddle has designed an electronic lock with three buttons: "reset", "0" and "1". He has provided the following state transition diagram showing how the lock responds to a sequence of inputs. ![]() The lock makes a transition from its current state to a new state whenever one of the three buttons is pressed and released. It ignores its inputs if more than one button is pressed. Pressing "reset" returns the lock to the state marked "R" in the diagram (arcs showing the transitions to the reset state have been omitted from the diagram to make it easier to read). Pressing "0" or "1" will cause the lock to follow the appropriately labeled transition from its current state. The lock opens if it reaches the state marked "U".
A possible implementation of a finite state machine (not related to the lock above) with one input and one output is shown below. ![]()
An FSM, M, is constructed by connecting the output of a 3-state FSM to the inputs of an 9-state FSM. M is then reimplemented using a state register with the minimum number of bits. What is the maximum number of bits that may be needed to reimplement M? You connect M N-state FSMs, each have 1 input and 1 output, in series. What's an upper bound on the number of states in the resulting FSM? The following circuit diagram implements a FSM with two state bits, S0 and S1: ![]()
Phil Harmonic, a reverse engineer at Irrefutable Logic, is trying to figure out a competitor's product. He has traced the circuit and diagrammed it as follows: ![]()
Phil's analysis reveals that the truth table of the ROM is as follows: ![]() Note that S1 and S0 are the two state bits held in the register and S1' and S0' are the "next state" register inputs computed by the ROM during each cycle. Although Phil doesn't completely understand the table, he notices that certain columns are identical to other columns in the table.
Frederick "Flip" Phlop, ILI's state machine specialist, claims that the ROM can be eliminated entirely for the competitor's finite state machine. Flip proposes the ILI's equivalent FSM can be constructed from two D Flip-flops with no additional logic.
Enlightened State Machines, Ltd. has a single product they call a Field Programmable State Machine. It is constructed from a 4-to-1 multiplexer and a clocked D flip-flop as follows: ![]() Each FPSM is "programmed" by connecting each of P00, P01, P10 and P11 to constants (logical 1 or 0). The next state value Q' is then computed from the input X and the current state Q. On power-up, the FPSM always starts out in the Q=0 state. A proposed application of the FPSM device is to implement a clocked FSM called a TFlop whose state transition diagram is shown below: ![]()
Cass Kade, an ESML applications engineer, has discovered the following circuit using TFlops: ![]() where the TFlop clock inputs are connected to a common clock source.
Cass proposed a second product constructed as follows: ![]() Cass argues that supplying programming inputs to the two FSMs, a wide variety of 4-state, 2-output, 1-input Moore Machines can be implemented.
The director of marketing has been told that a general implementation strategy for a class of 4-state Moore Machines whose outputs are copies of state variables is the following: ![]()
You are probably aware of the classic problem of the farmer who must cross a river with a hungry fox, a hungry goose, and a bushel of cabbage. Unfortunately, the boat is only able to carry the farmer and one of his cargo items. However, if he leaves the fox and goose unattended, the fox will eat the goose. Likewise, if he leaves the goose and cabbage alone, the goose will eat the cabbage. The farmer's goal is to transport the fox, goose, and cabbage across the river intact. Depict the river-crossing problem as a state transition diagram; be sure to show all possible states. Hint: the inputs to this state machine are the animal/cargo that is being taken across the river (M, F, G, or C) and the states indicate who is on which side of the river. Note that in the solution we won't want to transition to some of the states since they correspond to illegal pairings of cargo on one side of the river or the other. How many bits of state are required to implement this diagram? How large of a ROM is needed to implement this state machine? Given a vending machine that accepts quarters, dimes, and nickels as inputs and dispenses sodas when a total of at least 50 cents is deposited. Design a state machine that will accept coinage and dispense both sodas and change. The inputs to the system are Q, D, and N, RS, for quarter, dime, nickel, and request soda respectively. The outputs are DS (for dispense soda), RD (for return dime), and RN (for return nickel). Note that multiple states may be required to return all of the change. Draw a state transition diagram for the specified machine. How does this diagram change if all extra money inserted, after the total required to purchase the soda is met, should to be considered as a tip. However, change should be dispensed at the point where the cost of the soda is initially reached. The following two state machines have a single input, with a value of 0 or 1, and a single output indicated by a light that is turned on. The light being turned on is indicated by a state that is doubly circled. Can the two state machines shown below be distinguished from each other by merely specifying input sequences and observing the output? Write out a truth table for each implementation.
|