Professional Documents
Culture Documents
Content at a Glance
Recall that computer instructions consist of sequential parts such as FI, DI, OF EI Each of these parts in turn has 1 or more steps e.g. FI: - calculate instruction address - load instruction to IR OF: - calculate operand address - load data unit
Micro-Operations (1)
Micro-Operations (2)
Micro-operations (-ops) are the atomic (indivisible) operations performed by the CPU (CU). By definition -ops are very small, simple instruction steps that are performed by the control unit (CU) in a single clock cycle. -ops are very efficient but they accomplish very little
Micro-Operations (3)
Registers (R)
ALU (f)
1 machine cycle
R3 f(R1, R2)
f: shift, load, clear, increment, add, subtract, complement, and, or, xor,
March 20, 2012
(Register Tarnsfer and Micro-Operations) Richard Salomon, Sudipto Mitra Copyright Box Hill Institute
Micro-Operations (4)
Micro-Operations (5)
Fetch Cycle Instruction is fetched from memory (MAR, MBR, PC, IR)
Micro-Operations (6)
Interrupt Cycle A test is made to determine if any of the enabled interrupts have occurred.
T1:
Micro-Operations (7)
Execute Cycle The execute cycle will have a number of sequences of microoperations.
e.g.
1. FI
Micro-Operation Examples
e.g. 3. djz d, R2
t1: MAR (IR(address)) t2: MBR (X) t3: R1 (R1) + (MBR) [ ] indicates indirect mode
Richard Salomon, Sudipto Mitra Copyright Box Hill Institute
t1: MAR
(IR(address)) t2: MBR (R2) t3: MBR (MBR) - 1 t4: R2 (MBR) if (MBR) = 0 then PC (PC) + d
() read: contents of
To illustrate the relationship between the -op and the -instruction, we now consider a simple hypothetical CPU as follows:
Input
MuxA
MuxB
Sel B
Sel D
ALU
Oprn
Control word: Oprn SelD SelA SelB
Output
March 20, 2012
Sel D Output R1 R2 R3 R4 R5 R6 R7
Sel A Null R1 R2 R3 R4 R5 R6 R7
Sel B Input R1 R2 R3 R4 R5 R6 R7
Control Memory
3.
Define the basic elements of the processor Describe the micro-operations that the processor performs. Determine the functions that the control unit must perform to cause the micro-operations to be performed.
Richard Salomon, Sudipto Mitra Copyright Box Hill Institute
Input Signals
Output Signals
Control signals within the processor (e.g. data transfer between registers, specific ALU functions) Control signals to control bus (e.g. memory, I/O modules) March 20, 2012 Richard Salomon, Sudipto Mitra
Copyright Box Hill Institute
Control Signals
that activate an ALU function Signals that activate a data path Signals on the external system bus or other external interface. All signals are applied as binary inputs to individual logic gates.
March 20, 2012
CU sends a control signal to open gates between MBR and IR. Check whether to perform an Indirect Cycle or Execute Cycle by examining the IR for an indirect memory reference. (Examine the IR for indirect cycle and interrupt cycles)
Richard Salomon, Sudipto Mitra Copyright Box Hill Institute
Internal Organization
Usually a single internal bus Gates control movement of data onto and off the bus Control signals control data transfer to and from external systems bus Temporary registers needed for proper operation of ALU
MicroOperations Fetch
Timing T1: MAR PC T2: MBR Memory PC PC + 1 T3: IR MBR T1: MAR IR (Address) T2: MBR Memory T3: IR (Address) Memory (Address)
Indirect
Interrupt T1: MBR PC T2: MAR Save Address PC Routine Address March 20, 2012 Richard Salomon, Sudipto Mitra T3: Memory MBR Hill Institute Copyright Box
C12, CW
Each bit means something Op-code causes different control signals for each different instruction Unique logic for each op-code Decoder takes encoded input and produces single output n binary inputs and 2n outputs
Richard Salomon, Sudipto Mitra Copyright Box Hill Institute
Instruction register
Clock
Repetitive sequence of pulses Useful for measuring duration of micro-ops Must be long enough to allow signal propagation Different control signals at different times within instruction cycle Need a counter with different control signals for t1, t2 etc.
External
Input
Control Memory
Control Word
The CU is implemented as a sequence of micro-instructions which are converted into a set of control signals based on the binary pattern of the control word Each signal value corresponds to the binary value of their respective control word bit.
control word signals
Richard Salomon, Sudipto Mitra Copyright Box Hill Institute
control word
March 20, 2012
control bits
Richard Salomon, Sudipto Mitra Copyright Box Hill Institute
address
(Stallings p.604)
(Stallings p.604)
March 20, 2012
Sequence logic unit issues read command Word specified in control address register is read into control buffer register Control buffer register contents generates control signals and next address information Sequence logic loads new address into control buffer register based on next address information from control buffer register and ALU flags
Richard Salomon, Sudipto Mitra Copyright Box Hill Institute
Hardwired very complex even for simple architecture CPUs can be difficult to implement inflexible fast (h/w speed) execution
Micro- programmed easier to implement simple design flexible takes a computer architecture form flexible significant address generation time and -instruction size
Micro-programming Applications
Almost all CUs in current CPUs are micro-programmed units A few examples of micro-programming applications are: emulation of one CPU by another provision of specific operating system support by implementing primitives that replace parts of the OS HLL support by implementing various functions and data types micro-diagnostics to monitor, detect and isolate system errors
Richard Salomon, Sudipto Mitra Copyright Box Hill Institute
Reference
Stallings William, Computer Organization and Architecture Designing for performance, 7th edn, Pearson Education.Inc, ISBN 0 - 13 185644 - 8 [ Chapter 16 & 17 ] M Morris Mano, Computer System Architecture, 3rd edn, Prentice Hall, ISBN 0 - 13 - 175563 - 3 [ Chapter 7 ]