Project Instruction Scheduler Assembler for DLX

Slides:



Advertisements
Similar presentations
Advanced Computer Architectures Laboratory on DLX Pipelining Vittorio Zaccaria.
Advertisements

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.
CMSC 611: Advanced Computer Architecture Instruction Level Parallelism Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides.
Lecture 6: Pipelining MIPS R4000 and More Kai Bu
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.
CIS429/529 Winter 2007 Pipelining II- 1 Additional pipelining topics Why pipelining is so hard: exception handling ILP techniques: loop unrolling.
CIS429/529 Winter 2007 Pipelining-1 1 Pipeling RISC/MIPS64 five stage pipeline Basic pipeline performance Pipeline hazards Branch hazards More pipeline.
1 Lecture 4: Advanced Pipelines Data hazards, control hazards, multi-cycle in-order pipelines (Appendix A.4-A.10)
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Sep 24, 2003 Topic: Pipelining -- Intermediate Concepts (Multicycle Operations;
EECC551 - Shaaban #1 Lec # 2 Winter Instruction Pipelining Review:Instruction Pipelining Review: –MIPS In-Order Single-Issue Integer Pipeline.
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.
Instruction Pipelining Review
Pipeline Exceptions & ControlCSCE430/830 Pipeline: Exceptions & Control CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng.
EECC551 - Shaaban #1 Fall 2002 lec# Floating Point/Multicycle Pipelining in MIPS Completion of MIPS EX stage floating point arithmetic operations.
EENG449b/Savvides Lec 4.1 1/22/04 January 22, 2004 Prof. Andreas Savvides Spring EENG 449bG/CPSC 439bG Computer.
The Basics: Pipelining J. Nelson Amaral University of Alberta 1.
EENG449b/Savvides Lec 4.1 1/25/05 January 25 and 25, 2005 Prof. Andreas Savvides Spring g449b EENG 449b/CPSC.
1 Lecture 4: Advanced Pipelines Data hazards, control hazards, multi-cycle in-order pipelines (Appendix A.4-A.10)
ENGS 116 Lecture 61 Pipelining Difficulties and MIPS R4000 Vincent H. Berk October 6, 2008 Reading for today: A.3 – A.4, article: Yeager Reading for Wednesday:
EECC551 - Shaaban #1 Lec # 2 Winter Instruction Pipelining Review Instruction pipelining is CPU implementation technique where multiple.
1 Lecture 4: Advanced Pipelines Control hazards, multi-cycle in-order pipelines, static ILP (Appendix A.4-A.10, Sections )
Appendix A Pipelining: Basic and Intermediate Concepts
Instruction Pipelining Review:
EENG449b/Savvides Lec 5.1 1/27/04 January 27, 2004 Prof. Andreas Savvides Spring EENG 449bG/CPSC 439bG Computer.
CIS429.S00: Lec12- 1 Miscellaneous pipelining topics Why pipelining is so hard: exception handling Advanced pipelining techniques: loop unrolling.
EECC551 - Shaaban #1 Lec # 4 winter Data Hazards Requiring Stall Cycles In some code sequence cases, potential data hazards cannot be handled.
Instruction Pipelining Review:
EECC551 - Shaaban #1 Lec # 2 Winter DLX Instruction Format 16 bits6 bits5 bits Immediate rdrs1Opcode 6 bits5 bits 11 bits Opcoders1rs2rdfunc.
Computer Architecture
EECC551 - Shaaban #1 Fall 2001 lec# Floating Point/Multicycle Pipelining in DLX Completion of DLX EX stage floating point arithmetic operations.
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.
What are Exception and Interrupts? MIPS terminology Exception: any unexpected change in the internal control flow – Invoking an operating system service.
Lecture 5: Pipelining Implementation Kai Bu
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.
Spring 2003CSE P5481 Precise Interrupts Precise interrupts preserve the model that instructions execute in program-generated order, one at a time If an.
F00: 1 CS/EE 5810 CS/EE 6810 Exceptions. F00: 2 CS/EE 5810 CS/EE 6810 Exceptions Just when you thought pipelines were not that hard… Pipeline benefit.
Appendix A. Pipelining: Basic and Intermediate Concept
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.
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
Data Hazards Dependent instructions add %g1, %g2, %g3 sub %l1, %g3, %o0 Forwarding helps, but not all hazards can be avoided.
Instruction-Level Parallelism and Its Dynamic Exploitation
CMSC 611: Advanced Computer Architecture
Instruction-Level Parallelism
Exceptions Another form of control hazard Could be caused by…
Computer Organization CS224
Lecture 15: Pipelining: Branching & Complications
Lecture 07: Pipelining Multicycle, MIPS R4000, and More
Pipelining Wrapup Brief overview of the rest of chapter 3
Appendix C Pipeline implementation
Exceptions & Multi-cycle Operations
Pipelining: Advanced ILP
Lecture 6: Advanced Pipelines
Pipelining Multicycle, MIPS R4000, and More
The processor: Pipelining and Branching
Instruction Pipelining Review:
CSC 4250 Computer Architectures
How to improve (decrease) CPI
Overview What are pipeline hazards? Types of hazards
Scoreboarding ENGS 116 Lecture 7 Vincent H. Berk October 5, 2005
Extending simple pipeline to multiple pipes
Lecture 4: Advanced Pipelines
Control Hazards Branches (conditional, unconditional, call-return)
CMSC 611: Advanced Computer Architecture
Lecture 06: Pipelining Implementation
Lecture 5: Pipeline Wrap-up, Static ILP
Interrupts and exceptions
CMSC 611: Advanced Computer Architecture
Presentation transcript:

Project Instruction Scheduler Assembler for DLX Create Virtual Machine Avoid load and branch delays Assembler for DLX Cycle-by-cycle Pipeline simulator DLX-like pipeline Six stages (two memory access stages) Branch results in EX stage Branch delay = cycles

Pipeline Hazards Review Structural hazards Not fully pipelined functional units Not enough duplication Data hazards Interdependencies among results and operands Forwarding and Interlock Types: RAW, WAW, WAR Compiler scheduling Control (branch/jump) hazards Branch delay Dynamic behavior of branches Hardware techniques and compiler support

Exceptions I/O device request Operating system call Tracing instruction execution Breakpoint Integer overflow FP arithmetic anomaly Page fault Misaligned memory access Memory protection violation Undefined instruction Hardware malfunctions Power failure

Exception Categories Synchronous vs. asynchronous User requested vs. coerced User maskable vs. nonmaskable Within vs. between instructions Resume vs. terminate Most difficult Occur in the middle of the instruction Must be able to restart Requires intervention of another program (OS)

Exception handling procedure CPU IF ID EX M WB Complete IF ID EX M WB Cache IF ID EX M WB Suspend Execution Memory IF ID EX M WB Disk Trap addr IF ID EX M WB Exception handling procedure IF ID EX M WB . . . RFE

Stopping and Restarting Execution TRAP, RTE instructions IAR register saves the PC of faulting instruction Safely save the state of the pipeline Force a TRAP on the next IF Until the TRAP is taken, turn off all writes for the faulting instruction and the following ones. Exception-handling routine saves the PC of the faulting instruction For delayed branches we need to save more PCs Precise Exceptions

Exceptions in DLX Pipeline Stage Exceptions IF Page fault, misaligned memory access, memory-protection violation ID Undefined opcode EX Arithmetic exception MEM Page fault, misaligned memory access, memory-protection violation WB None

Exception Handling in DLX LW IF ID EX M WB ADD IF ID EX M WB LW IF ID EX M WB ADD IF ID EX M WB IF ID EX M WB Exception Status Vector Check exceptions here

ISA and Exceptions Precise exceptions are simple in DLX Problems Only one result per instruction Result is written at the end of execution Problems Instructions change machine state in the middle of the execution Autoincrement addressing modes Multicycle operations ISA Design Pipelining

Multicycle Operations in DLX Integer unit EX FP/int multiply M1 M2 M3 M4 M5 M6 M7 MEM WB IF ID FP adder A1 A2 A3 A4 FP/int divider DIV

Latencies and Initiation Intervals Functional Unit Latency Initiation Interval Integer ALU 0 1 Data Memory 1 1 FP adder 3 1 FP/int multiply 6 1 FP/int divider 24 25 MULTD IF ID M1 M2 M3 M4 M5 M6 M7 Mem WB ADDD IF ID A1 A2 A3 A4 Mem WB LD IF ID EX Mem WB SD IF ID EX Mem WB

Hazards and in FP pipelines Structural hazards in DIV unit Structural hazards in WB WAW hazards are possible (WAR not possible)\ Out-of-order completion More frequent RAW hazards IF ID EX Mem WB LD F4, 0(R2) IF ID stall M1 M2 M3 M4 M5 M6 M7 Mem WB MULTD F0, F4, F6 ADD F2, F0, F8 IF stall ID stall stall stall stall stall stall A1 A2 A3 A4 Mem WB