CSCI206 - Computer Organization & Programming

Slides:



Advertisements
Similar presentations
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
Advertisements

The Processor: Datapath & Control
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and 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.
Processor II CPSC 321 Andreas Klappenecker. Midterm 1 Tuesday, October 5 Thursday, October 7 Advantage: less material Disadvantage: less preparation time.
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.
Chapter Five The Processor: Datapath and Control.
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.
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.
CSE431 L05 Basic MIPS Architecture.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 05: Basic MIPS Architecture Review Mary Jane Irwin.
The Processor: Datapath & Control. Implementing Instructions Simplified instruction set memory-reference instructions: lw, sw arithmetic-logical instructions:
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.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Processor: Datapath and Control
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
ECE 445 – Computer Organization
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
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.
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.
MIPS Processor.
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:
Single-cycle CPU Control
EE204 Computer Architecture
CS Computer Architecture Week 10: Single Cycle Implementation
Multi-Cycle Datapath and Control
Electrical and Computer Engineering University of Cyprus
CS 230: Computer Organization and Assembly Language
Single-Cycle Datapath and Control
Computer Architecture
Processor Design & Implementation
Morgan Kaufmann Publishers
Introduction CPU performance factors
/ Computer Architecture and Design
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Basic MIPS Architecture
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
Systems Architecture II
MIPS Processor.
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
The Processor Lecture 3.2: Building a Datapath with Control
Topic 5: Processor Architecture
COMS 361 Computer Organization
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Lecture 14: Single Cycle MIPS Processor
Processor: Multi-Cycle Datapath & Control
Single Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
MIPS processor continued
CS/COE0447 Computer Organization & Assembly Language
Control Unit (single cycle implementation)
The Processor: Datapath & Control.
COMS 361 Computer Organization
MIPS Processor.
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

CSCI206 - Computer Organization & Programming Single Cycle Datapath zyBook: 11.3

The Basic MIPS Datapath Needs extra wires for jal / jr How is next pc selected? (control) How fast can it be clocked?

Instruction Decoding Examine the bit pattern in the instruction to determine the exact instruction, data registers, and the immediate value, if any. R-type instruction I-type instruction J-type instruction R-type: 31 25 20 15 5 op rs rt rd funct shamt 10 I-type: 31 25 20 15 5 op rs rt immediate 10 J-type: 31 25 20 15 5 op destination address 10

Executing R Format Operations R format operations (add, sub, slt, and, or) perform operation (op and funct) on values in rs and rt store the result back into the Register File (into location rd) R-type: 31 25 20 15 5 op rs rt rd funct shamt 10 Instruction Write Data Read Addr 1 Read Addr 2 Write Addr Register File Read Data 1 Data 2 ALU overflow zero ALU control RegWrite Fetch PC = PC+4 Decode Exec Note that Register File is not written every cycle (e.g., sw), so we need an explicit write control signal for the Register File Since writes to the register file are edge-triggered, we can legally read and write the same register within a clock cycle – the read will get the value written in an earlier clock cycle, which the value written will be available to a read in a subsequent cycle.

Executing Load and Store Operations Load and store operations involves compute memory address by adding the base register (read from the Register File during decode) to the 16-bit signed-extended offset field in the instruction store value (read from the Register File during decode) written to the Data Memory load value, read from the Data Memory, written to the Register File Instruction Write Data Read Addr 1 Read Addr 2 Write Addr Register File Read Data 1 Data 2 ALU overflow zero ALU control RegWrite Data Memory Address Read Data Sign Extend MemWrite MemRead 16 32 store load Note there are separate read and write controls to the memory – only one of which may be asserted on any given clock cycle. The memory unit needs a read signal, since, unlike the register file, reading the value of an invalid address can cause problems as we will see later. (Standard memory chips actually have a write enable signal that is used for writes.)

Executing Branch Operations Branch operations involves compare the operands read from the Register File during decode for equality (zero ALU output) compute the branch target address by adding the updated PC to the 16-bit signed-extended offset field in the instruction

Executing Branch Operations Instruction Write Data Read Data 1 Data 2 ALU zero ALU control Sign Extend 16 32 Shift left 2 Add 4 PC Branch target address (signal “zero” sent to branch control logic) Read Addr 1 Register File Read Addr 2 Write Addr

Executing Jump Operations Jump operation involves replace the lower 28 bits of the PC with the lower 26 bits of the fetched instruction shifted left by 2 bits Add 4 4 Jump address Instruction Memory Shift left 2 28 Read Address PC Instruction 26

Composing the Elements Morgan Kaufmann Publishers 13 November, 2018 Composing the Elements First-cut data path does an instruction in one clock cycle Each datapath element can only do one function at a time Hence, we need separate instruction and data memories Use multiplexers where alternate data sources are used for different instructions Chapter 4 — The Processor

R-Type/Load/Store Datapath Morgan Kaufmann Publishers 13 November, 2018 R-Type/Load/Store Datapath Chapter 4 — The Processor

Morgan Kaufmann Publishers Full Datapath 13 November, 2018 Chapter 4 — The Processor