CMPE 421 REVIEW: MIDTERM 1. A MODIFIED FIVE-Stage Pipeline PC A Y R MD1 addr inst Inst Memory Imm Ext add rd1 GPRs rs1 rs2 ws wd rd2 we wdata addr wdata.

Slides:



Advertisements
Similar presentations
Morgan Kaufmann Publishers The Processor
Advertisements

Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
Lecture Objectives: 1)Define pipelining 2)Calculate the speedup achieved by pipelining for a given number of instructions. 3)Define how pipelining improves.
CS252/Patterson Lec 1.1 1/17/01 Pipelining: Its Natural! Laundry Example Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer.
1 RISC Pipeline Han Wang CS3410, Spring 2010 Computer Science Cornell University See: P&H Chapter 4.6.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Pipeline Hazards See: P&H Chapter 4.7.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University RISC Pipeline See: P&H Chapter 4.6.
CSE 490/590, Spring 2011 CSE 490/590 Computer Architecture Pipelining III Steve Ko Computer Sciences and Engineering University at Buffalo.
Chapter Six Enhancing Performance with Pipelining
CSCE 212 Quiz 9 – 3/30/11 1.What is the clock cycle time based on for single-cycle and for pipelining? 2.What two actions can be done to resolve data hazards?
Lec 8: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Pipelined Processor II CPSC 321 Andreas Klappenecker.
DLX Instruction Format
Computer ArchitectureFall 2007 © October 31, CS-447– Computer Architecture M,W 10-11:20am Lecture 17 Review.
Lec 9: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
CSE378 Pipelining1 Pipelining Basic concept of assembly line –Split a job A into n sequential subjobs (A 1,A 2,…,A n ) with each A i taking approximately.
Instruction Sets and Pipelining Cover basics of instruction set types and fundamental ideas of pipelining Later in the course we will go into more depth.
Lecture 15: Pipelining and Hazards CS 2011 Fall 2014, Dr. Rozier.
Pipelining. 10/19/ Outline 5 stage pipelining Structural and Data Hazards Forwarding Branch Schemes Exceptions and Interrupts Conclusion.
Chapter 2 Summary Classification of architectures Features that are relatively independent of instruction sets “Different” Processors –DSP and media processors.
Pipelined Datapath and Control
Computer Organization CS224 Fall 2012 Lesson 28. Pipelining Analogy  Pipelined laundry: overlapping execution l Parallelism improves performance §4.5.
1 COMP541 Multicycle MIPS Montek Singh Apr 4, 2012.
Morgan Kaufmann Publishers
Chapter 4 CSF 2009 The processor: Pipelining. Performance Issues Longest delay determines clock period – Critical path: load instruction – Instruction.
Chapter 4 The Processor. Chapter 4 — The Processor — 2 Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined.
Chapter 4 The Processor CprE 381 Computer Organization and Assembly Level Programming, Fall 2012 Revised from original slides provided by MKP.
CMPE 421 Parallel Computer Architecture
EECE 476: Computer Architecture Slide Set #5: Implementing Pipelining Tor Aamodt Slide background: Die photo of the MIPS R2000 (first commercial MIPS microprocessor)
COMP541 Multicycle MIPS Montek Singh Mar 25, 2010.
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
11 Pipelining Kosarev Nikolay MIPT Oct, Pipelining Implementation technique whereby multiple instructions are overlapped in execution Each pipeline.
CSE431 L06 Basic MIPS Pipelining.1Irwin, PSU, 2005 MIPS Pipeline Datapath Modifications  What do we need to add/modify in our MIPS datapath? l State registers.
Introduction to Computer Organization Pipelining.
Pipelining: Implementation CPSC 252 Computer Organization Ellen Walker, Hiram College.
Computer Organization
Stalling delays the entire pipeline
Note how everything goes left to right, except …
CSCI206 - Computer Organization & Programming
Morgan Kaufmann Publishers
5 Steps of MIPS Datapath Figure A.2, Page A-8
Morgan Kaufmann Publishers The Processor
Single Clock Datapath With Control
Pipeline Implementation (4.6)
Decode and Operand Read
ECS 154B Computer Architecture II Spring 2009
CDA 3101 Spring 2016 Introduction to Computer Organization
Forwarding Now, we’ll introduce some problems that data hazards can cause for our pipelined processor, and show how to handle them with forwarding.
Morgan Kaufmann Publishers The Processor
Pipelining in more detail
CSCI206 - Computer Organization & Programming
Pipelining Basic concept of assembly line
Pipeline control unit (highly abstracted)
Computer System Design Lecture 5
The Processor Lecture 3.5: Data Hazards
Instruction Execution Cycle
Pipeline control unit (highly abstracted)
Pipeline Control unit (highly abstracted)
Pipelining Basic concept of assembly line
Pipelining.
Pipelining Basic concept of assembly line
Morgan Kaufmann Publishers The Processor
Introduction to Computer Organization and Architecture
Pipelining Chapter 6.
COMS 361 Computer Organization
©2003 Craig Zilles (derived from slides by Howard Huang)
Need to stall for one cycle.
Presentation transcript:

CMPE 421 REVIEW: MIDTERM 1

A MODIFIED FIVE-Stage Pipeline PC A Y R MD1 addr inst Inst Memory Imm Ext add rd1 GPRs rs1 rs2 ws wd rd2 we wdata addr wdata rdata Data Memory we A2 ALU B2 B MD2 IR IFIDACEX/MEMWB Instruction fetch Instruction decode and register read Address calculation ALU execution and memory access Writeback to register file 2

Question Consider a new datapath to improve the performance of our existing pipeline datapath that we have seen in class In the new datapath the ALU the Execute stage is replaced by a simple adder and the original ALU is moved from the Execute stage to the Memory stage. The adder in the 3 rd stage is used only for address calculations involving load/store instructions. For all other instructions, the data is simply forwarded to the 4 th stage. The ALU is running in parallel with the data memory in the 4 th stage of the pipeline. During a load/store instruction, the ALU is inactive, while the data memory is inactive during the ALU instructions. In this problem we will ignore jump and branch instructions. 3

Question Give an example sequence of MIPS instructions (five or fewer instructions) that would cause a pipeline bubble in the original datapath, but not in the new datapath. Give an example sequence of MIPS instructions (five or fewer instructions) that would cause a pipeline bubble in the new datapath, but not in the original datapath. Compare the advantages and disadvantages of the new datapath. 4

Question Further improvements to the fully bypassed 5-stage MIPS processor pipelines presented in page. In this new pipeline also the Adder with a proper ALU, with the goal of eliminating all hazards The Dual ALU Pipeline has two ALUs: – ALU1 is in the 3rd pipeline stage (EX1) – ALU2 is in the 4th pipeline stage (EX2/MEM). A memory instruction always uses ALU1 to compute its address. An ALU instruction uses either ALU1 or ALU2, but never both. If an ALU instruction’s operands are available (either from the register file or the forwarding path) by the end of the ID stage, the instruction uses ALU1; otherwise, the instruction uses ALU2. 5

Modified-Modified Datapath 6

Question For the following instruction sequence, indicate which ALU each add instruction uses. Assume that the pipeline is initially idle (for example, it has been executing nothing but nop instructions). 7

Indicate whether each of the following instruction sequences causes a stall in the pipeline and a short summary of the reason why. Consider each sequence separately and assume that the pipeline is initially idle. 8