Given our 5-stage pipeline with the hardware support for forwarding and stall to deal with data hazards and the following codes: Add $1, $2, $2 Lw $3, 0($4) And $5, $1, $3 Sub $6, $5, $7 Lw $6, 0($8) Sw $6, 0($5) (1) Find all data dependencies such as “on $1 from Add to And” (2) Among all data dependencies, which ones will result in data hazards (that need forwarding and/or stall to deal with)? (3) Draw multiple-clock-cycle diagram (F,D,X,M,W) to show the actual execution of the codes on the pipeline (in case of load-use hazard, the pipeline should stall properly) 4) Draw all data forwarding paths on the diagram (5) For each forwarding path, label its type (M-to-X, X-to-X, etc.).
Given our 5-stage pipeline with the hardware support for forwarding and stall to deal
with data hazards and the following codes:
Add $1, $2, $2
Lw $3, 0($4)
And $5, $1, $3
Sub $6, $5, $7
Lw $6, 0($8)
Sw $6, 0($5)
(1) Find all data dependencies such as “on $1 from Add to And”
(2) Among all data dependencies, which ones will result in data hazards (that need forwarding and/or stall to deal with)?
(3) Draw multiple-clock-cycle diagram (F,D,X,M,W) to show the actual execution of the codes on the pipeline (in case of load-use hazard, the pipeline should stall properly)
4) Draw all data forwarding paths on the diagram
(5) For each forwarding path, label its type (M-to-X, X-to-X, etc.).
Trending now
This is a popular solution!
Step by step
Solved in 3 steps