IF ID EX MEM WB 400 ps 225 ps 350 ps 450 ps 300 ps

Similar documents
IF ID EX MEM WB 400 ps 225 ps 350 ps 450 ps 300 ps

7/11/2012. Single Cycle (Review) CSE 2021: Computer Organization. Multi-Cycle Implementation. Single Cycle with Jump. Pipelining Analogy

Chapter 4. Pipelining Analogy. The Processor. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop:

ECE473 Computer Architecture and Organization. Pipeline: Introduction

Lecture Topics. Announcements. Today: Pipelined Processors (P&H ) Next: continued. Milestone #4 (due 2/23) Milestone #5 (due 3/2)

EECE 321: Computer Organiza5on

Suggested Readings! Lecture 12" Introduction to Pipelining! Example: We have to build x cars...! ...Each car takes 6 steps to build...! ! Readings!

7/19/2012. IF for Load (Review) CSE 2021: Computer Organization. EX for Load (Review) ID for Load (Review) WB for Load (Review) MEM for Load (Review)

CSE 2021: Computer Organization

CS 110 Computer Architecture Lecture 11: Pipelining

Pipelining A B C D. Readings: Example: Doing the laundry. Ann, Brian, Cathy, & Dave. each have one load of clothes to wash, dry, and fold

A B C D. Ann, Brian, Cathy, & Dave each have one load of clothes to wash, dry, and fold. Time

LECTURE 8. Pipelining: Datapath and Control

Pipelined Processor Design

Single-Cycle CPU The following exercises are taken from Hennessy and Patterson, CO&D 2 nd, 3 rd, and 4 th Ed.

6.S084 Tutorial Problems L19 Control Hazards in Pipelined Processors

EE 457 Homework 5 Redekopp Name: Score: / 100_

Lecture 4: Introduction to Pipelining

CSEN 601: Computer System Architecture Summer 2014

Computer Architecture

RISC Design: Pipelining

ECE 2300 Digital Logic & Computer Organization. More Pipelined Microprocessor

Chapter 16 - Instruction-Level Parallelism and Superscalar Processors

CMSC 611: Advanced Computer Architecture

RISC Central Processing Unit

Computer Hardware. Pipeline

Pipelining and ISA Design

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

CS429: Computer Organization and Architecture

CS 61C: Great Ideas in Computer Architecture. Pipelining Hazards. Instructor: Senior Lecturer SOE Dan Garcia

Asanovic/Devadas Spring Pipeline Hazards. Krste Asanovic Laboratory for Computer Science M.I.T.

CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units

EN164: Design of Computing Systems Lecture 22: Processor / ILP 3

ECE 4750 Computer Architecture, Fall 2016 T09 Advanced Processors: Superscalar Execution

Instruction Level Parallelism. Data Dependence Static Scheduling

Instruction Level Parallelism Part II - Scoreboard

CISC 662 Graduate Computer Architecture. Lecture 9 - Scoreboard

You are Here! Processor Design Process. Agenda. Agenda 10/25/12. CS 61C: Great Ideas in Computer Architecture Single Cycle MIPS CPU Part II

CMP 301B Computer Architecture. Appendix C

COSC4201. Scoreboard

Computer Architecture ( L), Fall 2017 HW 3: Branch handling and GPU SOLUTIONS

Selected Solutions to Problem-Set #3 COE 608: Computer Organization and Architecture Single Cycle Datapath and Control

Dynamic Scheduling I

CMSC 611: Advanced Computer Architecture

Outline Single Cycle Processor Design Multi cycle Processor. Pipelined Processor Design. Overall clock period. Analyzing performance 3/18/2015

Pipelined Beta. Handouts: Lecture Slides. Where are the registers? Spring /10/01. L16 Pipelined Beta 1

CS61C : Machine Structures

FMP For More Practice

Computer Science 246. Advanced Computer Architecture. Spring 2010 Harvard University. Instructor: Prof. David Brooks

Metrics How to improve performance? CPI MIPS Benchmarks CSC3501 S07 CSC3501 S07. Louisiana State University 4- Performance - 1

Problem: hazards delay instruction completion & increase the CPI. Compiler scheduling (static scheduling) reduces impact of hazards

Out-of-Order Execution. Register Renaming. Nima Honarmand

Dynamic Scheduling II

OOO Execution & Precise State MIPS R10000 (R10K)

Generics AGEN Assessment Tool. 005 Drawings 001 Basic Drawings. q Competent q Not Yet Competent. Signed: Learner Name: Date: Telephone No.

