You are on page 1of 9

Processor organization

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

– General purpose registers maximize flexibility in instruction


design
– Special purpose registers permit implicit register specification in
instructions – reduces register field size in an instruction
– No clear “best” design approach

How many registers are enough

– More registers permit more operands to be held within the CPU --


reducing memory bandwidth requirements to some extent
– More registers cause an increase in the field sizes needed to
specify registers in an instruction word
– Having too many registers is not a good idea.
– Most machines use 8-32 registers
Control and status registers
These registers are used during the fetching, decoding and
execution of instructions
– Many are not visible to the user/programmer
– Some are visible but can not be (easily) modified

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

2 Control and status registers

You might also like