What are Control Signals?
Both Hardwired and Microprogrammed control unit was designed to ‘generate’ the control
signals. The control signals operate the functioning of the processor’s hardware.
It decides
what operation has to be performed,
what must be the sequence of the operations performed by the processor,
what time an operation must be executed and so on.
What is Hardwired Control Unit?
hardwired control unit generates the control signals to execute the instructions in a proper
sequence and at the correct time.
The hardwired control unit is created with the hardware; it is a circuitry approach.
It is designed for the RISC style instruction set.
The instruction register is a processors register that has the ‘instruction’ which is
currently in execution. The instruction register generates the OP-code bits respective
of the operation and the addressing modes of the operands, mentioned in the
instruction.
Instruction decoder receives the Op-code bits generated by the instruction register
and interprets the operation and addressing modes of the instruction. Now, based on
operation and addressing mode of the instruction in instruction register it set the
corresponding Instruction signal INSi to 1.
Each instruction is executed in step-like, instruction fetch, decode, operand
fetch, ALU, memory store.
Now, the control unit must be aware of the current step, the instruction is in. For this,
a Step Counter is implemented which has signals from T1, …, T5. The step counter
sets one of the signals T1 to T5 to 1 on the basis of the step, the instruction is in.
A Clock is implemented to count the current step of the instruction. This clock is
designed such that for each step the clock must complete its one clock cycle.
So, consider if the step counter has set T3 signal 1 then after a clock cycle completes
step counter will set T4 to 1.
The Counter Enable ‘disables’ the step counter to increment to the next step signal,
till the execution of the current step is completed to handle any disturbance during
execution.
If the execution of an instruction depends on some condition or if it is branch
instruction. This is determined with the help of the Condition signals. The Condition
signals generate the signals for the conditions greater than, less than, equal, greater
than equal, less than equal etc.
The remaining is External inputs, it acknowledges the control signal generator
of interrupts which affects the execution of the instruction.
On an, all the Control Signal Generator generates the control signals, based on the inputs
obtained by the Instruction register, Step counter, Condition signals and External inputs.
What is Microprogrammed Control Unit?
Microprogrammed control unit also produces the control signal but using the programs.
This is based on CISC architecture.
The program that creates the ‘control signals’ is called Microprogram.
This microprogram is placed on the processor chip which is fast memory, it is also
called control memory or control store.
A microprogram has a set of microinstructions, or it is also termed as control word. Each
microinstruction is ‘n’ bit word. Each control signal differs from other control signal
depending on the bit pattern of the control word. Each control word/microinstruction has a
different bit pattern.
Instruction execution is performed in steps as we have seen above. So, for each step there is a
control word/ microinstruction in the microprogram. A sequence of microinstructions
required to execute a particular instruction is called microroutine.
Now let us discuss the organization of the microprogram control unit. We will discuss the
flow of instruction execution in terms of instruction execution steps.
1. In the first step (instruction fetch) the Microinstruction address generator would
fetch the instruction from ‘instruction register’ (IR).
2. In the second step, the microinstruction address generator decodes the instruction
obtained from IR and retrieves the starting address of the microroutine required to
perform the corresponding operation mentioned in the instruction. It loads that
starting address to microprogram counter.
3. In the third step, the ‘control word’ corresponding to the ‘starting address’ of
‘microprogram counter’ is read and as the execution proceeds, microprogram address
generator will increment the value of microprogram counter to read the successive
control words of the micro routine.
4. In the last microinstruction of a microroutine, there is a bit which we call end bit.
When end bit is set to 1 it denotes successful execution of that microroutine.
5. After this, the microprogram address generator would return back to Step 1 again to
fetch a new instruction. And the cycle goes on.
Control Store or Control memory is a memory used store the microprograms.
A microprogram control unit is simple to implement and flexible to modify but it is slower
than Hardwired control unit.
Basis of Hardwired Control Unit Microprogrammed Control Unit
Differentiation
Basic It is a circuitry approach. This control unit is implemented by
programming
Design RISC style instructions CISC style instructions
Modification Modification is difficult as the control Modifications are easy in case of
unit is hardwired. Modifying it will microprogrammed control unit as it will
require the change in hardware. require the in change in the code only.
Instructions It works well for simple instructions. It works well for complex instructions also.
Costing Implementing hardwired structure Implementing microprograms is not costly.
requires a cost.
Control memory No control memory is required Control memory is required
Execution Speed Faster execution Comparatively slow