CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013.

Slides:



Advertisements
Similar presentations
1 Datapath and Control (Multicycle datapath) CDA 3101 Discussion Section 11.
Advertisements

CIS 314 Fall 2005 MIPS Datapath (Single Cycle and Multi-Cycle)
Microprocessor Design Multi-cycle Datapath Nia S. Bradley Vijay.
The Processor: Datapath & Control
The Processor Data Path & Control Chapter 5 Part 2 - Multi-Clock Cycle Design N. Guydosh 2/29/04.
Chapter 5 The Processor: Datapath and Control Basic MIPS Architecture Homework 2 due October 28 th. Project Designs due October 28 th. Project Reports.
CSE378 Multicycle impl,.1 Drawbacks of single cycle implementation All instructions take the same time although –some instructions are longer than others;
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
CSE431 L05 Basic MIPS Architecture.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 05: Basic MIPS Architecture Review Mary Jane Irwin.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Designing a Simple Datapath Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Revised 9/12/2013.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Chapter 4 CSF 2009 The processor: Building the datapath.
Processor: Datapath and Control
Datapath and Control: MultiCycle Implementation. Performance of Single Cycle Machines °Assume following operation times: Memory units : 200 ps ALU and.
1 COMP541 Multicycle MIPS Montek Singh Apr 4, 2012.
COMP541 Multicycle MIPS Montek Singh Apr 8, 2015.
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
ECE 445 – Computer Organization
CDA 3101 Fall 2013 Introduction to Computer Organization
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
COMP541 Multicycle MIPS Montek Singh Mar 25, 2010.
Multicycle Implementation
LECTURE 6 Multi-Cycle Datapath and Control. SINGLE-CYCLE IMPLEMENTATION As we’ve seen, single-cycle implementation, although easy to implement, could.
ECE-C355 Computer Structures Winter 2008 The MIPS Datapath Slides have been adapted from Prof. Mary Jane Irwin ( )
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.
RegDst 1: RegFile destination No. for the WR Reg. comes from rd field. 0: RegFile destination No. for the WR Reg. comes from rt field.
CDA 3101 Spring 2016 Introduction to Computer Organization Microprogramming and Exceptions 08 March 2016.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Design a MIPS Processor (II)
Multi-Cycle Datapath and Control
IT 251 Computer Organization and Architecture
Introduction CPU performance factors
/ Computer Architecture and Design
Systems Architecture I
Multi-Cycle CPU.
Morgan Kaufmann Publishers The Processor
Single Cycle Processor
D.4 Finite State Diagram for the Multi-cycle processor
Multi-Cycle CPU.
CS/COE0447 Computer Organization & Assembly Language
MIPS processor continued
CSCI206 - Computer Organization & Programming
CSCE 212 Chapter 5 The Processor: Datapath and Control
CSCI206 - Computer Organization & Programming
Datapath & Control MIPS
Drawbacks of single cycle implementation
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
Systems Architecture I
The Processor Lecture 3.2: Building a Datapath with Control
Vishwani D. Agrawal James J. Danaher Professor
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Control Unit for Multiple Cycle Implementation
Systems Architecture I
Control Unit for Multiple Cycle Implementation
FloorPlan for Multicycle MIPS
The Processor: Datapath & Control.
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013

Review Construction of the Datapath –Determine instruction types R-format Conditional Branch Unconditional Branch Load/store –Develop datapath modules (RF, ALU, Memory, SignExt) –Connect modules to form composite datapath Single-Cycle Datapath –All instructions take one cycle (CPI = 1) –Cycle time dictated by circuit settling time –All operations take time of slowest operation (load) 

Overview – Multicycle Datapath Each instruction has multiple stages Each stage takes one cycle 1.Instruction fetch 2.Instruction decode / Data fetch 3.ALU ops / R-format execution 4.R-format completion 5.Memory access completion Each stage can re-use hardware from previous stage More efficient use of hardware and time >> New Hardware required to buffer stage output >> New Muxes required for hardware re-use >> Expanded Control for new hardware All instructions use these

Recall: Simple Datapath PC Instruction memory +4 rt rs rd Registers ALU Data memory imm Data Address Controller Opcode, funct Address Instruction ° Datapath is based on register transfers required to execute instructions ° Control causes the right transfers to happen

