2/8/02CSE 141 - MultiCycle From One Cycle to Many Note: Some of the material in this lecture are COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC. ALL RIGHTS.

Slides:



Advertisements
Similar presentations
Adding the Jump Instruction
Advertisements

EEM 486 EEM 486: Computer Architecture Lecture 4 Designing a Multicycle Processor.
CS-447– Computer Architecture Lecture 12 Multiple Cycle Datapath
The Processor: Datapath & Control
Chapter 5 The Processor: Datapath and Control Basic MIPS Architecture Homework 2 due October 28 th. Project Designs due October 28 th. Project Reports.
1 COMP541 Sequencing – III (Sequencing a Computer) Montek Singh April 9, 2007.
Fall 2007 MIPS Datapath (Single Cycle and Multi-Cycle)
Computer ArchitectureFall 2007 © October 3rd, 2007 Majd F. Sakr CS-447– Computer Architecture.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
1 Chapter 5: Datapath and Control (Part 3) CS 447 Jason Bakos.
Lecture 16: Basic CPU Design
Shift Instructions (1/4)
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.
Lecture 24: CPU Design Today’s topic –Multi-Cycle ALU –Introduction to Pipelining 1.
Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Chapter 4 Sections 4.1 – 4.4 Appendix D.1 and D.2 Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
Computing Systems The Processor: Datapath and Control.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Computer Organization CS224 Fall 2012 Lesson 26. Summary of Control Signals addsuborilwswbeqj RegDst ALUSrc MemtoReg RegWrite MemWrite Branch Jump ExtOp.
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
CSE 340 Computer Architecture Summer 2014 Basic MIPS Pipelining Review.
1 Designing a Pipelined Processor In this Chapter, we will study 1. Pipelined datapath 2. Pipelined control 3. Data Hazards 4. Forwarding 5. Branch Hazards.
EE204 L12-Single Cycle DP PerformanceHina Anwar Khan EE204 Computer Architecture Single Cycle Data path Performance.
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.
Datapath and Control Unit Design
MIPS processor continued. In Class Exercise Question Show the datapath of a processor that supports only R-type and jr reg instructions.
1  2004 Morgan Kaufmann Publishers Chapter Five.
Oct. 18, 2000Machine Organization1 Machine Organization (CS 570) Lecture 4: Pipelining * Jeremy R. Johnson Wed. Oct. 18, 2000 *This lecture was derived.
IT 251 Computer Organization and Architecture Multi Cycle CPU Datapath Chia-Chi Teng.
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.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 2.
1  1998 Morgan Kaufmann Publishers Simple Implementation Include the functional units we need for each instruction Why do we need this stuff?
COM181 Computer Hardware Lecture 6: The MIPs CPU.
MIPS processor continued. Review Different parts in the processor should be connected appropriately to be able to carry out the functions. Connections.
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.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
ECE/CS 552: Single Cycle Control Path
CS161 – Design and Architecture of Computer Systems
CS161 – Design and Architecture of Computer Systems
Computer Organization
Morgan Kaufmann Publishers
Systems Architecture I
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Morgan Kaufmann Publishers The Processor
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Design of the Control Unit for Single-Cycle Instruction Execution
Chapter 4 The Processor Part 2
Design of the Control Unit for One-cycle Instruction Execution
The Multicycle Implementation
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Chapter Five The Processor: Datapath and Control
Rocky K. C. Chang 6 November 2017
The Multicycle Implementation
Systems Architecture I
Systems Architecture I
Simple Implementation
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Systems Architecture I
Control Unit (single cycle implementation)
Processor: Datapath and Control
CS161 – Design and Architecture of Computer Systems
Presentation transcript:

2/8/02CSE MultiCycle From One Cycle to Many Note: Some of the material in this lecture are COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC. ALL RIGHTS RESERVED. Figures may be reproduced only for classroom or personal education use in conjunction with our text and only when the above line is included.

CSE MultiCycle2 Single Cycle Datapath We have everything except control signals Warning! Text is inconsistent. MUX control signals sometimes have “1” is on top, sometimes “0”. On exercises&test, look carefully!

CSE MultiCycle3 Adding Control Signals

Control for R-format instructions

You should be able to complete the table

CSE MultiCycle6 Generating the control signals PLA for control signals

CSE MultiCycle7 Last detail – ALU control Don’t worry too much about the details of the following three slides –The main point is that we control the ALU using bits both from opcode and funct field.

