Pipeline Architecture
Pipeline Architecture
Pipeline Core
● Overview
● Implementation of Fetch Cycle
● Implementation of Decode Cycle
● Implementation of Execute Cycle
● Implementation of Memory Cycle
● Implementation of Write Back Cycle
● Implementation of Pipeline Top
● Pipeline Hazards
● Implementation of Hazard Unit
● Implementation of Pipeline Top II
Overview of RISC-V
Pipeline
Architecture
Pipelining
We design a pipelined processor by subdividing the
single-cycle processor into five pipeline stages.
Thus, five instructions can execute simultaneously,
one in each stage. Because each stage has only
one-fifth of the entire logic, the clock frequency is
approximately five times faster.
Pipelining
Pipeline Datapath
Implementation of
Fetch Cycle
Abstract View of Pipelining
Fetch Cycle Datapath PCSrcE
Modules to be Integrated:
1) PC Mux
2) Program Counter
3) Adder
4) Instruction Memory
InstrD
5) Fetch Stage Registers
PCD
PCPlus4D
PCTargetE
Implementation of
Decode Cycle
RegWriteW
Modules to be Integrated:
1) Control Unit
2) Register File
3) Extender
4) Decode Stage Registers InstrD
PCD
PCPlus4D
X
RDW
ResultW
Implementation of
Execute Cycle
X
Modules to be Integrated:
1) AND Gate
2) Mux
3) Adder
4) ALU
5) Execute Stage Registers
X
Implementation of
Memory Cycle
Pipeline Datapath
X
Modules to be Integrated:
1) Data Memory
2) Memory Stage Registers
X
Implementation of
Write Back Cycle
Write Back Cycle Datapath
Modules to be Integrated:
1) Mux
Implementation of
Pipeline Top
Pipeline Datapath
Pipeline Hazards
Pipeline Hazard
● Structural Hazard
1. Hardware does not support the execution of instruction in same clock cycle.
2. Without having Two memories RISC-V pipelining architecture will have structural hazard.
● Data Hazard
1. Data to be executed is not available.
2. May occur when pipeline is stalled.
3. Solve by using forwarding or bypassing technique.
Data Hazard In Pipelining
Solution of Data Hazards
if (RegWriteM and (RdM != 0) and (RdM == Rs2E)) if (RegWriteW and (RdW != 0) and (RdW == Rs2E))
ForwardBE = 10 ForwardBE = 01
RegWriteW
ForwardAE
ForwardBE
RegWriteM
Rs2E
Rs1E
RdW
RdM
Implementation of
Pipeline Top II
Updated Pipeline Top Architecture
Thank You