Recall: R-format Datapath Format: opcode r3, r1, r2 Result Zero ALU Read Data 1 Read Data 2 Read Reg 1 Read Reg 2 Write Register Write Data Register Write ALU op Register File 3 Instruction

Recall: Load/Store Datapath FetchDecodeExecute

Recall: Branch Datapath FetchDecodeExecute

Hi-Level View: Multicycle DP Instr. Fetch Instr. Decode/Data Fetch Execute

Hi-Level View: Multicycle DP How do we make multicycle datapath (DP)??? 1.Replace 3 ALUs from the single-cycle DP with one ALU 2.Add one multiplexer to select ALU input 3.Add one control line for the ALU input multiplexer New inputs:Constant = 4 [PC + 4] Sign-ext., shifted offset [BTA calc.] 4.Add temporary (buffer) registers: (storage betw.cycles) MDR: Memory Data Register IR: Instruction Register A,B:ALU operand registers ALUout:ALU output register

Multicycle DP: The Full Monty

Multicycle DP: 1-bit Ctl. Signals

Multicycle DP: 2-bit Ctl. Signals

Making Sense of Multicycle DP Step 1: Decompose the MC/DP execution sequence into cycles Step 2: Examine which cycles apply to which instructions One-Cycle Steps R-fmt lw sw beq j 1.Instruction Fetch 2.Instruction Decode / Data Fetch 3.ALU ops / R-format Execution 4.R-format Completion 5.Memory Access Completion

Multicycle DP: R-format Step 1: Fetch instr. // Store in IR // Compute PC + 4 Step 2: Decode instruction: opcode, rd, rs, rt, funct fields Data fetch: Apply rs, rt to Register File Data Read into A,B buffer registers (ALUin) Step 3: ALU operation ( ALUsrcA, ALUsrcB, ALUop ) ALU output goes into ALUout register Step 4: ALUout register contents written to Register File write input Register number in rd written (Assert: RegWrite,RegDst ) CPI for R-format = 4 cycles

Multicycle DP: Store Word ( sw ) Step 1: Fetch instr. // Store in IR // Compute PC + 4 Step 2: Decode instruction: opcode, rs, rt, offset fields Data fetch: Apply rt to Register File => Base address Data Read into A buffer register (Base) SignExt,Shift offset field into B buffer register Step 3: ALU operation ( ALUsrcB, ALUop ) => Base + Offset ALU output goes into ALUout register Step 4: ALUout register contents applied as Memory Address Assert: MemWrite [ ALUout => RegFile] CPI for Store = 4 cycles

Multicycle DP: Load Word ( lw ) Step 1: Fetch instr. // Store in IR // Compute PC + 4 Step 2: Decode instruction: opcode, rd, rt, offset fields Data fetch: Apply rt to Register File => Base address Data Read into A buffer register (Base) SignExt,Shift offset field into B buffer register Step 3: ALU operation ( ALUsrcB, ALUop ) => Base + Offset ALU output goes into ALUout register Step 4: ALUout register contents applied as Memory Address Assert: MemRead Step 5: Memory Data Out routed to Register File write input Register number from rd written to (Assert: CPI for Load = 5 cycles

Multicycle DP: Cond. Branch Step 1: Fetch instr. // Store in IR // Compute PC + 4 Step 2: Decode instruction: opcode, rs, rt, offset fields Data fetch: Apply rs, rt to Register File BTA calc:SignExt,Shift offset field into B buffer register ALU compose PC, offset => BTA Step 3: ALU operation ( ALUsrcA, ALUsrcB, ALUop ) = compare ALU output present at Zero register causes Control to select BTA or PC+4 CPI for Conditional Branch = 3 cycles

Multicycle DP: Jump Step 1: Fetch instr. // Store in IR // Compute PC + 4 Step 2: Decode instruction: opcode, address fields JTA calc:SignExt,Shift offset field [Bits 27-0] Concatenate with PC [Bits 31-28] => JTA Step 3: PC replaced by the Jump Target Address (JTA) PCsource = 10, PCWrite asserted CPI for Jump = 3 cycles

Conclusions MIPS ISA: Three instruction formats (R,I,J) One cycle per stage, Different stages per format One-Cycle Steps R-fmt lw sw beq j 1.Instruction Fetch 2.Instruction Decode / Data Fetch 3.ALU ops / R-format Execution 4.R-format Completion 5.Memory Access Completion Challenge: More involved control design

Almost Here: Pipelining