Lecture 15: Pipelined Datapath Soon Tee Teoh CS 147.

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

Instructor: Yuzhuang Hu Final Exam! The final exam is scheduled on 7 th, August, Friday 7:00 pm – 10:00 pm.
9-6 The Control Word Fig The selection variables for the datapath control the microoperations executed within datapath for any given clock pulse.
ELEN 468 Advanced Logic Design
Pipelining Hwanmo Sung CS147 Presentation Professor Sin-Min Lee.
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.
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
Pipelined Datapath and Control (Lecture #13) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer.
Instructor: Yuzhuang Hu The Shifter 3 clock cycles will be needed if using a bidirectional shift register with parallel load.  A clock.
1 COMP541 Sequencing – III (Sequencing a Computer) Montek Singh April 9, 2007.
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
Computer ArchitectureFall 2007 © October 3rd, 2007 Majd F. Sakr CS-447– Computer Architecture.
DLX Instruction Format
1 Chapter 5: Datapath and Control (Part 3) CS 447 Jason Bakos.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon., Sep 9, 2002 Topic: Pipelining Basics.
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Appendix A Pipelining: Basic and Intermediate Concepts
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 10 – Computer.
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Instructor: Yuzhuang Hu Assembly Lines An assembly line is a manufacture process in which parts are added into a product in a sequential.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
CSC 4250 Computer Architectures September 15, 2006 Appendix A. Pipelining.
Computer Organization CS224 Fall 2012 Lesson 26. Summary of Control Signals addsuborilwswbeqj RegDst ALUSrc MemtoReg RegWrite MemWrite Branch Jump ExtOp.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 9 – Computer Design Basics Part 2 – A Simple.
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
Fall EE 333 Lillevik 333f06-l8 University of Portland School of Engineering Computer Organization Lecture 8 Detailed MIPS datapath Timing overview.
A Simple Computer Architecture Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Instructor: Yuzhuang Hu Midterm The midterm is schedule on June 17 th, 17:30-19:30 pm. It covers the following:  VHDL Programming. 
Multiple-Cycle Hardwired Control Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
EE204 L12-Single Cycle DP PerformanceHina Anwar Khan EE204 Computer Architecture Single Cycle Data path Performance.
CoE3DJ4 Digital Systems Design
1 Pipelining Part I CS What is Pipelining? Like an Automobile Assembly Line for Instructions –Each step does a little job of processing the instruction.
W.S Computer System Design Lecture 4 Wannarat Suntiamorntut.
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
By Wannarat Computer System Design Lecture 4 Wannarat Suntiamorntut.
Lecture 10: Computer Design Basics: The ALU and the Shifter Soon Tee Teoh CS 147.
1. Convert the RISCEE 1 Architecture into a pipeline Architecture (like Figure 6.30) (showing the number data and control bits). 2. Build the control line.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Computer Architecture: Intro Lecture 7- Enhancing performance via pipelining; ASMs as an alternative SM design tool J. Schmalzel S. Mandayam.
Pipelining: Implementation CPSC 252 Computer Organization Ellen Walker, Hiram College.
Advanced Computer Architecture CS 704 Advanced Computer Architecture Lecture 10 Computer Hardware Design (Pipeline Datapath and Control Design) Prof. Dr.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Problem with Single Cycle Processor Design
Overview Part 1 – Datapaths Part 2 – A Simple Computer
Chap 7. Register Transfers and Datapaths
Performance of Single-cycle Design
ELEN 468 Advanced Logic Design
Morgan Kaufmann Publishers The Processor
Decode and Operand Read
CSCI206 - Computer Organization & Programming
Computer Architecture
A Multiple Clock Cycle Instruction Implementation
Systems Architecture II
Figure 8.1 Architecture of a Simple Computer System.
Instruction encoding We’ve already seen some important aspects of processor design. A datapath contains an ALU, registers and memory. Programmers and compilers.
The Processor Lecture 3.2: Building a Datapath with Control
An Introduction to pipelining
Unit 12 CPU Design & Programming
Branch instructions We’ll implement branch instructions for the eight different conditions shown here. Bits 11-9 of the opcode field will indicate the.
8-6 The Control Word The selection variables for the datapath control the microoperations executed within datapath for any given clock pulse Fig
Instruction encoding We’ve already seen some important aspects of processor design. A datapath contains an ALU, registers and memory. Programmers and compilers.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Question 0: Register Files
Pipelining Appendix A and Chapter 3.
Review: The whole processor
A relevant question Assuming you’ve got: One washer (takes 30 minutes)
Processor: Datapath and Control
Presentation transcript:

Lecture 15: Pipelined Datapath Soon Tee Teoh CS 147

Control and Datapath (Figure 9-15, page 471) Branch Control VCNZVCNZ PC Extend Address Instruction Memory Instruction Instruction Decoder Zero fill 1 0 MUX B D Register File A B Function Unit F Data in Address Data Memory Data Out 0 1 MUX D MB MD MW FS V C N Z Constant in D B A M F M R M P J B A A A B S D W W L B C P J B L B C RW DA AA BA

Instructions in this Architecture Instruction Format Description Add RD, RA, RB R[DR] R[SA] + R[SB] OR RD, RA, RB R[DR] R[SA] v R[SB] Shift Right RD, RB R[DR] sr R[SB] Load Immediate RD, OP R[DR] zf OP Load RD, RA R[DR] M[SA] Store RD, RA M[SA] R[SB] Branch on Zero RA, AD if (R[SA]==0) PC PC + se AD Jump RA PC R[SA] zf means zero-fill se means sign-extend sr means shift right

Timing Assumptions Branch Control: 1ns PC Read: 1ns PC Write: 2ns Instruction Memory Read: 3ns Instruction Decoder: 1ns Extend: 1ns Zero Fill: 1ns Register File Read: 1ns Register File Write: 2ns 2-to-1 MUX: 1ns Function Unit: 6ns Memory Read: 3ns Memory Write: 3ns Note: “Register File Read” refers to the propagation delay time of a register. “Register File Write” refers to the set-up time of a register.

Delay for each component in Control and Datapath Branch Control VCNZVCNZ PC Extend Address Instruction Memory Instruction Instruction Decoder Zero fill 1 0 MUX B D Register File A B Function Unit F Data in Address Data Memory Data Out 0 1 MUX D MB MD MW FS V C N Z Constant in D B A M F M R M P J B A A A B S D W W L B C P J B L B C RW DA AA BA 3ns 1ns 6ns 1ns 2ns 1ns 3ns 2ns

Time taken in Longest Path Branch Control VCNZVCNZ PC Extend Address Instruction Memory Instruction Instruction Decoder Zero fill 1 0 MUX B D Register File A B Function Unit F Data in Address Data Memory Data Out 0 1 MUX D MB MD MW FS V C N Z Constant in D B A M F M R M P J B A A A B S D W W L B C P J B L B C RW DA AA BA * * 3ns 1ns 6ns 1ns 2ns Total time for ADD instruction = = 16ns 1ns 2ns 1ns 3ns

Pipelining Concept Separate laundry process into 3 steps wash/rinse/dry. Each step uses a different machine. Suppose you have many loads. While first load is drying, second load is rinsing, and first load is washing. Simultaneously utilizing all resources. Like Henry Ford’s assembly line

Pipelined Computer Architecture Separate the process into separate parts For our example, we separate into 4 parts: –1. Instruction Fetch –2. Decode, Operand Fetch –3. Execute –4. Write Back Insert new registers between each stage to hold some control signals

Pipelined Computer (Figure 11-4 pg 550, ignore branch control for now) PC Address Instruction Memory Instruction Instruction Decoder Zero fill 1 0 MUX B Register File A B Function Unit F Address Data Memory Data Out 0 1 MUX D MB MD MW FS B A M A A B AA BA IR Data In Address Data Memory D Register File FS MW DA MD RW RW DA Write Read/ Write Read IF DOF EX WB Stages: Instruction Fetch, Decode/Operand Fetch, Execute, Write Back registers registers/ memory

Timing in Pipelined Computer (assume register read is 1ns and register write is 1ns) PC Address Instruction Memory Instruction Instruction Decoder Zero fill 1 0 MUX B Register File A B Function Unit F Address Data Memory Data Out 0 1 MUX D MB MD MW FS B A M A A B AA BA IR Data In Address Data Memory D Register File FS MW DA MD RW RW DA Write Read/ Write Read IF DOF EX WB Stages: Instruction Fetch, Decode/Operand Fetch, Execute, Write Back registers registers/ memory 5ns 8ns 4ns

Clock cycle time In non-pipelined computer, clock cycle needs to be at least 16ns. Clock frequency = 1/16ns = 62.5 MHz In pipelined computer, clock cycle needs to be at least 8ns, the time for the slowest stage. Clock frequency = 1/8ns = 125 MHz If we need to execute 7 instructions using the non-pipelined computer, we need 7 x 16 = 112 ns. How much time do we need using the pipelined computer?

Pipelined Computer timing IF DOF EX WB 8ns We need 80ns. In general, # cycles needed = # instructions + # stages - 1 Instruction 2

Pipelined Computer timing IF DOF EX WB Filling: Not all stages active All stages active Emptying: Not all stages active 8ns