Professional Documents
Culture Documents
- Module 3
Road Map
Machine instructions
Operands
Addressing modes
Instruction formats
Instruction set architectures
CISC and RISC architectures
Instruction Cycle :– Fetch – Decode - Execute
Control Unit
Organization of a control unit
Operations of a control unit
Hardwired control unit
Micro-programmed control unit
3
Structure of
IAS –
detail
4
IAS Instruction Set
Instruction
Opcode Operand
LOAD 55 ; ACC 55
ADD 55 ; ACC ACC + 55
Instruction
Opcode Address A
Memory
Operand
LOAD M[55] ; ACC [55]
ADD M[55] ; ACC ACC + [55]
Pointer to
operand
Operand
LOAD [M[55]] ;
ADD [M[55]] ;
Operand
LOAD MQ ; ACC MQ
Instruction
Opcode Register Address R
Memory
Registers
Instruction
Opcode Register R Address A
Memory
Registers
• Pre-index
– EA = (A+(R))
Subtract LOC, Ri
Add Rj, 16(Rk)
• Key differences
Registers
– Data-path is general
– Control unit doesn‟t
store the algorithm – the PC IR
algorithm is
“programmed” into the
memory I/O
Memory
memory location
I/O
Memory
...
10
11
...
– Get next
Control unit Datapath
ALU
instruction into IR Controller Control
/Status
– PC: program
counter, always
Registers
points to next
instruction PC 100 IR
load R0, M[500] R0 R1
means
Registers
PC 100 IR R0 R1
load R0, M[500]
I/O
datapath register
Registers
10
PC 100 IR R0 R1
load R0, M[500]
I/O
– This particular
Registers
instruction does
nothing during 10
this sub-operation PC 100 IR
load R0, M[500] R0 R1
I/O
memory
Registers
– This particular
instruction does 10
nothing during PC 100 IR
load R0, M[500] R0 R1
this sub-operation
I/O
Registers
10
PC 100 IR R0 R1
load R0, M[500]
I/O
PC=101
Registers
Fetch Decode Fetch Exec. Store
ops results
clk
10 11
PC 101 IR R0 R1
inc R1, R0
I/O
PC=101
Registers
Fetch Decode Fetch Exec. Store
ops results
clk
10 11
PC 102 IR R0 R1
store M[501], R1
PC=102
Fetch Decode Fetch Exec. Store I/O
ops results ...
100 load R0, M[500] Memory
clk 500 10
101 inc R1, R0 501 11
102 store M[501], R1 ...
points to next
instruction
PC 100 IR R0 R1
load R0, M[500]
– IR: holds the
fetched I/O
instruction 100 load R0, M[500] Memory
...
500 10
104 inc R1, R0 501
108 store M[501], R1 ...
Module 3
Introduction
• In the Previous lecture, we focused on machine instructions and the
operations performed by the processor to execute each instruction.
• What was left out of this discussion is exactly how each individual
operation is caused to happen. This is the job of the control unit.
• The control unit is
– that portion of the processor that actually causes things to happen.
– issues control signals external to the processor to cause data exchange with
memory and I/O modules.
– issues control signals internal to the processor
• to move data between registers,
• to cause the ALU to perform a specified function, and
• to regulate other internal operations.
• Input to the control unit consists of the instruction register, flags, and
control signals from external sources (e.g., interrupt signals).
Prof. Shanmugasundaram | SENSE | VIT 95
Road Map
In this topic we are going to discuss
How processor functions are performed or, more specifically,
how the various elements of the processor are controlled to
provide these functions, by means of the control unit.
It is shown that each instruction cycle is made up of a set of
micro-operations that generate control signals.
Execution is accomplished by the effect of these control
signals, emanating from the control unit to the ALU, registers,
and system interconnection structure.
Finally, an approach to the implementation of the control unit,
referred to as hardwired implementation, is presented.
Performance of each sub cycle involves one or more shorter operations, that
is, micro – operations.
Micro – operations are the functional, or atomic, operations of a processor.
ICC
Cycle
P Q
0 0 Fetch
0 1 Indirect
1 0 Execute
1 1 Interrupt