chapter6-2-b

chapter6-2-b - Hazard Detection 2 Chapter 6-2 Enhancing...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Architecture 2 (Chapter 6-2.1) 2000 1 2 Chapter 6-2 Enhancing Performance with Pipelining Never Waste Time American Proverb Computer Architecture 2 (Chapter 6-2.2) 2000 1 Hazard Detection IF/ID ID/EX EX/MEM MEM/WB 1a. EX/MEM.RegisterRd = ID/EX.RegisterRs 1b. EX/MEM.RegisterRd = ID/EX.RegisterRt 2a. MEM/WB.RegisterRd = ID/EX.RegisterRs 2b. MEM/WB.RegisterRd = ID/EX.RegisterRt sub $2, $1, $3 and $12, $2, $5 or $13, $6, $2 add $14, $2, $2 sw $15, 100($2) 1a 2b no no Q: Any Problem? Computer Architecture 2 (Chapter 6-2.3) 2000 1 Hazard Detection Problems: Some instructions do not write registers $0 as destination (sll $0, $1, 2) - do not forward nonzero result value Computer Architecture 2 (Chapter 6-2.4) 2000 1 Forwarding/Bypassing
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Computer Architecture 2 (Chapter 6-2.5) 2000 1 No Forwarding Computer Architecture 2 (Chapter 6-2.6) 2000 1 Forwarding Computer Architecture 2 (Chapter 6-2.7) 2000 1 1. EX Hazard If (EX/MEM.RegWrite and (EX/MEM.RegisterRd != 0) and (EX/MEM.RegisterRd = ID/EX.RegisterRs)) ForwardA = 10 /* from prior ALU result */ If (EX/MEM.RegWrite and (EX/MEM.RegisterRd != 0) and (EX/MEM.RegisterRd = ID/EX.RegisterRt)) ForwardB = 10 /* from prior ALU result */ Computer Architecture 2 (Chapter 6-2.8) 2000 1 2. MEM Hazard If (MEM/WB.RegWrite and (MEM/WB.RegisterRd != 0) and (MEM/WB.RegisterRd = ID/EX.RegisterRs)) ForwardA = 01 /* from memory or earlier ALU result */ If (MEM/WB.RegWrite and (MEM/WB.RegisterRd != 0) and (MEM/WB.RegisterRt = ID/EX.RegisterRt)) ForwardB = 01 /* from memory or earlier ALU result */
Background image of page 2
Computer Architecture 2 (Chapter 6-2.9) 2000 1 One Complication add $1, $1, $2 add $1, $1, $3 add $1, $1, $4 If (MEM/WB.RegWrite and (MEM/WB.RegisterRd != 0) and (EX/MEM.RegisterRd != ID/EX.RegisterRs) and (MEM/WB.RegisterRd = ID/EX.RegisterRs)) ForwardA = 01 Result in MEM stage is more recent! Computer Architecture 2 (Chapter 6-2.10)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/05/2008 for the course CSE 431 taught by Professor Card during the Spring '08 term at Illinois Tech.

Page1 / 12

chapter6-2-b - Hazard Detection 2 Chapter 6-2 Enhancing...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online