Basics and Hazards of Pipeline Controller
Basics and Hazards of Pipeline Controller
Controller
LITERATURE SURVEY
Presented by
Mayank Raj
2016BEC098
Guided by
Mr. Vaibbhav Taraate
Dr. S. S. Gajre
Objective
Concept Of Pipeline
Multistage Pipeline
4-stage Pipeline
Hazards
Resource
Data
CONTENT
Control
Performance Parameters
Speed
Latency
Throughput
Opcode, Operand, Addressing Mode
Instruction
Timing Sequence
Reference Architecture
OBJECTIVE
To understand basics of pipeline controller
CONCEPT OF PIPELINE
It is an implementation technique where multiple tasks are performed in overlapped manner.
(i.e. In the same phase multiple instructions are executed)
Clk->
MULTISTAGE PIPELINE
An operation is divided into multiple stages which are
then executed in pipeline
Clk->
Stage 1: Fetch
Fetch an instruction from
instruction cache every cycle
Stage 2: Decode
Decodes opcode bits
Stage 3: Execute Stage 4: Store
Perform ALU operation Perform data cache access
HAZARDS
Ø A pipeline hazard occurs when the pipeline, or some
portion of the pipeline, must stall because conditions
do not permit continued execution.
The result is that the instructions must be executed in serial rather than parallel for
a portion of the pipeline.
e.g.
1. A single data and/or address bus can not read/write the same memory
location.
2. While mobile data sharing via USB cable, its inaccessible to read mobile files.
DATA HAZARDS
A data hazard occurs when there is a conflict in the access of an operand location.
A data hazard can lead to a pipeline stall when the current operation has to wait for
the results of an earlier operation which has not yet finished.
Example
The basic five units involved are for instruction fetching, operand address generation,
operand fetching, execution and storing results.
Clk->
With operand forwarding
Clock_Cycle 1 2 3 4 5 6 7
Read Operands
SUB: use result
SUB Fetch_SUB Decode_SUB Stall Execute_SUB Write_result
from previous
operation
Clk->
Operand forwarding (or data forwarding) is an optimization in pipelined CPUs to limit
performance deficits which occur due to pipeline stalls.
• e.g.
ADD A B C #A=B+C
SUB A B C #A=B-C
• A hazard occurs if the write operations take place in the reverse order of the
intended sequence.