Multicycle Datapath & Control Andreas Klappenecker CPSC321 Computer Architecture.

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)
1  1998 Morgan Kaufmann Publishers We will be reusing functional units –ALU used to compute address and to increment PC –Memory used for instruction and.
The Control Logic Andreas Klappenecker CPSC321 Computer Architecture.
1 Chapter Five The Processor: Datapath and Control.
CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
L14 – Control & Execution 1 Comp 411 – Fall /04/09 Control & Execution Finite State Machines for Control MIPS Execution.
VHDL Development for ELEC7770 VLSI Project Chris Erickson Graduate Student Department of Electrical and Computer Engineering Auburn University, Auburn,
Processor II CPSC 321 Andreas Klappenecker. Midterm 1 Tuesday, October 5 Thursday, October 7 Advantage: less material Disadvantage: less preparation time.
10/26/2004Comp 120 Fall October Only 11 to go! Questions? Today Exam Review and Instruction Execution.
CSCE 212 Chapter 5 The Processor: Datapath and Control Instructor: Jason D. Bakos.
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
1 Chapter Five. 2 We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw, sw –arithmetic-logical.
10/18/2005Comp 120 Fall October Questions? Instruction Execution.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Lecture 16: Basic CPU Design
L15 – Control & Execution 1 Comp 411 – Spring /25/08 Control & Execution Finite State Machines for Control MIPS Execution.
331 W10.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 10 Building a Multi-Cycle Datapath [Adapted from Dave Patterson’s.
1  1998 Morgan Kaufmann Publishers We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw,
CPU Architecture Why not single cycle? Why not single cycle? Hardware complexity Hardware complexity Why not pipelined? Why not pipelined? Time constraints.
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
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.
1 We're ready to look at an implementation of the MIPS Simplified to contain only: –memory-reference instructions: lw, sw –arithmetic-logical instructions:
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.
Computing Systems The Processor: Datapath and Control.
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.
C HAPTER 5 T HE PROCESSOR : D ATAPATH AND C ONTROL M ULTICYCLE D ESIGN.
1  2004 Morgan Kaufmann Publishers Chapter Five.
Multicycle Implementation
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.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 3.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
1. 2 MIPS Hardware Implementation Full die photograph of the MIPS R2000 RISC Microprocessor. The 1986 MIPS R2000 with five pipeline stages and 450,000.
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.
CS161 – Design and Architecture of Computer Systems
Control & Execution Finite State Machines for Control MIPS Execution.
Five Execution Steps Instruction Fetch
MIPS Instructions.
CS/COE0447 Computer Organization & Assembly Language
Multiple Cycle Implementation of MIPS-Lite CPU
Chapter Five.
Control & Execution Finite State Machines for Control MIPS Execution.
CS/COE0447 Computer Organization & Assembly Language
CSCE 212 Chapter 5 The Processor: Datapath and Control
Multicycle Approach Break up the instructions into steps
The Multicycle Implementation
CS/COE0447 Computer Organization & Assembly Language
Chapter Five The Processor: Datapath and Control
The Multicycle Implementation
Multicycle Approach We will be reusing functional units
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Multicycle Design.
CS/COE0447 Computer Organization & Assembly Language
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Review Fig 4.15 page 320 / Fig page 322
Chapter Four The Processor: Datapath and Control
5.5 A Multicycle Implementation
Drawbacks of single cycle implementation
Drawbacks of single cycle implementation
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

Multicycle Datapath & Control Andreas Klappenecker CPSC321 Computer Architecture

Administrative Issues Office hours have been moved: Today: canceled Thursday 2:00pm-3:00pm Seek help if you did not do well on the test Lab 3 due next week

Multi-Cycle Processor

Single memory unit for instructions data Single ALU Registers after every major functional unit hold output of that unit until value is used in next clock cycle data used in subsequent instructions must be stored in programmer visible registers Multicycle Approach

Multicycle Datapath

Additional ‘Internal’ Registers Instruction and memory data register both memory and instruction registers are used because both values are needed A and B registers hold register operands ALUout register holds output of ALU

Instruction Fetch Instruction Decode and Register Fetch Execution, Memory Address Computation, or Branch Completion Memory Access or R-type instruction completion Write-back step INSTRUCTIONS TAKE FROM CYCLES! Five Execution Steps

Use PC to get instruction and put it in the Instruction Register. PC = PC + 4 RTL "Register-Transfer Language" IR = Memory[PC]; PC = PC + 4; What is the advantage of updating the PC now? Step 1: Instruction Fetch

Read registers rs and rt in case we need them Compute the branch address in case the instruction is a branch RTL A = Reg[IR[25-21]]; B = Reg[IR[20-16]]; ALUOut = PC+(sign-extended(IR[15-0])<<2); No control lines based on the instruction type are set b/c control logic busy "decoding". Step 2: Instruction Decode and Register Fetch

ALU performs one of three functions, based on instruction type Memory Reference ALUOut=A+sign-extend(IR[15-0]); R-type ALUOut = A op B; Branch if (A==B) PC = ALUOut; Step 3 (instruction dependent)

Loads and stores access memory MDR = Memory[ALUOut]; orMemory[ALUOut] = B; R-type instructions finish Reg[IR[15-11]] = ALUOut; The write actually takes place at the end of the cycle on the edge Step 4 (R-type or memory-access)

Load operations Reg[IR[20-16]]= MDR; What about all the other instructions? Write-back step

Summary

Clock Cycles per Instruction R-type 4 clock cycles Memory reference instructions 5 clock cycles Branches 3 clock cycles Jumps 3 clock cycles

How many cycles will it take to execute this code? lw $t2, 0($t3) lw $t3, 4($t3) beq $t2, $t3, Label#assume not add $t5, $t2, $t3 sw $t5, 8($t3) Label:... What is going on during the 8th cycle of execution? In what cycle does the actual addition of $t2 and $t3 takes place? Questions

MIPS Multicycle Datapath Incomplete (branch and jumps…)

Control What are the control signals? Finite state machine control Instruction fetch instruction decode memory reference R-type branch jump

Multicycle Datapath and Control Lines

Outlook What happens precisely during each step of fetch/decode/execute cycles Construct the finite state control machine High-level view