MIPS Pipelined Datapath

Slides:



Advertisements
Similar presentations
MIPS Pipelined Datapath
Advertisements

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 RISC Pipeline See: P&H Chapter 4.6.
Part 2 - Data Hazards and Forwarding 3/24/04++
Review: MIPS Pipeline Data and Control Paths
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Lec 8: Pipelining Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University.
Computer Architecture - A Pipelined Datapath A Pipelined Datapath  Resisters are used to save data between stages. 1/14.
ENGS 116 Lecture 51 Pipelining and Hazards Vincent H. Berk September 30, 2005 Reading for today: Chapter A.1 – A.3, article: Patterson&Ditzel Reading for.
Pipeline Hazard CT101 – Computing Systems. Content Introduction to pipeline hazard Structural Hazard Data Hazard Control Hazard.
Pipeline Data Hazards: Detection and Circumvention Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly.
Pipelined Datapath and Control
CPE432 Chapter 4B.1Dr. W. Abu-Sufah, UJ Chapter 4B: The Processor, Part B-2 Read Section 4.7 Adapted from Slides by Prof. Mary Jane Irwin, Penn State University.
Chapter 4 CSF 2009 The processor: Pipelining. Performance Issues Longest delay determines clock period – Critical path: load instruction – Instruction.
Chapter 4 The Processor CprE 381 Computer Organization and Assembly Level Programming, Fall 2012 Revised from original slides provided by MKP.
CSIE30300 Computer Architecture Unit 05: Overcoming Data Hazards Hsin-Chou Chi [Adapted from material by and
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.
PROCESSOR PIPELINING YASSER MOHAMMAD. SINGLE DATAPATH DESIGN.
CPE432 Chapter 4B.1Dr. W. Abu-Sufah, UJ Chapter 4B: The Processor, Part B-1 Read Sections 4.7 Adapted from Slides by Prof. Mary Jane Irwin, Penn State.
Pipelining: Implementation CPSC 252 Computer Organization Ellen Walker, Hiram College.
CSE 340 Computer Architecture Spring 2016 Overcoming Data Hazards.
Interstage Buffers 1 Computer Organization II © McQuain Pipeline Timing Issues Consider executing: add $t2, $t1, $t0 sub $t3, $t1, $t0 or.
Pipeline Timing Issues
Computer Organization
Stalling delays the entire pipeline
Note how everything goes left to right, except …
Pipelining Chapter 6.
Single Clock Datapath With Control
Appendix C Pipeline implementation
Chapter 4 The Processor Part 4
ECS 154B Computer Architecture II Spring 2009
\course\cpeg323-08F\Topic6b-323
ECE232: Hardware Organization and Design
Design of the Control Unit for Single-Cycle Instruction Execution
Forwarding Now, we’ll introduce some problems that data hazards can cause for our pipelined processor, and show how to handle them with forwarding.
Chapter 4 The Processor Part 3
Review: MIPS Pipeline Data and Control Paths
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers The Processor
Chapter 4 The Processor Part 2
Pipelining review.
Single-cycle datapath, slightly rearranged
Pipelining Chapter 6.
Current Design.
Design of the Control Unit for One-cycle Instruction Execution
Pipelining in more detail
CSC 4250 Computer Architectures
Systems Architecture II
\course\cpeg323-05F\Topic6b-323
Data Hazards Data Hazard
Pipeline control unit (highly abstracted)
The Processor Lecture 3.6: Control Hazards
The Processor Lecture 3.4: Pipelining Datapath and Control
Control unit extension for data hazards
The Processor Lecture 3.5: Data Hazards
Instruction Execution Cycle
Pipeline control unit (highly abstracted)
Pipelining: Basic Concepts
Pipeline Control unit (highly abstracted)
Pipelining Basic concept of assembly line
Control unit extension for data hazards
Pipelining Basic concept of assembly line
Morgan Kaufmann Publishers The Processor
Introduction to Computer Organization and Architecture
Control unit extension for data hazards
©2003 Craig Zilles (derived from slides by Howard Huang)
Pipelined datapath and control
Need to stall for one cycle.
ELEC / Computer Architecture and Design Spring 2015 Pipeline Control and Performance (Chapter 6) Vishwani D. Agrawal James J. Danaher.
Pipelining Hazards.
Presentation transcript:

MIPS Pipelined Datapath MEM WB Right-to-left flow leads to hazards

Pipeline Buffers Need buffers between stages To hold (some of the) information produced in previous cycle

Pipeline Operation Cycle-by-cycle flow of instructions through the pipelined datapath “Single-clock-cycle” pipeline diagram Shows pipeline usage in a single cycle Highlight resources used c.f. “multi-clock-cycle” diagram Graph of operation over time We’ll look at “single-clock-cycle” diagrams for load & store

IF for Load, Store, … PC+4 is computed, stored back into the PC, stored in the IF/ID buffer although it will not be needed in a later stage for LW Instruction word is fetched from memory, and stored in the IF/ID buffer because it will be needed in the next stage.

ID for Load Bits of load instruction are taken from IF/ID buffer, while new instruction is being fetched back in stage 1. PC+4 is passed forward to ID/EX buffer... Read register #1 and #2 contents are fetched and stored in ID/EX buffer until needed in next stage… #2 won't be needed. 16-bit field is fetched from IF/ID buffer, then sign-extended, then stored in the ID/EX buffer for use in a later stage.

EX for Load PC+4 is taken from ID/EX buffer and added to branch offset… Computed branch target address is stored in EX/MEM buffer to await decision in next stage... but won't be needed. Read register #1 contents are taken from ID/EX buffer and provided to ALU. 16-bit literal is provided to ALU as second operand ALU result and Zero line are stored in EX/MEM buffer for use as memory address in next stage. Read register #2 is passed forward to EX/MEM buffer, for possible use in later stage… but won't be needed.

MEM for Load Zero line taken from EX/MEM buffer for branch control logic in this stage… Value on Read data port of data memory is stored in MEM/WB buffer, awaiting decision in last stage.. ALU result is taken from EX/MEM buffer and passed to Address port of data memory. ALU result also stored in MEM/WB buffer for possible use in last stage… Read register #2 contents taken from EX/MEM buffer and passed to Write data port of data memory.

WB for Load But the Write register port is now seeing the register number from a different, later instruction. Since load instruction, value from data memory is selected and passed back to register file.

Corrected Datapath for Load So we fix the problem by passing the Write register # from the load instruction through the various inter-stage buffers… …and then back, just in time.

EX for Store Almost the same as for LW… Read register #2 is passed forward to EX/MEM buffer, for use in later stage… for SW this will be needed.

MEM for Store Zero line taken from EX/MEM buffer for branch control logic in this stage… Value on Read data port of data memory is stored in MEM/WB buffer, awaiting decision in last stage.. ALU result is taken from EX/MEM buffer and passed to Address port of data memory. ALU result also stored in MEM/WB buffer for possible use in last stage… Read register #2 contents taken from EX/MEM buffer and passed to Write data port of data memory.

WB for Store Since SW instruction, neither value will be written to the register file… doesn't really matter which value we send back…

Questions to Ponder Can you repeat this analysis for other sorts of instructions, identifying in each stage what's relevant and what's not? How much storage space does each interstage buffer need? Why? Do the interstage buffers have any effect on the overall time required for an instruction to migrate through the pipeline? Why?