Our states are driven by our PLA described above. Our ALU requires only
five states without the additional multiply unit. These states are:
- s_initial
- This is the initial state. Reset sets back to this state. It
waits for the start signal and then asserts load_op to load the
operands and proceeds to the s_load_op state.
- s_load_op
- This state asserts load_a to load the first operand, and then
proceeds to the s_load_a state.
- s_load_a
- Depending on the opcode (which indicates the number of operands), this
state proceeds either to state s_load_b asserting load_b to load
the second operand, or to the s_load_output state asserting the
correct control signal for the functional unit being used.
- s_load_b
- This state proceeds to the s_load_output state asserting the necessary
control signals for the functional unit being accessed.
- s_load_output
- This state asserts the correct enable output signal to the
individual units and also the signal to load the output registers.
The system then returns back to s_initial.
For individual control signals, please refer to the state diagram. Also,
we have HOLD input signal that locks the circuit into the current state
until the signal is released.
Please see the section on the multiplier to see how its presence affected
the state diagram.