Professional Documents
Culture Documents
El426 Reading - Presentation 4 - 1
El426 Reading - Presentation 4 - 1
Lecture IV
By
Dr. M. Moustafa Hassan
Elec. Power Engineering
Cairo University, Giza, Egypt
Control Unit Operation
▪No HW problems on this part.
▪It is important to understand this
material on :
➢ the architecture of computer control
units, and
➢ microprogrammed control units.
Basic Elements of Processor
▪ ALU
▪ Registers
▪ Internal data paths
▪ External data paths
▪ Control Unit
10/28/2019
Dr. M. A. Moustafa Hassan Cairo University 4
3:09 AM
Instruction Micro-Operations
▪ A computer executes a program of
instructions (or instruction cycles)
▪ Each instruction cycle has a number to
steps or phases:
- Fetch, - Indirect (if specified),
- Execute, - Interrupt (if requested)
▪ These can be seen as micro-operations
oEach step does a modest amount of work
oAtomic operation of CPU
10/28/2019 3:09 AM Dr. M. A. Moustafa Hassan Cairo University 5
Constituent Elements of its
Program Execution
▪ Within CPU
oCause data movement
oActivate specific functions
▪ Via control bus
oTo memory
oTo I/O modules
10/28/2019 3:09 AM Dr. M. A. Moustafa Hassan Cairo University 9
Flowchart for Instruction Cycle
Fetch Cycle:
t1: MAR (PC)
t2: MBR (memory)
PC (PC) +1
IR (MBR)
t3:10/28/2019
Dr. M. A. Moustafa Hassan Cairo University 13
3:09 AM
Fetch Cycle
▪ Let Tx be the time unit of the clock. Then:
t1: MAR (PC)
t2: MBR (memory)
PC (PC) +1
t3: IR (MBR)
▪ Is this equally correct? Why?
t1: MAR (PC)
t2: MBR (memory)
t3: PC (PC) +1
IR (MBR)
10/28/2019 3:09 AM Dr. M. A. Moustafa Hassan Cairo University 14
Basic Rules for Clock Cycle Grouping
Interrupt Cycle:
t1: MBR (PC) • This is a minimum. May be additional
micro-ops to get addresses
t2: MAR save-address
PC routine-address • N.B. saving context is done by
t3: memory (MBR) interrupt handler routine, not micro-
10/28/2019 ops
Dr. M. A. Moustafa Hassan Cairo University 17
3:09 AM
Execute Cycle: ADD R1,
memory
Execute: BSA X (Branch and Save Address) • BSA X - Branch and save address
Address of instruction following
t1: MAR (IRaddress) BSA
MBR (PC) is saved in X
t2: PC (IRaddress) • Execution continues from X+1
memory (MBR)
t3: 10/28/2019
PC
3:09 AM
(PC)
Dr. +
M. 1
A. Moustafa Hassan Cairo University 20
Control Signals
10/28/2019
Dr. M. A. Moustafa Hassan Cairo University 21
3:09 AM
Micro- Operation and Timing
10/28/2019
Dr. M. A. Moustafa Hassan Cairo University 22
3:09 AM
Branch Control: Variable Format