Systems Architecture I

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.
Levels in Processor Design
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.
Shift Instructions (1/4)
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
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.
The Processor Andreas Klappenecker CPSC321 Computer Architecture.
The Processor: Datapath & Control. Implementing Instructions Simplified instruction set memory-reference instructions: lw, sw arithmetic-logical instructions:
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
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]
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.
1  1998 Morgan Kaufmann Publishers Simple Implementation Include the functional units we need for each instruction Why do we need this stuff?
July 2, 2001Systems Architecture I1 Systems Architecture II (CS 282) Lab 3: State Elements, Registers, and Memory * Jeremy R. Johnson Monday July 2, 2001.
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.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
CS Computer Architecture Week 10: Single Cycle Implementation
CS161 – Design and Architecture of Computer Systems
Morgan Kaufmann Publishers
Introduction CPU performance factors
Systems Architecture I
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Chapter Five.
MIPS processor continued
Designing MIPS Processor (Single-Cycle) Presentation G
CSCI206 - Computer Organization & Programming
Single-Cycle CPU DataPath.
Systems Architecture I (CS ) Lecture 16: Exceptions
CSCI206 - Computer Organization & Programming
Systems Architecture II
MIPS Processor.
Datapath & Control MIPS
Levels in Processor Design
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Systems Architecture I
The Processor Lecture 3.2: Building a Datapath with Control
The Processor Lecture 3.1: Introduction & Logic Design Conventions
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
Simple Implementation
COMP541 Datapaths I Montek Singh Mar 18, 2010.
Single Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Basic MIPS Implementation
Chapter Four The Processor: Datapath and Control
Systems Architecture I (CS ) Lecture 17: Exceptions
Systems Architecture II
Systems Architecture I
The Processor: Datapath & Control.
COMS 361 Computer Organization
MIPS Processor.
Processor: Datapath and Control
Presentation transcript:

Systems Architecture I September 4, 1997 Systems Architecture I (CS 281-001) Lecture 14: A Simple Implementation of MIPS* Jeremy R. Johnson Wed. Nov. 17, 1999 *This lecture was derived from material in the text (sec. 5.1-5.3). All figures from Computer Organization and Design: The Hardware/Software Approach, Second Edition, by David Patterson and John Hennessy, are copyrighted material (COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC. ALL RIGHTS RESERVED). Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 Introduction Objective: To understand how to implement the MIPS instruction set. Combine components (registers, memory, ALU) and add control Fetch-Execute cycle Topics Sequential logic (elements with state) and timing (edge triggered) Memory Registers Datapath components: Instruction memory, PC, Add, Register File, ALU, Data Memory Implement a subset of MIPS in a single cycle computer Shortcomings of a single cycle computer Nov. 17, 1999 Systems Architecture I

The Processor: Datapath & Control September 4, 1997 The Processor: Datapath & Control Implementation of MIPS Simplified to contain only: memory-reference instructions: lw, sw arithmetic-logical instructions: add, sub, and, or, slt control flow instructions: beq, j Generic Implementation: use the program counter (PC) to supply instruction address get the instruction from memory read registers use the instruction to decide exactly what to do Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 Abstract View Two types of functional units: elements that operate on data values (combinational) elements that contain state (sequential) Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 Timing Clocks used in synchronous logic when should an element that contains state be updated? Edge-triggered timing cycle time rising edge falling edge Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 Edge Triggered Timing State updated at clock edge read contents of some state elements, send values through some combinational logic write results to one or more state elements Nov. 17, 1999 Systems Architecture I

Components for Simple Implementation September 4, 1997 Components for Simple Implementation Functional Units needed for each instruction Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 Building the Datapath Use Multiplexors to put components together Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 Adding Control Selecting the operations to perform (ALU, read/write, etc.) Controlling the flow of data (multiplexor inputs) Information comes from the 32 bits of the instruction Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 MIPS Instructions add $t0,$s1,$s2 lw $t0,256($t1) 000000 10001 10010 01000 00000 100000 op rs rt rd shamt funct 100011 01001 01000 0000 0001 0000 0000 op rs rt offset Nov. 17, 1999 Systems Architecture I

MIPS Instructions Continued September 4, 1997 MIPS Instructions Continued beq $s1,$s2,100 j 4096 000100 10001 10010 0000 0000 0001 1001 op rs rt offset 000010 00 0000 0000 0000 0100 0000 0000 op address Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 ALU Control Lines 000 and 001 or 010 add 110 sub 111 slt Nov. 17, 1999 Systems Architecture I

Determining ALU Control Bits September 4, 1997 Determining ALU Control Bits ALUOp determined by instruction Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 ALU Control Must describe hardware to compute 3-bit ALU conrol input given instruction type 00 = lw, sw 01 = beq, 10 = arithmetic function code for arithmetic Describe it using a truth table (can turn into gates): ALUOp computed from instruction type Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 Datapath with Control Nov. 17, 1999 Systems Architecture I

Systems Architecture I September 4, 1997 Control Line Settings 8 control lines (control read/write and multiplexors) Nov. 17, 1999 Systems Architecture I

Shortcomings of a Single Cycle Implementation September 4, 1997 Shortcomings of a Single Cycle Implementation Limits reuse of hardware components each functional unit can be used only once per cycle e.g. instruction and data memory required Inefficient clock cycle determined by longest possible path in the machine E.G. Assume time for: Memory units = 2 ns ALU and adders = 2 ns Register file (read or write) = 1 ns R-format = Inst Mem + reg read + ALU + reg write = 6 ns Load = Inst Mem + reg read + ALU + Data Mem + reg write = 8 ns Store = Inst Mem + reg read + ALU + Data Mem = 7 ns Branch = Inst Mem + reg read + ALU = 5ns Nov. 17, 1999 Systems Architecture I

Loss of Efficiency Due to Single Cycle September 4, 1997 Loss of Efficiency Due to Single Cycle Assume 24% loads, 12% stores, 44% R-format, 18% branches, and 2% jumps (2 ns) CPU perf [var]/CPU perf [single] = CPU Time [single]/CPU Time[var] = (IC * CPU clock[single]/(IC * CPU clock[var]) = CPU clock[single]/CPU clock[var] = 8/(8 x 0.24 + 7 x 0.12 + 6 x 0.44 + 5 x 0.18 + 2 x 0.02) = 8/6.34 = 1.26 Next class, we examine a multi-cycle implementation (5.4) Nov. 17, 1999 Systems Architecture I