Design of Control Unit
The Control Unit (CU) generates timing and control signals to perform different operations in the computer system. It also communicates with ALU and RAM.
Control unit can design through two ways which are explain below,
1. Hardwired Control Unit
The basic components of hardwired control units are
- 2 decoders, one is 3×8, and the other is 4×16.
- One sequential counter
- One control logic gate
- and one Instruction Register
Block diagram of a Hardwired Control organization shown below,
- As, Above diagram shows that,
- A Hardwired Control contains two decoders, one Instruction Register, one sequence counter, and control logic gates.
- Fetched instruction from the memory are place in the instruction register (IR).
- An instruction register contains three fields, Operand (0-11 bits), Opcode (12-14 bits), and Mode (15 bit).
- Operand provides the operand or address of operand and directly connected with control logic gates.
- The operation code (Opcode) bits are connect with 3 x 8 decoder. And outputs of the decoder are denoted by the symbols D0 through D7.
- Mode Bit 15 represents the addressing modes and directly connected with control logic gates.
- The Sequence counter (SC) can count from 0 through 15 in binary and connected with 4×16 decoder.
Let Explain with Example
If the input register contains the value 1001010001010111 then we can understand this instruction by understanding the values of its fields.
- As, the 15th bit is 1. So, it represents indirect addressing mode.
- 12,13,14 bits of opcode are 001 which represent ADD operation. ADD operation also denoted by D1.
- 0 to 11 bits are 010001010111 which represents the address of the operand.
- If this instruction executed at Time T2. Then it can symbolically represent as D1T2 and SC becomes Zero.
- This instruction means that apply ADD operation on address (010001010111) of memory.
Let explain time cycle at point D3T4: SC←0
- By increasing the size of the control unit the organization of the control unit becomes complicated.
- If a little bit changing or modifying is require in control units then it causes to modify the entire control unit which is a difficult task.
2. Micro-Programmed Control
The Micro-programmed Control organization is implement by using the programming technique. Micro-program consists of micro-instructions. A Block diagram of the Micro-programmed Control organization is shown below.
- The Control address register (CAR) specifies the address of the micro-instruction. So, the address of micro-instruction that is to be executed is stored in the CAR (Control Address Register)
- ROM is permanent storage that stores the value of the control address register.
- The control data register holds the microinstruction fetched from the memory (ROM).
- Micro-instruction corresponding to the address (stored in CAR) is fetch from control memory and store in control data register (CDR)
- This microinstruction contains a control word to execute one or more micro-operations for the data processor.
- Micro-programs contain micro-instructions and micro-instructions contain micro-operations. When the execution of all micro-operations of micro-instruction completed. Then the address of next micro-instruction is pointed. The next address generator is a micro-program sequencer.
- Less complex to design because micro-program is implement using software routines.
- It is more flexible because design modification, correction, and enhancement is very easy
- Errors can easily remove.
- This technology is slower than the hardwired control unit because time is required to access the micro-instructions from control memory is larger.
- It is more expensive than hardwired due to use of ROM.
- Required more Chip area as compare to hardwire
Difference between Hardwired Control and Micro programmed Control
|Hardwired Control||Micro programmed Control|
|This Technology is circuit-based.||This Technology is software-based.|
|It is implemented through flip-flops, gates, decoders, etc.||Micro-instructions generate signals, and then these signals control the execution of instructions.|
|All the Instructions are register-based.||Instructions are not register-based.|
|ROM is not used in this technology.||ROM is used in this technology.|
|This is used in RISC.||This is used in CISC.|
|Difficult to modify.||Easily modified.|
|Fixed instruction format.||Variable instruction format (16, 32,64 bits per instruction).|
|The chip area is less.||The chip area is large.|