1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 2.

Slides:



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

Pipeline Example: cycle 1 lw R10,9(R1) sub R11,R2, R3 and R12,R4, R5 or R13,R6, R7.
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.
331 Lec 14.1Fall 2002 Review: Abstract Implementation View  Split memory (Harvard) model - single cycle operation  Simplified to contain only the instructions:
EECE476 Lectures 10: Multi-cycle CPU Control Chapter 5: Section 5.5 The University of British ColumbiaEECE 476© 2005 Guy Lemieux.
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.
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
The Datapath 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.
©UCB CS 161Computer Architecture Chapter 5 Instructor: L.N. Bhuyan LECTURE 10.
Datapath and Control Andreas Klappenecker CPSC321 Computer Architecture.
The Multicycle Processor CPSC 321 Andreas Klappenecker.
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.
Supplementary notes for pipelining LW ____,____ SUB ____,____,____ BEQ ____,____,____ ; assume that, condition for branch is not satisfied OR ____,____,____.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Processor: Datapath and Control
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
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.
CS2100 Computer Organisation
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
MIPS processor continued. In Class Exercise Question Show the datapath of a processor that supports only R-type and jr reg instructions.
ECE-C355 Computer Structures Winter 2008 The MIPS Datapath Slides have been adapted from Prof. Mary Jane Irwin ( )
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
PC Instruction Memory Address Instr. [31-0] 4 Fig 4.6 p 309 Instruction Fetch.
MIPS processor continued
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
1 Chapter 5: Datapath and Control (Part 2) CS 447 Jason Bakos.
Adapted from Computer Organization and Design, Patterson & Hennessy, UCB ECE232: Hardware Organization and Design Part 10: Control Design
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:
Single-cycle CPU Control
Access the Instruction from Memory
EE204 Computer Architecture
Single Cycle CPU - Control
Chapter 5: A Multi-Cycle CPU.
Computer Architecture
Multi-Cycle CPU.
ECS 154B Computer Architecture II Spring 2009
CS/COE0447 Computer Organization & Assembly Language
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
CSE378 Midterm Review Moore’s Law -- What are the two versions?
Composing the Elements
Composing the Elements
The Processor Lecture 3.2: Building a Datapath with Control
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Processor: Multi-Cycle Datapath & Control
CS/COE0447 Computer Organization & Assembly Language
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Control Unit (single cycle implementation)
The Processor: Datapath & Control.
COMS 361 Computer Organization
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 Part 2

2 Fig 5.17

3 Control Unit Implements (in hardware) an if statement: –If opcode == # r-type instruction MemWrite = 0 MemRead = 0 MemToReg = 0 … # values assigned for all the control unit’s output signals –Elif opcode == 0x23 # lw MemWrite = 0 MemRead = 1 MemToReg = 1 … –Elif opcode == 0x4 # beq MemWrite = 0 MemRead = 0 MemToReg = X # don’t care … –… # an Elif test for each opcode

4 Examples In Lab 10, you did examples for an R-type instruction and for sw Now, let’s look at examples for beq and lw

5 Instruction Execution (reminder) beq –Fetch instruction and add 4 to PC beq $t0,$t1,L Assume that L is +3 instructions away –Read two source registers $t0,$t1 –Sign Extend the immediate, and shift it left by 2 0x0003  0x c –Perform the test, and update the PC if it is true If $t0 == $t1, the PC = PC + 0x c [we will follow what Mars does, so this is not Immediate == 0x0002; PC = PC x ]

6 Fig x : Beq $t0,$t1,L L == c

7 Example: lw r8, 32(r18) Let’s assume r18 has 1,000 Let’s assume M[1032] has 0x I-Format

8 Example: lw r8, 32(r18) x (PC+4) MemRead RegWrite Branch=0 RegDest=0 ALUSrc= MemtoReg=1

9 Control Sequence for lw OPcode = 35 –RegDst = 0 –ALUSrc = 1 –MemtoReg = 1 –RegWrite = 1 –MemRead = 1 –MemWrite = 0 –Branch = 0 –ALUop = 0

10 Fig 5.17 (for reference)

11 Control Signal Table Fig 5.18 Figure 5.18 shows the control-signal information for Fig Figure 5.16 describes each of these signals, with one mistake: “PCSrc” in 5.16 should be “Branch”

12 ALU Control HERE!! Depending on instruction, we perform different ALU operations Example –lw or sw: ADD –and: AND –beq: SUB ALU control input (3 bits) (page 301) –000: AND –001: OR –010: ADD –110: SUB –111: SET-IF-LESS-THAN (similar to SUB)

13 ALU Control (figure 5.12) ALUop –00: lw/sw, 01: beq, 10: arithmetic, 11: jump

14 ALU Control Truth Table Fig 5.13

15 ALU Control Logic Design we’ll return to this when we cover appendix B

16 Datapath w/ Jump Fig 5.24

17 What We Have Now Fig 5.24

18 Functional Units Used

19 Single-Cycle Execution Timing (in pico-seconds)

20 Single-Cycle Exe. Problem The cycle time depends on the most time- consuming instruction –What happens if we implement a more complex instruction, e.g., a floating-point mult. –All resources are simultaneously active – there is no sharing of resources We’ll adopt a multi-cycle solution –Use a faster clock –Allow different number of clock cycles per instruction

21 A Multi-cycle Datapath A single memory unit for both instructions and data Single ALU rather than ALU & two adders Registers added after every major functional unit to hold the output until it is used in a subsequent clock cycle

22 Multi-cycle Approach Reusing functional units –Break up instruction execution into smaller steps –We’ll need more and expanded MUX’s At the end of a cycle, keep results in registers –Additional registers Now, control signals are NOT solely determined by the instruction bits Controls will be generated by a FSM!