Multiple cycle implementation Each instruction takes more than one clock cycles to execution Q: How to break an instruction? Break each instruction into.

Slides:



Advertisements
Similar presentations
CS/COE1541: Introduction to Computer Architecture Datapath and Control Review Sangyeun Cho Computer Science Department University of Pittsburgh.
Advertisements

Adding the Jump Instruction
Microprocessor Design Multi-cycle Datapath Nia S. Bradley Vijay.
CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
Chap.6: Enhancing Performance with Pipelining Jen-Chang Liu, Spring 2006 Parts of the slides are duplicated from inst.eecs.berkeley.edu/~cs61c.
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;
1 5.5 A Multicycle Implementation A single memory unit is used for both instructions and data. There is a single ALU, rather than an ALU and two adders.
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
331 Lec 14.1Fall 2002 Review: Abstract Implementation View  Split memory (Harvard) model - single cycle operation  Simplified to contain only the instructions:
©UCB CS 161Computer Architecture Chapter 5 Lecture 11 Instructor: L.N. Bhuyan Adapted from notes by Dave Patterson (http.cs.berkeley.edu/~patterson)
Preparation for Midterm Binary Data Storage (integer, char, float pt) and Operations, Logic, Flip Flops, Switch Debouncing, Timing, Synchronous / Asynchronous.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
1 Chapter 5: Datapath and Control (Part 3) CS 447 Jason Bakos.
Shift Instructions (1/4)
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 The Processor: Datapath and Control We will design a microprocessor that includes a subset of the MIPS instruction set: –Memory access: load/store word.
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
The Multicycle Processor CPSC 321 Andreas Klappenecker.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Datapath and Control: MultiCycle Implementation. Performance of Single Cycle Machines °Assume following operation times: Memory units : 200 ps ALU and.
EE204 L12-Single Cycle DP PerformanceHina Anwar Khan EE204 Computer Architecture Single Cycle Data path Performance.
EECS 322: Computer Architecture
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.
Let’s look at a normal lw instruction first… 1. 2 Register file addresscontent 6 (00110) (00111) OpcodeSource register Destination register.
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
Gary MarsdenSlide 1University of Cape Town Stages.
1 Processor: Datapath and Control Single cycle processor –Datapath and Control Multicycle processor –Datapath and Control Microprogramming –Vertical and.
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 ( )
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 2.
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 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:
Design a MIPS Processor (II)
Chapter 5: A Multi-Cycle CPU.
CS161 – Design and Architecture of Computer Systems
Systems Architecture I
Multi-Cycle CPU.
D.4 Finite State Diagram for the Multi-cycle processor
Multi-Cycle CPU.
CS/COE0447 Computer Organization & Assembly Language
Multiple Cycle Implementation of MIPS-Lite CPU
Chapter Five The Processor: Datapath and Control
Multicycle Approach Break up the instructions into steps
The Multicycle Implementation
Chapter Five The Processor: Datapath and Control
The Multicycle Implementation
Systems Architecture I
Vishwani D. Agrawal James J. Danaher Professor
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Chapter Four The Processor: Datapath and Control
5.5 A Multicycle Implementation
Processor Design Datapath and Design.
Systems Architecture I
The Processor: Datapath & Control.
Processor: Datapath and Control
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

Multiple cycle implementation Each instruction takes more than one clock cycles to execution Q: How to break an instruction? Break each instruction into a series of steps corresponding to the functional unit operations Execution steps

Abstract of multicycle datapath 3 main func. units: memory, register, ALU buffers

Change from single-cycle to multi-cycle Usage of functional units A functional unit can be used more than once per instruction on different clock cycles Ex. Instruction memory, data memory -> one memory Ex. ALU, adder -> single ALU Temporary registers as buffers after operational units IR, MDR, A, B, ALUout 除了 IR 外,不需 write control signal 。 IR 需保 存指令至指令結束 Ref: next page 同一功能單元可在同一指令的不同時脈中使用 不同時脈間的執行結果需存在暫存器中

Recall: single-cycle implementation

Change from single-cycle to multi-cycle (cont.) How to select input to shared functional units? Use Multiplexor Ex. ALU input Input1: register file 1 PC Input2: register file 2 constant 4 sign-extended offset shifted offset Ref: prev. page

Multicycle datapath for MIPS: add MUXs

Multicycle datapath for MIPS: add control lines Do not need write control

Possible sources for PC 1. Normal: PC+4 2. Branch: calculate branch target from ALU 3. Jump: 6 bits26 bits PC 31… bits 00 J-format Jump target address

Multicycle datapath for MIPS: add PC control lines PC source PC control lines

01

Break instruction execution into clock cycles Clock cycle length 時脈長度 : longest of these 3 operations

Maximally 5 steps to execute 3 to 5 steps to execute an instruction Instruction fetch Data/register read Instruction execution Memory/register read/write Register write IR=Memory[PC]; PC=PC+4 A=Reg[IR[25-21]]; B=Reg[IR[20-16]]; calc. branch address Memory reference R-type inst. Branch Jump

Example: Memory reference (load) lw $t1, offset($t2) 3. ALUout=A+sign(IR[15-0]); ALUSrcA=1,ALUSrcB=10 4. MDR = Memory[ALUout]; IorD=1, MemRead=1, 5. Reg[IR[20-16]]=MDR; RegWrite=1, RegDst=0, MemtoReg=1

Quiz: R-type Add $t1, $t2, $t3 Instruction fetch Data/register read Instruction execution Memory/register read/write Register write

Control for multicycle datapath

Control for multi-cycle datapath Recall: we build truth table in single cycle datapath Multicycle: different control signals at the series of steps in a instruction 2 methods Finite state machine microprogramming 指令中每個 cycle 都需要不同的控制訊號

Idea for multi-cycle control 在 datapath 中每個階段都需要不同的控 制訊號 Instruction fetch Data/register read Instruction execution Memory/register read/write Register write Control Signal 1 Control Signal 2 Memory reference R-type inst. Branch Jump state transition function Finite state machine

Preview of FSM for control Inst. Fetch+ Reg. read execution Memory Read/write Write back register

Implement FSM State transition ROM, PLA state

Control for multicycle datapath Microprogramming

Motivation If there are over 100 instructions, the graphical representation of FSM is impossible … 大指令集,要畫出 FSM 的狀態轉移圖很難

Ideas from programming instructions datapathControl signal Instructions for datapah microinstruction: define the datapath control signals in a given state microprogramming: design the control as a program composed of micro-instructions

Microinstruction format 依所控制的功能單元分欄位 ALU register memory PC

MIPS microprogram

Implement microprogramming 下一個指令: 循序執行或有 branch 微指令對應到的控制訊號