CS420/520 Computer Architecture I

EECS 470 Lecture 4. Pipelining & Hazards II. Winter Prof. Ronald Dreslinski h8p://

Department Computer Science and Engineering IIT Kanpur

CS Computer Architecture Spring Lecture 04: Understanding Performance

Single vs. Mul2- cycle MIPS. Single Clock Cycle Length

Project 5: Optimizer Jason Ansel

CSE502: Computer Architecture CSE 502: Computer Architecture

EE382V-ICS: System-on-a-Chip (SoC) Design

CSE502: Computer Architecture Welcome to CSE 502

Instructor: Dr. Mainak Chaudhuri. Instructor: Dr. S. K. Aggarwal. Instructor: Dr. Rajat Moona

EECS 470 Lecture 8. P6 µarchitecture. Fall 2018 Jon Beaumont Core 2 Microarchitecture

DAT105: Computer Architecture

CS61C : Machine Structures

A LOW POWER DESIGN FOR ARITHMETIC AND LOGIC UNIT

CS61C : Machine Structures

Topic: Use Parallel Lines and Transversals. and transversals?

Parallel architectures Electronic Computers LM

Introduction to PLC and Ladder Logic Programming

CS 61C: Great Ideas in Computer Architecture Lecture 10: Finite State Machines, Func/onal Units. Machine Interpreta4on

Lesson 7. Digital Signal Processors

Performance Metrics, Amdahl s Law

CSE P567 Homework #4 Winter 2010

Pipelined Architecture (2A) Young Won Lim 4/7/18

Pipelined Architecture (2A) Young Won Lim 4/10/18

Improving the Processing Performance of a DSP for High Temperature Electronics using Circuit-Level Timing Speculation

CS521 CSE IITG 11/23/2012

Chapter 1 Introduction

SATSim: A Superscalar Architecture Trace Simulator Using Interactive Animation

Tomasulo s Algorithm. Tomasulo s Algorithm

0 A. Review. Lecture #16. Pipeline big-delay CL for faster clock Finite State Machines extremely useful You!ll see them again in 150, 152 & 164

CSE502: Computer Architecture CSE 502: Computer Architecture

Lecture 1. Tinoosh Mohsenin

Best Instruction Per Cycle Formula >>>CLICK HERE<<<

EECS 470. Lecture 9. MIPS R10000 Case Study. Fall 2018 Jon Beaumont

CSE502: Computer Architecture CSE 502: Computer Architecture

EECS150 - Digital Design Lecture 2 - Synchronous Digital Systems Review Part 1. Outline

EECS 470 Lecture 5. Intro to Dynamic Scheduling (Scoreboarding) Fall 2018 Jon Beaumont

HIGH-PERFORMANCE HYBRID WAVE-PIPELINE SCHEME AS IT APPLIES TO ADDER MICRO-ARCHITECTURES

Low Power Design Part I Introduction and VHDL design. Ricardo Santos LSCAD/FACOM/UFMS

Administrative Issues

Instructor: Randy H. Katz Fall Lecture #17. Warehouse Scale Computer

CIDM 2315 Final Project: Hunt the Wumpus

CS152 Computer Architecture and Engineering Lecture 3: ReviewTechnology & Delay Modeling. September 3, 1997

Lecture Topics. Announcements. Today: Memory Management (Stallings, chapter ) Next: continued. Self-Study Exercise #6. Project #4 (due 10/11)

Lecture 8-1 Vector Processors 2 A. Sohn

Transcription:

CSE 30321 Computer Architecture I Fall 2010 Homework 06 Pipelined Processors 85 points Assigned: November 2, 2010 Due: November 9, 2010 PLEASE DO THE ASSIGNMENT ON THIS HANDOUT!!! Problem 1: (25 points) In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems in this exercise assume that individual stages of the datapath take the following amounts of time to complete: Questions: IF ID EX MEM WB 400 ps 225 ps 350 ps 450 ps 300 ps Part A: (5 points) - How long will it take to completely process a single sw instruction in a pipelined processor? - What about in a non-pipelined, multi-cycle processor? - Comment on the difference in execution times. Part B: (5 points) - How long will it take to completely process 100 add instructions in a pipelined processor? (The add instructions may be dependent on one another, but you can assume that any dependencies can be resolved by forwarding so no stalls are needed.) - What about in a non-pipelined, multi-cycle processor? - Comment on the difference in execution times.

