CH14 COA9e Processor Structure and Function
CH14 COA9e Processor Structure and Function
CH14 COA9e Processor Structure and Function
William Stallings
Computer Organization
and Architecture
9th Edition
+
Chapter 14
Processor Structure and Function
+
14.1 Processor Organization
Processor Requirements:
Fetch instruction
The processor reads an instruction from memory (register, cache, main memory)
Interpret instruction
The instruction is decoded to determine what action is required
Fetch data
The execution of an instruction may require reading data from memory or an I/O module
Process data
The execution of an instruction may require performing some arithmetic or logical operation
on data
Write data
The results of an execution may require writing data to memory or an I/O module
In order to do these things the processor needs to store some data temporarily and
therefore needs a small internal memory
CPU With the System Bus
CPU Internal Structure
+
14.2 Register Organization
Within the processor there is a set of registers that function as a level of
memory above main memory and cache in the hierarchy
Categories:
Pipelining Strategy
To apply this concept to
instruction execution we
Similar to the use of an must recognize that an
assembly line in a instruction has a number
manufacturing plant of stages
Six Stage
Instruction Pipeline
+
Alternative Pipeline
Depiction
+
Speedup Factors
with Instruction
Pipelining
Pipeline Hazards
Occur when the
pipeline, or some
portion of the pipeline, There are three types of
must stall because hazards:
conditions do not • Resource
permit continued • Data
execution • Control
Also referred to as a
pipeline bubble
+
Resource
Hazards
Hazard
+
Data Hazards
A data hazard occurs when there is a conflict in the access of an
operand location
+
Types of Data Hazard
Read after write (RAW), or true dependency
An instruction modifies a register or memory location
Succeeding instruction reads data in memory or register location
Hazard occurs if the read takes place before write operation is complete
Drawbacks:
• With multiple pipelines there are contention delays for access to the registers and
to memory
• Additional branch instructions may enter the pipeline before the original branch
decision is resolved
Prefetch Branch Target
Benefits:
Instructions fetched in sequence will be available without the usual memory
access time
If a branch occurs to a target just a few locations ahead of the address of the
branch instruction, the target will already be in the buffer
This strategy is particularly well suited to dealing with loops
Branch Prediction
Flow Chart
Branch Prediction State Diagram
+ Summary Processor Structure and
Function
Chapter 14
Instruction pipelining
Processor organization
Pipelining strategy
Register organization Pipeline performance
User-visible registers Pipeline hazards
Control and status registers Dealing with branches
Intel 80486 pipelining
Instruction cycle
The indirect cycle The Arm processor
Data flow Processor organization
Processor modes
The x86 processor family
Register organization
Register organization
Interrupt processing
Interrupt processing
+ Key terms Chapter 14
flag
condition code
branch prediction
instruction cycle
instruction pipeline
instruction prefetch
program status word (PSW)
+ Homework
14.1 2 3 4 7 8 9 10 11 13 16