{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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
Image of page 1

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

View Full Document Right 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 */
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)
Image of page 3

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern