Chapt 16
Chapt 16
• A single micro-operation
generally involves a
transfer between
registers, transfer
between registers and
external bus, or a simple
ALU operation.
Micro-operations and the Clock
• Each clock pulse defines a time unit, which are of equal
duration.
• Micro-operations are performed within this time unit.
• If multiple micro-operations do not interfere with one
another then grouping of micro-operations can be
performed within one time unit.
• Grouping can be performed as long as;
– Proper sequence of events are followed
• PC MAR must be done first in order for MEMORY MDR
– Conflicts are avoided
• MEMORY MDR can not be in the same time unit as MDR IR
The Fetch Cycle
• Consists of three time units and four micro-operations.
• Each micro-operation involves the movement of data into
or out of a register.
t1 : PC MAR
t 2 : MEMORY MDR
t3 : PC 1 PC
MDR IR
The Indirect Cycle
• Occurs if the instruction specifies an indirect address.
• Consists of three time unit and three micro-operations.
• Data is transferred to the MAR from the IR, which is used
to fetch the address of the operand, the IR is then
updated from MDR so it contains a direct address rather
than indirect.
t1 : IR MAR
t 2 : MEMORY MDR
t3 : MDR IR
The Interrupt Cycle
• Occurs if any enabled interrupts have occurred at the
completion of the execute cycle.
– The contents of the PC are transferred to the MDR, so that they
can be saved for return from the interrupt.
– MAR is loaded with the address at which the contents of the PC
are to be saved
– PC is loaded with the address at the start of the interrupt routine.
– Final step is to store the MDR into MEMORY.
t1 : PC MDR
t 2 : Saved Address MAR
Routine Address PC
t 3 : MDR MEMORY
The Execute Cycle
• Execute cycle is not as predictable as other cycles (fetch, indirect, or
interrupt).
• Number of time units and micro-operations varies for every execution
cycle.
Example; ADD R1, X
• The following execute cycle adds the contents of the location X to
register R1.
t1 : IR MAR
t 2 : MEMORY MDR
t 3 : MDR R1 R1
Instruction Cycle
• Each phase decomposed into sequence of elementary
micro-operations (fetch, indirect, and interrupt cycles)
• Execute cycle
– One sequence of micro-operations for each opcode
• Execution
Causes the performance of each micro-operation
• Instruction register
– Op-code of the current instruction
– Determines which micro-instructions are performed
• Flags
– Determines the status of the processor
– Results of previous ALU operations
• http://www.vocw.edu.vn/content/m10780/l
atest/
• http://en.wikipedia.org/wiki/Control_unit
Review Questions
• A single micro-operation generally
involves?
– A transfer between registers, transfer between
a register and an external bus, or a simple
ALU operation.
• What is the main purpose of grouping
micro-operations together?
– To save time.
• What are the basic tasks of a control unit?
– Sequencing & Execution
• What are the inputs of a control unit?
– Clock, IR, Flags, and control signals from control bus.
• What is the control signal?
• What is a hardwired Implementation?
• Each intruction cycle is divided from 1 to 5
machince cycle; each machine cycle into turn is
divided any where from 3 to 5 states.
• The y register is used as temporary storage for
the ALU and the X register is used a tempory
output storage.