Unit 04
Unit 04
CONTROL UNIT
Control of the processor.
Hardwired control unit
Control unit input
Control unit logic
Micro programmed control unit
Micro instruction and its type.
Architecture of micro programmed control unit.
Micro instruction sequencing
Micro instruction Execution
Application of Hardwired and Micro programmed control unit
RISC and CISC
Control Unit :
The unit which directs the operation of the processor & is a part of the CPU is known as Control Unit. It
generates control signals for the operations of a computer.
HARDWIRED IMPLEMENTATION
In a hardwired implementation, the control unit is essentially a state machine circuit. Its input logic
signals are transformed into a set of output logic signals, which are the control signals.
The key inputs are the instruction register, the clock, flags, and control bus signals. In the case of the
flags and control bus signals, each individual bit typically has some meaning (e.g., overflow). The other
two inputs, however, are not directly useful to the control unit.
First consider the instruction register. The control unit makes use of the opcode and will perform different
actions (issue a different combination of control signals) for different instructions. To simplify the control
unit logic, there should be a unique logic input for each opcode. This function can be performed by a
decoder, which takes an encoded input and produces a single output. In general, a decoder will have n
binary inputs and 2 n binary outputs. Each of the 2 n different input patterns will activate a single unique
output. Table shown below is an example for n = 4. The decoder for a control unit will typically have to
be more complex than that, to account for variable-length opcodes.
With these two refinements, the control unit can be depicted as in figure below.
The table below shows micro-operations and control signals needed to control three of the four phases of
the instruction cycle.
PQ = 00 Fetch Cycle
PQ = 01 Indirect Cycle
PQ = 10 Execute Cycle
PQ = 11 Interrupt Cycle
That is, the control signal C 5 will be asserted during the second time unit of both the fetch and indirect
cycles.
This expression is not complete. C 5 is also needed during the execute cycle. For our simple example, let
us assume that there are only three instructions that read from memory: LDA, ADD, and AND. Now we
can define C 5 as,
This same process could be repeated for every control signal generated by the processor. The result would
be a set of Boolean equations that define the behavior of the control unit and hence of the processor.
Micro-programmed Control.
The Control memory address register specifies the address of the micro-instruction.
The Control memory is assumed to be a ROM, within which all control information
is permanently stored.
The control register holds the microinstruction fetched from the memory.
The micro-instruction contains a control word that specifies one or more micro-
operations for the data processor.
While the micro-operations are being executed, the next address is computed in
the next address generator circuit and then transferred into the control address
register to read the next microinstruction.
The next address generator is often referred to as a micro-program sequencer, as it
determines the address sequence that is read from control memory.
Here, we will discuss the disadvantages of the Hardwired Control Unit as follows.
1. The complexity of the design increases as we require more control signals to be
generated (need of more encoders & decoders)
2. Modifications in the control signals are very difficult because it requires rearranging of
wires in the hardware circuit.
3. Adding a new feature is difficult & complex.
4. Difficult to test & correct mistakes in the original design.
5. It is Expensive.
2. Cost of
Implementation More costlier. Cheaper.
7. Instruction set of
Size Small Large
Advantages :
1. The main advantage is flexibility.
2. Any change in the control unit can be performed by simply changing the micro-
instruction.
3. Can be easily debugged as compared to hardwired control unit.
Sequencing Techniques: Based on the current microinstruction, condition flags, and the
contents of the instruction register, a control memory address must be generated for the next
microinstruction. A wide variety of techniques have been used. We can group them into three
general categories, as illustrated in Figures 16.6 to 16.8. These categories are based on the
format of the address information in the microinstruction:
Here, lots of control memory is wasted because at least one of the address fields is not required
in many(i.e. for sequential or unconditional) micro-instructions.
This method is commonly used. But the space provided in each micro-instruction in a single
address field is not quite useful if the instructions are executed sequentially.
In this technique two formats are used. In such a technique, one bit is needed in the
microinstruction to differentiate between control microinstruction or a branching
microinstruction. The first format provides the control microinstruction(i.e. the bits are
used to generate control signals) , while the second format provides the branch logic and
address(there can be conditional or unconditional branch).
In the first format, the microinstruction contains control signals, then the next
microinstruction address is calculated either by using the op-code of the instruction
register or it is the address of the next microinstruction in sequence. In this approach, an
extra cycle is needed for branch microinstruction.
The microinstruction cycle is the basic event on a microprogrammed processor. Each cycle is
made up the two parts: fetch and execute. This section deals with the execution of
microinstruction. The effect of the execution of a microinstruction is to generate control signals
for both the internal control to processor and the external control to processor.
RISC Vs CISC
Types Of Processor
RISC
CISC
RISC Processor
RISC stands for Reduced Instruction Set Computer Processor, a microprocessor architecture with a
simple collection and highly customized set of instructions. It is built to minimize the instruction
execution time by optimizing and limiting the number of instructions. It means each instruction cycle
requires only one clock cycle, and each cycle contains three parameters: fetch, decode and execute.
Examples of RISC processors are SUN's SPARC, PowerPC, Microchip PIC processors, RISC-V.
1. The RISC processor's performance may vary according to the code executed because subsequent
instructions may depend on the previous instruction for their execution in a cycle.
2. Programmers and compilers often use complex instructions.
3. RISC processors require very fast memory to save various instructions that require a large
collection of cache memory to respond to the instruction in a short time.
RISC Architecture
It is a highly customized set of instructions used in portable devices due to system reliability such as
Apple iPod, mobiles/smartphones, Nintendo DS,
1. One cycle execution time: For executing each instruction in a computer, the RISC processors
require one CPI (Clock per cycle). And each CPI includes the fetch, decode and execute method
applied in computer instruction.
2. Pipelining technique: The pipelining technique is used in the RISC processors to execute
multiple parts or stages of instructions to perform more efficiently.
3. A large number of registers: RISC processors are optimized with multiple registers that can be
used to store instruction and quickly respond to the computer and minimize interaction with
computer memory.
4. It supports a simple addressing mode and fixed length of instruction for executing the pipeline.
CISC Processor
The CISC Stands for Complex Instruction Set Computer, developed by the Intel. It has a large
collection of complex instructions that range from simple to very complex and specialized in the
assembly language level, which takes a long time to execute the instructions. So, CISC approaches
reducing the number of instruction on each program and ignoring the number of cycles per instruction. It
emphasizes to build complex instructions directly in the hardware because the hardware is always faster
than software
Examples of CISC processors are VAX, AMD, Intel x86 and the System/360.
The CISC architecture helps reduce program code by embedding multiple operations on each program
instruction, which makes the CISC processor more complex. The CISC architecture-based computer is
designed to decrease memory costs because large programs or instruction required large memory space to
store the data, thus increasing the memory requirement, and a large collection of memory increases the
memory cost, which makes them more expensive.
1. CISC chips are slower than RSIC chips to execute per instruction cycle on each program.
2. The performance of the machine decreases due to the slowness of the clock speed.
3. Executing the pipeline in the CISC processor makes it complicated to use.
4. The CISC chips require more transistors as compared to RISC design.
5. In CISC it uses only 20% of existing instructions in a programming event.
RISC CISC
It is a Reduced Instruction Set Computer. It is a Complex Instruction Set Computer.
It requires multiple register sets to store the instruction. It requires a single register set to store the
instruction.
RISC has simple decoding of instruction. CISC has complex decoding of instruction.
Uses of the pipeline are simple in RISC. Uses of the pipeline are difficult in CISC.
RISC has more transistors on memory registers. CISC has transistors to store complex
instructions.
The execution time of RISC is very short. The execution time of CISC is longer.
RISC architecture can be used with high-end CISC architecture can be used with low-end
applications like telecommunication, image processing, applications like home automation, security
video processing, etc. system, etc.
The program written for RISC architecture needs to take Program written for CISC architecture tends to
more space in memory. take less space in memory.
Example of RISC: ARM, PA-RISC, Power Examples of CISC: VAX, Motorola 68000
Architecture, Alpha, AVR, ARC and the SPARC. family, System/360, AMD and the Intel x86
CPUs.