Professional Documents
Culture Documents
CPU must:
Fetch instructions
Interpret instructions
Fetch data
Process data
Write data
Organizational requirements that are derived from these
functions:
– ALU
– Control logic
– Temporary storage
– Means to move data and instructions in and around the CPU
CPU With System Bus (External view of the CPU)
Internal Structure Of CPU
Register Organization
Registers form the highest level of the memory
hierarchy:
• Small set of high speed storage locations
• CPU must have some working space (temporary
storage for data and control information), which are
called registers
• Number and function vary between processor designs
• One of the major design decisions
• Top level of memory hierarchy
Two types of registers
– User-visible
» May be referenced by assembly-level
instructions and are thus “visible” to the
user
– Control and status registers
» Used to control the operation of the CPU
» Most are not visible to the user
User-visible Registers
General categories based on function
– General purpose
» Can be assigned a variety of functions
» It can contain operand for any opcode
– Data
» These registers only hold data
– Address
» These registers only hold address information
» Examples: general purpose address registers, segment
pointers, stack pointers, index registers
– Condition codes
» Visible to the user but values set by the CPU as the result
of performing operations
» Example code bits: zero, positive, overflow
» Bit values are used as the basis for conditional jump
instructions
Design trade off between general purpose and specialized registers
Typical registers
– Program counter
» Points to the next instruction to be executed
– Instruction register
» Contains the instruction being executed
– Memory address register
– Memory data/buffer register
– Program status word(s)
» Superset of condition code register
» Interrupt masks, supervisory modes, etc.
» Status information
CPU Register Classification:
1 User-visible registers
• General Purpose
• Data
• Address
• Condition Codes