Instruction Cycle
Instruction Cycle
Instruction Cycle
• The operation code(op-code) part of the instruction contains three bits and
the meaning of remaining 13 bits depends upon the op-code encountered.
The Computer: Top-Level Structure
COMPUTER
Main
I/O Memory
System
Bus
CPU CPU
Register ALU
Internal
Control Unit Bus
Sequencing Control
Logic Unit
Control Unit
Registers and
Decoders
Control
Memory
Internal Block Diagram of a CPU
Internal Block Diagram of a CPU
Control Unit
The function of control unit is to generate relevant timing and control signals to all
operations in the computer.
It controls the flow of data between the processor and memory and peripherals.
The examples of devices that require a control unit are CPUs and graphics
processing units (GPUs).
Control Unit
The control unit directs the entire computer system to carry out stored
program instructions.
The control unit must communicate with both the arithmetic logic unit (ALU)
and main memory.
The control unit instructs the arithmetic logic unit that which logical or
arithmetic operation is to be performed.
The control unit co-ordinates the activities of the other two units as well as all
peripherals and auxiliary storage devices linked to the computer
Control Unit Organization
Control unit generates control signals using one of the two organizations:
Hardwired Control Unit.
Control unit consist of a:
Instruction Register
Two Decoders
The hardwired approach has become less popular as computers have evolved as at
one time, control units for CPUs were ad-hoc logic, and they were difficult to
design.
Control Unit
Advantages Disadvantages
Hardwired Control Unit is fast The control signals required by the
because control signals are generated CPU will be more complex
by combinational circuits.
Modifications in control signal are
The delay in generation of control very difficult. That means it requires
signals depends upon the number rearranging of wires in the
of gates. hardware circuit.
15 14 13 12 11 - 0
Other Inputs
3× 8
Decoder
7 6 5 4 3 2 1 0
I D0
Control
...
Outputs
D7
Control
Logic Gates
T15
...
T0
. . .
15 14 .... 2 1 0 T0
4× 16
Decoder
Increment (INR)
4-Bit Sequence
Counter (SC) Clear (CLR)
Clock
Control Timing Signals
Control Timing Signals
Instruction Cycle
• The program is executed in the computer by going thru a cycle for each
instruction.
T0
AR PC
T1 Fetch
AR M[AR] PC PC+1
T2
Decode operation code in IR (12-14)
Decode
AR IR (0-11) , I IR(15)
Execute I/O Ref. Ins. Execute Reg. Ref. Ins. AR M[AR] Nothing
SC 0 SC 0
Execution
Execute Mem. Ref. Ins.
SC 0
Microoperations for fetch and Decode
Microprogrammed Control Unit
The idea of microprogramming was introduced by Maurice Wilkes in 1951.
The main advantage of the micro-program control unit is the simplicity of its
structure.