The control signals needed in each step of intruction execution can be generated by the finite state machine method, also called hardwired control, or, alternatively, by the microprogrammed control method discussed below.
A word with each bit for one of the control signals. Each step of the instruction execution is represented by a control word with all of the bits corresponding to the control signals needed for the step set to one.
Each step in a sequence of steps in the execution of a certain machine instruction is considered as a microinstruction, and it is represented by a control word. All of the bits corresponding to the control signals that need to be asserted in this step are set to 1, and all others are set to 0 (horizontal organization).
Composed of a sequence of microinstructions corresponding to the sequence of steps in the execution of a given machine instruction.
The method of generating the control signals by properly setting the individual bits in a control word of a step.
As the CPU may need hundreds of control signals, the control word will be inevitably long. To reduce the length of the control word, groups of control signals that are mutually exclusive (only one of them need be asserted at a time) can be encoded to form shorter fields. This shorter form of control word is called vertical organization.
For example, if only 1 of a group of 8 signals is needed
at any time, they can be encoded into a field of
bits, instead of 8 bits. The price to pay is the time delay
needed for decoding the encoded field.
Current machine instruction is complete. Go to the
-instruction in state 0 to fetch the next machine
instruction (e.g.,
,
,
,
,
).
This is the first conditional branch (state 1). The next
-instruction is selected from the four possible
-instructions corresponding to states 2, 6, 8, and 9,
depending on the Op-code of IR. This is implemented by a
dispatch table stored in ROM1:
This is the second conditional branch (state 2). The next
-instruction is selected from the two possible
-instructions corresponding to states 3, and 5,
depending on the Op-code of IR. This is implemented by
another dispatch table stored in ROM2:
The next
-instruction is the one that follows the
the current one sequentially (e.g.,
,
,
).
The control memory is shown below. Note the state number is used as the address of the corresponding control word.
The control words are divided into 8 fields, each representing a set of mutually exclusive operations:
Tow bits, ALUOp0 and ALUOp1 to specify one of 3 ALU operations:
One bit ALUSrcA to select one of 2 sources of 1st ALU operand:
Two bits ALUSrcB0 and ALUSrcB1 to select one of 4 sources of 2nd ALU operand:
specify destination of ALU result;
specify MM operation (read/write) and source of address;
specify destination for MM read or source for MM write;
specify the source for PC write;
Two bits AddrCtl0 and AddrCtl1 to select
one of 4 ways for finding next
-instruction (same as above).
Since mutually exclusive control signals are encoded into fields, fewer bits are needed in the control word than the horizontal organization. But a decoder is needed for each field which costs additional time delay.