ALU control bits Suppose ALU has 5 functions with control bits We’ll generate ALU control from opcode (bits 31-26) and funct field (bits 5-0) of instruction ALU doesn’t need to know all opcodes--we will summarize opcode with ALUOp (2 bits): 00 - lw,sw01 - beq10 - R-format Main Control op 6 ALU Control funct 2 6 ALUop ALUctr 3

CSE MultiCycle9 Generating ALU control ALU Control Logic

CSE MultiCycle10 Generating individual ALU signals Main Control op 6 ALU Control funct 2 6 ALUop ALUctr 3 Random logic for ALU control Don’t worry about the details of ALUctr But DO worry about other control signals!

CSE MultiCycle11 Single-Cycle CPU clock cycle time Critical path: a path through combinational circuit that takes as long or longer than any other. I cacheDecode, R-Read ALUPC update D cacheR-WriteTotal R-type Load Store beq Clock cycle time = setup + hold

CSE MultiCycle12 Single-Cycle CPU Summary Easy, particularly the control Which instruction takes the longest? By how much? Why is that a problem? Execution time = insts * cpi * cycle time Real machines have much more variable instruction latencies than this small subset.

CSE MultiCycle13 Why use multicycle design? Problem: In single-cycle design, cycle time must be long enough for longest instruction Solution: break execution into smaller tasks – each task takes a cycle; –different instructions require different numbers of cycles Another advantage: May need fewer logic blocks –One ALU instead of ALU plus 2 adders –Only need one unified (instruction + data) cache

CSE MultiCycle14 Multicycle implementation I cacheDecode, R-Read ALUPC update D cacheR- Write Total R-type Load Store beq Load needs 5 cycles Store and R-type need 4 beq needs 3 Goal: balance amount of work done each cycle.

CSE MultiCycle15 Will multicycle design be faster? I cacheDecode, R-read ALUPC update D cacheR-writeTotal R-type Load Store beq Let’s assume setup + hold time = 0.1 ns Single cycle design: Clock cycle time = = 4.8 ns time/inst = 1 cycle/inst * 4.8 ns/cycle = 4.8 ns/inst Multicycle design: Clock cycle time = = 1.1 time/inst = CPI * 1.1 ns/cycle

CSE MultiCycle16 It depends on the program! Cycles needed Instruction frequency R-type460% Load520% Store410% beq310% Let’s assume setup + hold time = 0.1 ns Single cycle design: Clock cycle time = = 4.8 ns time/inst = 1 cycle/inst * 4.8 ns/cycle = 4.8 ns/inst Multicycle design: Clock cycle time = = 1.1 time/inst = CPI * 1.1 ns/cycle = ??? What is CPI assuming this instruction mix???

CSE MultiCycle17 The Five Cycles Five execution steps (some instructions use fewer) –IF: Instruction Fetch –ID: Instruction Decode (& register fetch & add PC+immed) –EX: Execute –Mem: Memory access –WB: Write-Back into registers IF ID EX Mem WB I cacheDecode, R-Read ALUPC update D cacheR- Write Total R-type Load Store beq

CSE MultiCycle18 Partitioning the Single-Cycle Design IF ID Ex Mem WB

CSE MultiCycle19 Adding State Elements Since we reuse logic (e.g. ALU), we need to store results between states Need extra registers when: –signal is computed in one clock cycle and used in another, AND –the inputs to the combinational circuit can change before the signal is written into a state element.

CSE MultiCycle20 Where to add registers (more or less) IF ID Ex Mem WB

Complete Multicycle Datapath (note: logic for jump instruction now included)

CSE MultiCycle22 Summary of execution steps We’ll go through these in exacting detail

CSE MultiCycle23 Computer of the Day The LGP 30 (Made by the Royal McBee Computer Corp.) A first generation computer (1956) 113 vacuum tubes, 1450 diodes. Accumulator ISA, 16 instructions - 4 OP, 12(?) operand bits A = add, B = ring bell, C = clear, D = divide,..., Z = stop Self modifying code needed (see “Olden Days” on class page) Magnetic drum memory – bit words 120 KHz clock, but you had to wait for drum to rotate Good placement of data on drum was important First “desk computer”. Cost ~$40, pounds, 1500 watts. Paper tape I/O. Read or punch 10 6-bit characters/sec. Most important rule: wait 45 minutes after turning off. Otherwise, you may scrape the drum memory