Part C: (5 points) To try to improve performance further, you have decided to break up 2 of the above stages into 2 shorter stages. (In other words, you are going to increase the depth of your pipeline.) - What current stages would you recommend breaking up? - How would this affect your answer to part B? (Note: Your decision about the second stage to break up should be based on the pipeline after you break up the first stage.) Note: The remaining parts of this question assume that instructions executed are broken down as follows: ALU beq lw sw 45% 15% 25% 15% Part D: (5 points) Assuming there are no stalls or hazards (and ignoring time to fill or drain the pipeline) what percentage of CCs for a single instruction require a reference to memory in a pipelined datapath? Part E: (5 points) Assuming there are no stalls or hazards (and ignoring time to fill or drain the pipeline) what percentage of time do instructions need to access memory in the same CC? (Assume that the instruction memory and data memory are the same memory.)

Problem 2: (25 points) In this question, we examine how data dependencies affect execution in the basic 5-stage pipeline discussed in class. Problems in this exercise refer to the following sequence of instructions: Questions: A: sub $1, $2, $3 B: add $4, $1, $1 C: lw $5, 0($1) D: add $6, $5, $2 E: add $7, $5, $3 F: sub $8, $6, $7 G: sw $7, 0($8) Part A: (10 points) Assume there is full forwarding. Show how the above sequence of instructions would flow through the pipeline. Identify data dependencies and note when/if they become data hazards. A: sub $1, $2, $3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 B: add $4, $1, $1 C: lw $5, 0($1) D: add $6, $5, $2 E: add $7, $5, $3 F: sub $8, $6, $7 G: sw $7, 0($8) List Dependencies/Hazards Here:

Note: - Refer to the following table to answer the remaining 2 questions. Without forwarding With full forwarding 350 ps 400 ps Part B: (10 points) What is the execution time of this instruction sequence without forwarding and with full forwarding? (A register may be read and written in the same CC.) What is the speedup achieved by adding full forwarding to a pipeline that had no forwarding? Complete the trace to help you answer this question. A: sub $1, $2, $3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 B: add $4, $1, $1 C: lw $5, 0($1) D: add $6, $5, $2 E: add $7, $5, $3 F: sub $8, $6, $7 G: sw $7, 0($8) Part C: (5 points) Is there anything that you or the compiler could do to further improve performance of the design with full forwarding?

Problem 3: (20 points) This problem will help you understand how certain code sequences can degrade the performance of pipelined code, and how hardware can help avoid performance degradation. Part A: (10 points) Identify all of the data dependencies in the following code. Which dependencies are data hazards that can be resolved via forwarding? Which dependencies are data hazards that will cause a stall? (Hint: always consider what clock cycle a piece of data is produced in, and in what clock cycle that data is ultimately needed by another instruction.) sub $6, $8, $10 add $7, $6, $8 sw $9, 0($7) 1 2 3 4 5 6 7 8 9 10 11 sub $6, $8, $10 add $7, $6, $8 sw $9, 0($7) List Dependencies/Hazards Here:

Part B: (10 points) Identify all of the data dependencies in the following code. Which dependencies are data hazards that can be resolved via forwarding? Which dependencies are data hazards that will cause a stall? (Hint: always consider what clock cycle a piece of data is produced in and in what clock cycle that data is ultimately needed by another instruction.) sub $7, $8, $9 sub $10, $8, $6 sw $10, 0($8) 1 2 3 4 5 6 7 8 9 10 11 sub $7, $8, $9 sub $10, $8, $6 sw $10, 0($8) List Dependencies/Hazards Here:

Problem 4: (15 points) The two parts of this question will help you see how branch instructions affect how a sequence of instructions moves through a pipelined datapath. Part A: (10 points) - Assume that forwarding has been implemented. - Assume that you can read and write a register in the same clock cycle - Assume that a given register contains its number o E.g. $1 = 1, $2 = 2, $3 = 3, $4 = 4, $5 = 5, $6 = 6, etc. - You may assume that each branch is predicted correctly. - Show the instruction trace. Instruction 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Comment (if needed) Y: add $5,$1,$1 beq $5,$2,X add $5,$5,$5 add $6,$2,$2 X: beq $4,$6,Y sll $7,$1,4 Part B: (5 points) What if branch prediction was not perfect and you instead just predicted that a branch was not taken? What would happen given the instruction sequence above? (You donʼt have to show a pipe trace, just briefly explain.)