11.07.2015 Views

Chapter 4 Introduction

Chapter 4 Introduction

Chapter 4 Introduction

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Morgan Kaufmann Publishers 31 January 2013Load-Use Hazard Detectionn Check when using instruction is decodedin ID stagen ALU operand register numbers in ID stageare given byn IF/ID.RegisterRs, IF/ID.RegisterRtn Load-use hazard whenn ID/EX.MemRead and((ID/EX.RegisterRt = IF/ID.RegisterRs) or(ID/EX.RegisterRt = IF/ID.RegisterRt))n If detected, stall and insert bubbleCSE 420 <strong>Chapter</strong> 4 — The Processor — 77How to Stall the Pipelinen Force control values in ID/EX registerto 0n EX, MEM and WB do nop (no-operation)n Prevent update of PC and IF/ID registern Using instruction is decoded againn Following instruction is fetched againn 1-cycle stall allows MEM to read data for lwn Can subsequently forward to EX stageCSE 420 <strong>Chapter</strong> 4 — The Processor — 78

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!