Lect14 - Control Unit
Lect14 - Control Unit
Tiwary
Pilani|Dubai|Goa|Hyderabad
CONTROL UNIT OPERATION
The execution of an instruction involves the execution of a sequence of
substeps, generally called cycles
The Fetch Cycle
The Indirect Cycle
The Interrupt Cycle
The Execute Cycle
The Instruction Cycle
control unit of a processor performs two tasks:
step through a series of micro-operations in the proper sequence
generates the control signals
IR ← [[PC]]
o ALU
o Registers for temporary storage
o Various digital circuits for executing different micro
o operations.(gates, MUX,decoders,counters).
o Internal path for movement of data between ALU and
registers.
o Driver circuits for transmitting signals to external units.
o Receiver circuits for incoming signals from external
units.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
PC:
Keeps track of execution of a program
Contains the memory address of the next instruction to be fetched
and executed.
MAR:
Holds the address of the location to be accessed.
I/P of MAR is connected to Internal bus and an O/p to external bus.
MDR:
Contains data to be written into or read out of the addressed location.
IT has 2 inputs and 2 Outputs.
Data can be loaded into MDR either from memory bus or from internal
processor bus.
The data and address lines are connected to the internal bus via MDR and
MAR
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Registers:
The processor registers R0 to Rn-1 vary considerably from one
processor to another.
Registers are provided for general purpose used by programmer.
Special purpose registers-index & stack registers.
Registers Y,Z &TEMP are temporary registers :used by processor
during the execution of some instruction.
Multiplexer:
Select either the output of the register Y or a constant value 4 to be
provided as input A of the ALU.
Constant 4 is used by the processor to increment the contents of PC.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ALU:
Used to perform arithmetic and logical operation.
Data Path:
The registers, ALU and interconnecting bus are collectively
referred to as the data path.
EX:
2. Enable input of register R4 by setting R4in=1. This loads the data from
Rin clk Q
0 Q
Io Q
1 B
B
• Incrementer unit.
Instruction register
Clock
Step Action
Add (R3), R1
1 PCout , MAR in , Read, Select4,Add, Z in
2 Zout , PCin , Yin , WMF C
3 MDR out , IR in
4 Offset-field-of-IRout, Add, Z in
5 Z out , PCin , End
Branch Add
T4 T6
T1
Zin = T1 + T6 • ADD + T4 • BR + …
Add (R3), R1