Академический Документы
Профессиональный Документы
Культура Документы
Registers
Control
Unit
ALU
CPU must have some working space
(temporary storage)
Called registers
Number and function vary between processor
designs
One of the major design decisions
Top level of memory hierarchy
Fetch
PC contains address of next instruction
Address moved to MAR
Address placed on address bus
Control unit requests memory read
Result placed on data bus, copied to MBR, then to
IR
Meanwhile PC incremented by 1
IR is examined by the control unit
If indirect addressing, indirect cycle is
performed
Right most N bits of MBR, which contain the
address reference, transferred to MAR
Control unit requests memory read
Result (address of operand) moved to MBR
May take many forms
Depends on instruction being executed
May include
Memory read/write
Input/Output
Register transfers
ALU operations
Simple
Predictable
Current PC saved to allow resumption after
interrupt
Contents of PC copied to MBR
Special memory location (e.g. stack
pointer) loaded to MAR
MBR written to memory
PC loaded with address of interrupt
handling routine
Next instruction (first of interrupt handler)
can be fetched
Fetch accessing main memory
Execution usually does not access main
memory
Can fetch next instruction during execution
of current instruction
Called instruction prefetch
The ALU is the part of the microprocessor
that actually performs the arithmetic and
logical operations on data.
The rest of the circuitry simply
brings the data into the ALU,
tells the ALU what to do with it, and
takes the results out of the ALU.
Control Flags
Unit
ALU
Registers Registers
Registers are used to:
Bring data into the ALU
Store the results of the ALU’s operations
Registers
Control
Unit
ALU
Hardwired Control
The control logic is implemented using flip flops,
gates, etc
The unit is designed specifically for the digital
system being designed
Modifying it is very tedious
Microprogrammed Control
The control information is stored in a Micro-
memory inside the CPU
The Microprogram memory is loaded with the
sequence of control signals needed to implement
the different instructions
The system clock produces a continuous sequence of pulses
in a specified duration and frequency. A sequence of steps
t0 , t1 , t2 , . . . , (t0< t1 < t2 . . .) are used to execute a
certain instruction.
The op-code field of a fetched instruction is decoded to
provide the control signal generator with information
about the instruction to be executed.