CIS 314 Fall 2005 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.
Multicycle Datapath & Control Andreas Klappenecker CPSC321 Computer Architecture.
ELEN 468 Advanced Logic Design
CMPT 334 Computer Organization
Datorteknik DatapathControl bild 1 Designing a Single Cycle Datapath & Datapath Control.
PCPC addr instr INSTR MEM R1 R2 WR W Data R Data 1 R Data 2 ALU DATA MEM ALU CTRL rs rt op +4 shift 2 zero BRANCH CTRL muxmux sign extend immed 1632 ADDADD.
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.
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
EECC550 - Shaaban #1 Selected Chapter 5 For More Practice Exercises Winter The MIPS jump and link instruction, jal is used to support procedure.
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.
The Multicycle Processor CPSC 321 Andreas Klappenecker.
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.
CDA 3101 Fall 2013 Introduction to Computer Organization
CDA 3101 Fall 2013 Introduction to Computer Organization Multicycle Datapath 9 October 2013.
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
COMP541 Multicycle MIPS Montek Singh Mar 25, 2010.
Introduction to Computer Organization Pipelining.
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.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Design a MIPS Processor (II)
Single-cycle CPU Control
Morgan Kaufmann Publishers
Introduction CPU performance factors
/ Computer Architecture and Design
ELEN 468 Advanced Logic Design
CDA 3101 Spring 2016 Introduction to Computer Organization
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
Multiple Cycle Implementation of MIPS-Lite CPU
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
CSCE 212 Chapter 5 The Processor: Datapath and Control
Single-Cycle CPU DataPath.
Design of the Control Unit for One-cycle Instruction Execution
Multicycle Approach Break up the instructions into steps
A Multiple Clock Cycle Instruction Implementation
MIPS Processor.
Datapath & Control MIPS
Morgan Kaufmann Publishers The Processor
Vishwani D. Agrawal James J. Danaher Professor
Guest Lecturer TA: Shreyas Chand
Multicycle Approach We will be reusing functional units
Datapath: Instruction Store/Fetch & PC Increment
Systems Architecture I
MIPS Microarchitecture Multicycle Processor
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Simple Implementation
Access the Instruction from Memory
COMP541 Datapaths I Montek Singh Mar 18, 2010.
Basic MIPS Implementation
Review Fig 4.15 page 320 / Fig page 322
The Processor: Datapath & Control.
COMS 361 Computer Organization
MIPS Processor.
Processor: Datapath and Control
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

CIS 314 Fall 2005 MIPS Datapath (Single Cycle and Multi-Cycle)

CIS 314 Fall 2005 Basic MIPS Implementation For 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

CIS 314 Fall 2005 Single Cycle v. Multi-Cycle Single cycle is not realistic - just for understanding of the implementation. Single cycle: one (long) clock cycle to process each instruction Multi-cycle: divide the processing of each instruction into 5 stages and allocate one clock cycle per stage

CIS 314 Fall 2005 Major Functional Units

CIS 314 Fall 2005 Functional Units and Control Lines

CIS 314 Fall 2005 Fetch instruction and increment PC

CIS 314 Fall 2005 Memory transfer -- R-type instructions

CIS 314 Fall 2005 Computing branch condition and target address

CIS 314 Fall 2005 Single cycle and control unit

CIS 314 Fall 2005 Single cycle plus jump

CIS 314 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

CIS 314 Fall 2005 You’d better do this Repeat the example of execution for: –lw $t3, 16($t2) –sw $t3, 16($t2) –addi $t1, $s2, $v0 –beq $t3, $s0, gothere –jmp gothere –jr $ra (aka Suggested Exercises)

CIS 314 Fall 2005 Multicycle Datapath Break the operations on an instruction into a series of 5 steps. One clock cycle per step Instruction Fetch (IF) Instruction Decode (ID) Execute (EX) Memory Access (MEM) Write Back (WB)

CIS 314 Fall 2005 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

CIS 314 Fall 2005 Extra hardware for multicycle datapath

CIS 314 Fall 2005 Multicycle datapath

CIS 314 Fall 2005 Complete multicycle datapath

CIS 314 Fall 2005 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