Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

1 Datapath and Control (Multicycle datapath) CDA 3101 Discussion Section 11.
CIS 314 Fall 2005 MIPS Datapath (Single Cycle and Multi-Cycle)
Multicycle Datapath & Control Andreas Klappenecker CPSC321 Computer Architecture.
1 Chapter Five The Processor: Datapath and Control.
CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
VHDL Development for ELEC7770 VLSI Project Chris Erickson Graduate Student Department of Electrical and Computer Engineering Auburn University, Auburn,
CSCE 212 Chapter 5 The Processor: Datapath and Control Instructor: Jason D. Bakos.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
10/18/2005Comp 120 Fall October Questions? Instruction Execution.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
331 W10.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 10 Building a Multi-Cycle Datapath [Adapted from Dave Patterson’s.
EECC550 - Shaaban #1 Selected Chapter 5 For More Practice Exercises Winter The MIPS jump and link instruction, jal is used to support procedure.
CPU Architecture Why not single cycle? Why not single cycle? Hardware complexity Hardware complexity Why not pipelined? Why not pipelined? Time constraints.
1 The Processor: Datapath and Control We will design a microprocessor that includes a subset of the MIPS instruction set: –Memory access: load/store word.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
Processor I CPSC 321 Andreas Klappenecker. Midterm 1 Thursday, October 7, during the regular class time Covers all material up to that point History MIPS.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
1  1998 Morgan Kaufmann Publishers CH5 Datapath review.
The Multicycle Processor CPSC 321 Andreas Klappenecker.
CSCE 212 Chapter 5 The Processor: Datapath and Control Instructor: Jason D. Bakos.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Processor: Datapath and Control
Fall EE 333 Lillevik 333f06-l8 University of Portland School of Engineering Computer Organization Lecture 8 Detailed MIPS datapath Timing overview.
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
1 COMP541 Multicycle MIPS Montek Singh Apr 4, 2012.
Chapter 5 Processor Design. Spring 2005 ELEC 5200/6200 From Patterson/Hennessey Slides We're ready to look at an implementation of the MIPS Simplified.
CPE232 Basic MIPS Architecture1 Computer Organization Multi-cycle Approach Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides
1 CS/COE0447 Computer Organization & Assembly Language Multi-Cycle Execution.
CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013.
COMP541 Multicycle MIPS Montek Singh Mar 25, 2010.
1  2004 Morgan Kaufmann Publishers Chapter Five.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
Multicycle datapath.
MIPS Processor.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3 In-Class Exercises.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Multi-Cycle Datapath and Control
CS161 – Design and Architecture of Computer Systems
Introduction CPU performance factors
/ Computer Architecture and Design
ELEN 468 Advanced Logic Design
Five Execution Steps Instruction Fetch
MIPS Instructions.
CDA 3101 Spring 2016 Introduction to Computer Organization
CS/COE0447 Computer Organization & Assembly Language
Multiple Cycle Implementation of MIPS-Lite CPU
CS/COE0447 Computer Organization & Assembly Language
CSCE 212 Chapter 5 The Processor: Datapath and Control
Multicycle Approach Break up the instructions into steps
Datapath & Control MIPS
Multicycle Approach We will be reusing functional units
Systems Architecture I
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Multicycle Design.
Basic MIPS Implementation
CS/COE0447 Computer Organization & Assembly Language
Review Fig 4.15 page 320 / Fig page 322
Chapter Four The Processor: Datapath and Control
Drawbacks of single cycle implementation
Drawbacks of single cycle implementation
MIPS Processor.
Processor: Datapath and Control
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)

Fall 2007 Basic MIPS Implementation We’ll focus on a limited subset of the MIPS instructions –Memory reference: LW and SW –Arithmetic-logical: add, sub, and, or, slt –Branch: beq Hardware components: PC, registers, memory units, ALU, multiplexors, decoders

Fall 2007 Single Cycle v. Multi-Cycle Single cycle: one (long) clock cycle to process each instruction –not realistic but useful for understanding the implementation. Multi-cycle: divide the processing of each instruction into 5 stages and allocate one clock cycle per stage

Fall 2007 First 2 steps of all inst are identical 1)Send the PC to inst memory to fetch the inst 2) Read one (for LW, SW) or two registers, The next action depends on the instruction class.

Fall 2007 Major Functional Units What is missing? –MUX to select input data lines. –Control lines for the major functional units.

Fall 2007 Functional Units and Control Lines

Fall 2007 Fetch instruction and increment PC PC is a register that holds the current inst address

Fall 2007 Memory Instruction & R-type instructions * LW $t1, offset($t2), Need register file, Memory, and ALU * SW is similar

Fall 2007 Computing branch condition and target address

Fall 2007 Single cycle and control unit

Fall 2007 Single cycle plus jump

Fall Example of execution x x xxxxxxx XXXX Instr: add $s0, $a1, $t7 Field: op rs rt rd shamt funct M. Code: PC: 0 x

Fall 2007 Suggested Exercise Repeat the example of execution for some of these: –lw $t3, 16($t2) –sw $t3, 16($t2) –addi $t1, $s2, $v0 –beq $t3, $s0, gothere –jmp gothere –jr $ra (do them with an obsessive, detail-oriented friend)

Fall 2007 Multicycle Datapath Break the operations on an instruction into a series of 5 steps. One clock cycle per step –Advantage: a functional unit can be used more than once per instruction. Instruction Fetch (IF) Instruction Decode (ID) Execute (EX) Memory Access (MEM) Write Back (WB)

Fall 2007 Multicycle Datapath HW changes: –Single memory unit for both instructions and data –Single ALU for all arithmetic operations –Extra registers needed to hold values between each steps Instruction Register (IR) holds the instruction Memory Data Register (MDR) holds the data coming from memory A, B hold operand data coming from the registers ALUOut holds output coming out of the ALU

Fall 2007 Extra hardware for multicycle datapath

Fall 2007 Multicycle datapath

Fall 2007 Complete multicycle datapath

Fall 2007 Multicycle Datapath: the 5 steps Step NameR-TypeMemory ReferenceBranchesJumps Instruction Fetch IR <= Memory[PC] PC <= PC + 4 Instruction Decode Register Fetch A <= Reg[IR[25:21]] B <= Reg[IR[20:16]] ALUOut <= PC + (sign-extend(IR[15:0]) << 2) Execution Address Computation Branch/Jump Completion ALUOut <= A op B ALUOut <= A +……………. sign-extend(IR[15:0]) If (A==B) PC <= ALUOut PC <= ………… {PC[31:28],... …IR[25:0], 00} Memory Access R-type completion Reg[IR[15:11]] <= ALUOut Load: MDR <= Memory[ALUOut ] Store: Memory[ALUOut ] <= B Memory Read Completion Load: Reg[IR[20:16]] <= MDR