Computer Architecture Lecture 10 MIPS Control Unit Ralph Grishman Oct. 2015 NYU.

Slides:



Advertisements
Similar presentations
Lecture 5: MIPS Instruction Set
Advertisements

ELEN 468 Advanced Logic Design
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
The Processor: Datapath & Control
Processor II CPSC 321 Andreas Klappenecker. Midterm 1 Tuesday, October 5 Thursday, October 7 Advantage: less material Disadvantage: less preparation time.
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.
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.
Datapath and Control 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.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04.
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.
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.
CS2100 Computer Organisation
CDA 3101 Fall 2013 Introduction to Computer Organization
Computer Organization & Programming Chapter 6 Single Datapath CPU Architecture.
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
1. Building A CPU  We’ve built a small ALU l Add, Subtract, SLT, And, Or l Could figure out Multiply and Divide  What about the rest l How do.
MIPS processor continued. In Class Exercise Question Show the datapath of a processor that supports only R-type and jr reg instructions.
1 Processor: Datapath and Control Single cycle processor –Datapath and Control Multicycle processor –Datapath and Control Microprogramming –Vertical and.
December 26, 2015©2003 Craig Zilles (derived from slides by Howard Huang) 1 A single-cycle MIPS processor  As previously discussed, an instruction set.
Computer Architecture Lecture 9 MIPS ALU and Data Paths Ralph Grishman Oct NYU.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
February 22, 2016©2003 Craig Zilles (derived from slides by Howard Huang) 1 A single-cycle MIPS processor  As previously discussed, an instruction set.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
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.
MIPS Processor.
Morgan Kaufmann Publishers The Processor
(a)add Rd, Rs, RtReg[Rd]=Reg[Rs]+Reg[Rt] (b) lw Rt, offs(Rs)Reg[Rt]=MEM[Reg[Rs]+offs] Instruction (a), all blocks except data memory are used for this.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Lecture 9. MIPS Processor Design – Single-Cycle Processor Design Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System.
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Multi-Cycle Datapath and Control.
Lecture 5. MIPS Processor Design
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
CS161 – Design and Architecture of Computer Systems
Single-Cycle Datapath and Control
COMPUTER ARCHITECTURE & OPERATIONS I
ELEN 468 Advanced Logic Design
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Control Path Catholic University PUCRS.
CSCI206 - Computer Organization & Programming
CSCE 212 Chapter 5 The Processor: Datapath and Control
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
CSCI206 - Computer Organization & Programming
Systems Architecture II
MIPS Processor.
Datapath & Control MIPS
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
The Processor Lecture 3.2: Building a Datapath with Control
Systems Architecture I
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COMP541 Datapaths I Montek Singh Mar 18, 2010.
Data Path Diagrams.
The Processor: Datapath & Control.
COMS 361 Computer Organization
MIPS Processor.
Processor: Datapath and Control
Presentation transcript:

Computer Architecture Lecture 10 MIPS Control Unit Ralph Grishman Oct NYU

Full core MIPS data path 9/30/15Computer Architecture lecture 82

Control Logic What’s left: setting the proper control lines for each instruction 9/30/15Computer Architecture lecture 83 instructionControl signals

4 Copyright © 2014 Elsevier Inc. All rights reserved. FIGURE 4.14 The three instruction classes (R-type, load and store, and branch) use two different instruction formats. The jump instructions use another format, which we will discuss shortly. (a) Instruction format for R- format instructions, which all have an opcode of 0. These instructions have three register operands: rs, rt, and rd. Fields rs and rt are sources, and rd is the destination. The ALU function is in the funct field and is decoded by the ALU control design in the previous section. The R-type instructions that we implement are add, sub, AND, OR, and slt. The shamt field is used only for shifts; we will ignore it in this chapter. (b) Instruction format for load (opcode = 35 ten ) and store (opcode = 43 ten ) instructions. The register rs is the base register that is added to the 16-bit address field to form the memory address. For loads, rt is the destination register for the loaded value. For stores, rt is the source register whose value should be stored into memory. (c) Instruction format for branch equal (opcode =4). The registers rs and rt are the source registers that are compared for equality. The 16-bit address field is sign-extended, shifted, and added to the PC + 4 to compute the branch target address. Instruction Formats

Control Logic In general, operation depends on both opcode and funct Requires a large combinatorial circuit We will do this in two steps ALU function for each instruction other control lines for each instruction 9/30/15Computer Architecture lecture 85

Two control units Divide into two control units: one for ALU, one for other control lines 9/30/15Computer Architecture lecture 86 Main control unit ALU control opcode funct ALU Other Contrpl lines

ALU Control Inputs ALU functionA invertBinvertOperation and0000 or0001 add0010 subtract0110 set less than0111 nor1100 9/30/15Computer Architecture lecture 87

ALU functions required InstructionALU function load wordadd store wordadd and or add subtract set less than branch on equalsubtract 9/30/15Computer Architecture lecture 88

Control lines Instru ction Reg Dst ALU src Mem toReg Reg Write Mem Read Mem Write Branc h ALU Op1 ALU Op0 R- format lw swX1X beqX0X /30/15Computer Architecture lecture 89

Single-cycle control Everything happens in one clock cycle: Fetch instruction Fetch registers Do ALU operation Load from memory + store into register or Store into memory or Store into register Very slow Must allow for slowest instruction Most instructions involve an add or subtract 9/30/15Computer Architecture lecture 810

Faster adder? Ripple-carry adder is very slow (64 gate delays for 32 bits) … can we make a faster adder? Approach: incorporate more parallelism into adder 9/30/15Computer Architecture lecture 811

Carries Analyze each bit position in terms of its effect on carries: 1 + 1: generates a carry there is always a carry out of this bit position 1 + 0: propagates a carry there is a carry out of this bit position only if there is a carry in 0 + 0: does neither there is never a carry out of this bit position 9/30/15Computer Architecture lecture 812

Groups We can classify 4-bit groups in the same way: for example: is a generate group: a carry always comes out (from the high bit) while is a propagate group: a carry comes out (from the high bit) only if a carry came in (to the low bit) [see lecture notes for formulas and analysis] 9/30/15Computer Architecture lecture 813

Carry Look-Ahead What is the benefit of using P and G? – they can be computed in parallel for all bits and groups  much faster addition 9/30/15Computer Architecture lecture 814

9/30/15Computer Architecture lecture bit CLA Adder