Spring 2003CSE P5481 Precise Interrupts Precise interrupts preserve the model that instructions execute in program-generated order, one at a time If an.

Slides:



Advertisements
Similar presentations
Spring 2003CSE P5481 Out-of-Order Execution Several implementations out-of-order completion CDC 6600 with scoreboarding IBM 360/91 with Tomasulos algorithm.
Advertisements

1 Lecture 11: Modern Superscalar Processor Models Generic Superscalar Models, Issue Queue-based Pipeline, Multiple-Issue Design.
Computer Structure 2014 – Out-Of-Order Execution 1 Computer Structure Out-Of-Order Execution Lihu Rappoport and Adi Yoaz.
COMP 4211 Seminar Presentation Based On: Computer Architecture A Quantitative Approach by Hennessey and Patterson Presenter : Feri Danes.
Instruction Set Issues MIPS easy –Instructions are only committed at MEM  WB transition Other architectures are more difficult –Instructions may update.
Intro to Computer Org. Pipelining, Part 2 – Data hazards + Stalls.
Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
Instruction-Level Parallelism (ILP)
Spring 2003CSE P5481 Reorder Buffer Implementation (Pentium Pro) Hardware data structures retirement register file (RRF) (~ IBM 360/91 physical registers)
Computer Organization and Architecture
1 Lecture: Pipelining Extensions Topics: control hazards, multi-cycle instructions, pipelining equations.
1 IF IDEX MEM L.D F4,0(R2) MUL.D F0, F4, F6 ADD.D F2, F0, F8 L.D F2, 0(R2) WB IF IDM1 MEM WBM2M3M4M5M6M7 stall.
Computer Architecture 2011 – Out-Of-Order Execution 1 Computer Architecture Out-Of-Order Execution Lihu Rappoport and Adi Yoaz.
1 Lecture 4: Advanced Pipelines Data hazards, control hazards, multi-cycle in-order pipelines (Appendix A.4-A.10)
1 Lecture 7: Out-of-Order Processors Today: out-of-order pipeline, memory disambiguation, basic branch prediction (Sections 3.4, 3.5, 3.7)
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Sep 24, 2003 Topic: Pipelining -- Intermediate Concepts (Multicycle Operations;
1 Lecture 8: Branch Prediction, Dynamic ILP Topics: branch prediction, out-of-order processors (Sections )
Chapter 12 Pipelining Strategies Performance Hazards.
1 Lecture 5: Pipeline Wrap-up, Static ILP Basics Topics: loop unrolling, VLIW (Sections 2.1 – 2.2) Assignment 1 due at the start of class on Thursday.
1 Lecture 8: Branch Prediction, Dynamic ILP Topics: static speculation and branch prediction (Sections )
1 Lecture 4: Advanced Pipelines Data hazards, control hazards, multi-cycle in-order pipelines (Appendix A.4-A.10)
1 Lecture 4: Advanced Pipelines Control hazards, multi-cycle in-order pipelines, static ILP (Appendix A.4-A.10, Sections )
1 Manchester Mark I, This was the second (the first was a small- scale prototype) machine built at Cambridge. A production version of this computer.
CH12 CPU Structure and Function
What are Exception and Interrupts? MIPS terminology Exception: any unexpected change in the internal control flow – Invoking an operating system service.
Computer Organization and Architecture Instruction-Level Parallelism and Superscalar Processors.
1 Appendix A Pipeline implementation Pipeline hazards, detection and forwarding Multiple-cycle operations MIPS R4000 CDA5155 Spring, 2007, Peir / University.
Pipeline Extensions prepared and Instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University MIPS Extensions1May 2015.
Implementing Precise Interrupts in Pipelined Processors James E. Smith Andrew R.Pleszkun Presented By: Shrikant G.
Recap Multicycle Operations –MIPS Floating Point Putting It All Together: the MIPS R4000 Pipeline.
LECTURE 10 Pipelining: Advanced ILP. EXCEPTIONS An exception, or interrupt, is an event other than regular transfers of control (branches, jumps, calls,
CSC 4250 Computer Architectures September 22, 2006 Appendix A. Pipelining.
Exceptions and Interrupts “Unexpected” events requiring change in flow of control – Different ISAs use the terms differently Exception – Arises within.
CS203 – Advanced Computer Architecture ILP and Speculation.
Dynamic Scheduling Why go out of style?
Instruction-Level Parallelism
CSL718 : Superscalar Processors
Lecture 15: Pipelining: Branching & Complications
Instruction Level Parallelism
Lecture 07: Pipelining Multicycle, MIPS R4000, and More
CIS-550 Advanced Computer Architecture Lecture 10: Precise Exceptions
Lecture: Pipelining Extensions
Pipelining Wrapup Brief overview of the rest of chapter 3
Exceptions & Multi-cycle Operations
Pipelining: Advanced ILP
The processor: Exceptions and Interrupts
Morgan Kaufmann Publishers The Processor
Lecture 6: Advanced Pipelines
Superscalar Processors & VLIW Processors
The processor: Pipelining and Branching
Superscalar Pipelines Part 2
Lecture 8: ILP and Speculation Contd. Chapter 2, Sections 2. 6, 2
15-740/ Computer Architecture Lecture 5: Precise Exceptions
How to improve (decrease) CPI
Chapter Six.
Lecture: Pipelining Extensions
Lecture: Pipelining Extensions
Instruction Execution Cycle
Project Instruction Scheduler Assembler for DLX
Prof. Onur Mutlu Carnegie Mellon University Fall 2011, 9/30/2011
Extending simple pipeline to multiple pipes
Lecture 4: Advanced Pipelines
ECE 445 – Computer Organization
Control Hazards Branches (conditional, unconditional, call-return)
Interrupts and exceptions
CMSC 611: Advanced Computer Architecture
Presentation transcript:

Spring 2003CSE P5481 Precise Interrupts Precise interrupts preserve the model that instructions execute in program-generated order, one at a time If an interrupt occurs, the processor can recover from it What happens on a precise interrupt: identify the instruction that caused the interrupt let the instructions before faulting instruction finish disable writes for faulting & subsequent instructions force trap instruction into pipeline trap routine save the state of the executing program correct the cause of the interrupt restore program state restart faulting & subsequent instructions

Spring 2003CSE P5482 How Pipelines Complicate Interrupt Handling It’s fairly simple to maintain precise interrupts in the R3000 integer pipeline one instruction fetched and executed each cycle instructions executed in fetch order Still, there are issues…. Pipelines execute several instructions at once how do you determine which one caused the exception?

Spring 2003CSE P5483 How Pipelines Complicate Interrupt Handling Simultaneous interrupts 2 stages cause an interrupt at the same time a solution: handle them in program order still precise

Spring 2003CSE P5484 A 5-Stage Pipeline

Spring 2003CSE P5485 How Pipelines Complicate Interrupt Handling Interrupts out of order wrt sequential instruction execution subsequent instruction causes an interrupt before a previous instruction interrupts still must be handled in program order for precise interrupts A solution: interrupt handled before the write stage interrupt recorded in a per-instruction bit vector which flows with it down the pipeline interrupts for instruction in write stage are handled before it changes any state restart all instructions in the pipeline

Spring 2003CSE P5486 How Pipelines Complicate Interrupt Handling Multicycle operations in separate pipelines some types floating point operations integer multiply & divide can cause imprecise interrupts because operations don’t necessarily complete in program-generated order example: cannot restart interrupting & subsequent instructions because some have completed a completed instruction may have overwritten one its source operands divf FP exception multf not done add completed

Spring 2003CSE P5487

Spring 2003CSE P5488 How Pipelines Complicate Interrupt Handling Dealing with imprecise interrupts ignore the imprecise interrupt (IBM 360) precise mode/imprecise mode (Alphas?) trade-off: correctness vs. performance stall until no previous instruction will fault (Pentium Pro) buffer writes until instructions complete future file or shadow register; today called register renaming history file (VAX) costs: additional registers & bypass logic to FUs

Spring 2003CSE P5489 How Multicycle Operations Complicate Pipelining Current structural hazards: multiple writes in the same cycle when instructions finish in a different order than their fetch order track use of the write port & stall instructions in the decode stage if a conflict set the bit in a shift register that is the number of cycles until the register file will be written shift left each cycle if this instruction’s bit is already set, stall adv: check for all structural hazards in 1 place disadv: shift register & write conflict logic detect the hazard just before it occurs stall before the common final stages adv: easier to prioritize among instructions involved in the hazard disadv: more complicated pipeline control because might need to check for structural hazards in multiple places

Spring 2003CSE P54810 How Multicycle Operations Complicate Pipelining

Spring 2003CSE P54811 ISA & Pipelines How instruction set architectures complicate pipelines: variable cycle instructions cause: more complicated hazard detection more forwarding logic more stalling harder to implement precise interrupts complex addressing modes cause: WAR hazards from autoincrement same problems as above from multiple memory accesses self-modifying code causes pipeline flush on address match between instruction being written & instruction later in the pipeline