Supplementary notes for pipelining LW ____,____ SUB ____,____,____ BEQ ____,____,____ ; assume that, condition for branch is not satisfied OR ____,____,____.

Slides:



Advertisements
Similar presentations
Pipeline Exceptions & ControlCSCE430/830 Pipelining in MIPS MIPS architecture was designed to be pipelined –Simple instruction format (makes IF, ID easy)
Advertisements

Pipeline Example: cycle 1 lw R10,9(R1) sub R11,R2, R3 and R12,R4, R5 or R13,R6, R7.
Review: MIPS Pipeline Data and Control Paths
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
The Processor: Datapath & Control
©UCB CS 162 Computer Architecture Lecture 3: Pipelining Contd. Instructor: L.N. Bhuyan
1 Stalling  The easiest solution is to stall the pipeline  We could delay the AND instruction by introducing a one-cycle delay into the pipeline, sometimes.
CMPUT Computer Organization and Architecture II1 CMPUT229 - Fall 2003 TopicE: Building a Data Path and a Control Path for a Microprocessor José Nelson.
1 Stalls and flushes  So far, we have discussed data hazards that can occur in pipelined CPUs if some instructions depend upon others that are still executing.
CMPE 421 Advanced Computer Architecture Supplementary material for Pipelining PART1.
Pipeline Data Hazards: Detection and Circumvention Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly.
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
CS2100 Tutorial #9 The Processor: Datapath and Control (Aaron Tan)
CSE431 L07 Overcoming Data Hazards.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 07: Overcoming Data Hazards Mary Jane Irwin (
CSIE30300 Computer Architecture Unit 05: Overcoming Data Hazards Hsin-Chou Chi [Adapted from material by and
PC Instruction Memory Address Instr. [31-0] 4 Fig 4.6 p 309 Instruction Fetch.
CDA 3101 Summer 2003 Introduction to Computer Organization Pipeline Control And Pipeline Hazards 17 July 2003.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 2.
MIPS processor continued
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
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.
Spr 2016, Mar 9... ELEC / Lecture 7 1 ELEC / Computer Architecture and Design Spring 2016 Pipeline Control and Performance.
CSE 340 Computer Architecture Spring 2016 Overcoming Data Hazards.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Single-cycle CPU Control
Access the Instruction from Memory
MIPS Microarchitecture Single-Cycle Processor Control
Single Cycle CPU - Control
Single Cycle CPU.
Pipeline Timing Issues
Stalling delays the entire pipeline
Note how everything goes left to right, except …
CDA 3101 Spring 2016 Introduction to Computer Organization
Computer Architecture
Multi-Cycle CPU.
Test 2 review Lectures 5-10.
Single Cycle Processor
Multi-Cycle CPU.
ECS 154B Computer Architecture II Spring 2009
Discussion Session Week 10
MIPS processor continued
Test 2 review Lectures 5-10.
Forwarding Now, we’ll introduce some problems that data hazards can cause for our pipelined processor, and show how to handle them with forwarding.
Review: MIPS Pipeline Data and Control Paths
Morgan Kaufmann Publishers The Processor
SOLUTIONS CHAPTER 4.
CS/COE0447 Computer Organization & Assembly Language
Single-cycle datapath, slightly rearranged
Current Design.
A pipeline diagram Clock cycle lw $t0, 4($sp) IF ID
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Systems Architecture II
CSE378 Midterm Review Moore’s Law -- What are the two versions?
The Processor Lecture 3.3: Single-cycle Implementation
The Processor Lecture 3.2: Building a Datapath with Control
Control Unit (single cycle implementation)
The Processor.
MIPS processor continued
Introduction to Computer Organization and Architecture
CS/COE0447 Computer Organization & Assembly Language
Control Unit (single cycle implementation)
Pipelining - 1.
Stalls and flushes Last time, we discussed data hazards that can occur in pipelined CPUs if some instructions depend upon others that are still executing.
The Processor: Datapath & Control.
©2003 Craig Zilles (derived from slides by Howard Huang)
Pipelined datapath and control
ELEC / Computer Architecture and Design Spring 2015 Pipeline Control and Performance (Chapter 6) Vishwani D. Agrawal James J. Danaher.
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Supplementary notes for pipelining LW ____,____ SUB ____,____,____ BEQ ____,____,____ ; assume that, condition for branch is not satisfied OR ____,____,____ ADD____,____,____ Prepared by: Cem Ergün

IF/ID Clock Cycle 1 LWbefore REGISTERS READ REGISTER 1 / READ REGISTER 2 WRITE REGISTER WRITE DATA READ DATA 1 READ DATA 2 DATA MEMORY ADDRESS WRITE DATA READ DATA ALU ZERO RESULT ADD EX M WB RegWrite MemToReg CONTROL Branch MemRead MemWrite RegDst ALUOp ALUSrc MUX 0 1 ALU CONTROL Sign Extend MUX 0 1 I[15-11] I[20-16] I[15-0] M WB MUX 1 0 RegWrite MemToReg << 2 MemReadMemWrite Branch ID/EX EX/MEMMEM/WB INSTRUCTION MEMORY ADDRESSINSTRUCTION ADD PC 4 MUX 0 1 PCSrc

Clock Cycle 2 SUBLWbefore DATA MEMORY ADDRESS WRITE DATA READ DATA ALU ZERO RESULT ADD MUX 0 1 ALU CONTROL MUX 0 1 M WB MUX 1 0 MemToReg << 2 MemReadMemWrite Branch EX/MEMMEM/WB INSTRUCTION MEMORY ADDRESSINSTRUCTION ADD PC 4 MUX 0 1 REGISTERS READ REGISTER 1 / READ REGISTER 2 WRITE REGISTER WRITE DATA READ DATA 1 READ DATA 2 EX M WB RegWrite MemToReg CONTROL Branch MemRead MemWrite RegDst ALUOp ALUSrc Sign Extend I[15-11] I[20-16] I[15-0] RegWrite IF/ID ID/EX PCSrc

Clock Cycle 3 BEQSUBLWbefore DATA MEMORY ADDRESS WRITE DATA READ DATA WB MUX 1 0 MemToReg MemReadMemWrite Branch MEM/WB INSTRUCTION MEMORY ADDRESSINSTRUCTION ADD PC 4 MUX 0 1 REGISTERS READ REGISTER 1 / READ REGISTER 2 WRITE REGISTER WRITE DATA READ DATA 1 READ DATA 2 RegWrite MemToReg CONTROL Branch MemRead MemWrite RegDst ALUOp ALUSrc Sign Extend I[15-11] I[20-16] I[15-0] RegWrite IF/ID ALU ZERO RESULT ADD EX M WB MUX 0 1 ALU CONTROL MUX 0 1 M WB << 2 ID/EX EX/MEM ALUOp RegDst ALUSrc PCSrc

Clock Cycle 4 ORBEQSUBLWbefore MUX 1 0 MemToReg INSTRUCTION MEMORY ADDRESSINSTRUCTION ADD PC 4 MUX 0 1 REGISTERS READ REGISTER 1 / READ REGISTER 2 WRITE REGISTER WRITE DATA READ DATA 1 READ DATA 2 RegWrite MemToReg CONTROL Branch MemRead MemWrite RegDst ALUOp ALUSrc I[15-11] I[20-16] RegWrite IF/ID ALU ZERO RESULT ADD EX M WB MUX 0 1 ALU CONTROL MUX 0 1 << 2 ID/EX ALUOp RegDst ALUSrc Sign Extend I[15-0] I[5-0] DATA MEMORY ADDRESS WRITE DATA READ DATA M WB MemReadMemWrite Branch EX/MEM Zero PCSrc

Clock Cycle 5 ADDORBEQSUBLW MemToReg INSTRUCTION MEMORY ADDRESSINSTRUCTION ADD PC 4 MUX 0 1 ALU ZERO RESULT MUX 0 1 ALU CONTROL MUX 0 1 ALUOp RegDst ALUSrc I[5-0] DATA MEMORY ADDRESS WRITE DATA READ DATA M WB MemReadMemWrite Branch EX/MEM Zero PCSrc ADD << 2 MUX 1 0 REGISTERS READ REGISTER 1 / READ REGISTER 2 WRITE REGISTER WRITE DATA READ DATA 1 READ DATA 2 RegWrite MemToReg CONTROL Branch MemRead MemWrite RegDst ALUOp ALUSrc Sign Extend I[15-11] I[20-16] I[15-0] RegWrite IF/ID EX M WB ID/EX

Clock Cycle 6 after ADDORBEQSUB MemToReg INSTRUCTION MEMORY ADDRESSINSTRUCTION ADD PC 4 MUX 0 1 DATA MEMORY ADDRESS WRITE DATA READ DATA WB MemReadMemWrite Branch Zero PCSrc REGISTERS READ REGISTER 1 / READ REGISTER 2 WRITE REGISTER WRITE DATA READ DATA 1 READ DATA 2 RegWrite MemToReg CONTROL Branch MemRead MemWrite RegDst ALUOp ALUSrc Sign Extend I[15-11] I[20-16] I[15-0] RegWrite IF/ID MUX 1 0 ALU ZERO RESULT ADD EX M WB MUX 0 1 ALU CONTROL MUX 0 1 << 2 ID/EX ALUOp RegDst ALUSrc I[5-0] M WB EX/MEM

Clock Cycle 7 after ADDORBEQ MemToReg INSTRUCTION MEMORY ADDRESSINSTRUCTION ADD PC 4 MUX 0 1 DATA MEMORY ADDRESS WRITE DATA READ DATA WB MemReadMemWrite Branch Zero REGISTERS READ REGISTER 1 / READ REGISTER 2 WRITE REGISTER WRITE DATA READ DATA 1 READ DATA 2 RegWrite MemToReg CONTROL Branch MemRead MemWrite RegDst ALUOp ALUSrc Sign Extend I[15-11] I[20-16] I[15-0] RegWrite IF/ID MUX 1 0 ALU ZERO RESULT ADD EX M WB MUX 0 1 ALU CONTROL MUX 0 1 << 2 ID/EX ALUOp RegDst ALUSrc I[5-0] M WB EX/MEM

Clock Cycle 8 after ADDOR MemToReg INSTRUCTION MEMORY ADDRESSINSTRUCTION ADD PC 4 MUX 0 1 DATA MEMORY ADDRESS WRITE DATA READ DATA WB MemReadMemWrite Branch Zero RegWrite MemToReg CONTROL Branch MemRead MemWrite RegDst ALUOp ALUSrc Sign Extend I[15-11] I[20-16] I[15-0] RegWrite IF/ID MUX 1 0 ALU ZERO RESULT ADD EX M WB MUX 0 1 ALU CONTROL MUX 0 1 << 2 ID/EX ALUOp RegDst ALUSrc I[5-0] M WB EX/MEM MUX 1 0 REGISTERS READ REGISTER 1 / READ REGISTER 2 WRITE REGISTER WRITE DATA READ DATA 1 READ DATA 2

Clock Cycle 9 after ADD MemToReg INSTRUCTION MEMORY ADDRESSINSTRUCTION ADD PC 4 MUX 0 1 DATA MEMORY ADDRESS WRITE DATA READ DATA WB MemReadMemWrite Branch Zero RegWrite MemToReg CONTROL Branch MemRead MemWrite RegDst ALUOp ALUSrc Sign Extend I[15-11] I[20-16] I[15-0] RegWrite IF/ID MUX 1 0 ALU ZERO RESULT ADD EX M WB MUX 0 1 ALU CONTROL MUX 0 1 << 2 ID/EX ALUOp RegDst ALUSrc I[5-0] M WB EX/MEM MUX 1 0 REGISTERS READ REGISTER 1 / READ REGISTER 2 WRITE REGISTER WRITE DATA READ DATA 1 READ DATA 2