CSE378 MIPS ISA1 MIPS History MIPS is a computer family –R2000/R3000 (32-bit); R4000/4400 (64-bit); R8000; R10000 (64-bit) etc. MIPS originated as a Stanford.

Slides:



Advertisements
Similar presentations
Review of the MIPS Instruction Set Architecture. RISC Instruction Set Basics All operations on data apply to data in registers and typically change the.
Advertisements

1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
INSTRUCTION SET ARCHITECTURES
1 ECE462/562 ISA and Datapath Review Ali Akoglu. 2 Instruction Set Architecture A very important abstraction –interface between hardware and low-level.
Some Other Instruction Set Architectures. Overview Alpha SPARC i386.
ELEN 468 Advanced Logic Design
Chapter 2 Instructions: Language of the Computer
Chapter 2.
CSE 340 Computer Architecture Spring 2014 MIPS ISA Review
1 Registers and MAL - Part I. Motivation So far there are some details that we have ignored instructions can have different formats most computers have.
CSE378 ISA evolution1 Evolution of ISA’s ISA’s have changed over computer “generations”. A traditional way to look at ISA complexity encompasses: –Number.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
RISC By Don Nichols. Contents Introduction History Problems with CISC RISC Philosophy Early RISC Modern RISC.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Homework #2  Write a Java virtual machine interpreter  Use x86 Assembly  Must support dynamic class loading  Work in groups of 10  Due Midnight.
What is an instruction set?
CEG 320/520: Computer Organization and Assembly Language Programming1 CEG 320/520 Computer Organization and Assembly Language Programming.
Some material taken from Assembly Language for x86 Processors by Kip Irvine © Pearson Education, 2010 Slides revised 2/2/2014 by Patrick Kelley.
Instruction Set Architecture
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
IT 252 Computer Organization and Architecture Introduction Chia-Chi Teng.
CSE378 Instr. encoding.1 Instruction encoding The ISA defines –The format of an instruction (syntax) –The meaning of the instruction (semantics) Format.
6.S078 - Computer Architecture: A Constructive Approach Introduction to SMIPS Li-Shiuan Peh Computer Science & Artificial Intelligence Lab. Massachusetts.
CSCI 211 Intro Computer Organization –Consists of gates for logic And Or Not –Processor –Memory –I/O interface.
1 Instruction Set Architecture (ISA) Alexander Titov 10/20/2012.
Chapter Six Sun SPARC Architecture. SPARC Processor The name SPARC stands for Scalable Processor Architecture SPARC architecture follows the RISC design.
Computer Architecture And Organization UNIT-II General System Architecture.
CBP 2009Comp 3014 The Nature of Computing 1 Choices in Designing an ISA Uniformity. Should each instruction –Be the same length (in bits or bytes?) –Take.
Computer Architecture and Organization
Computer Architecture CSE 3322 Lecture 2 NO CLASS MON Sept 1 Course WEB SITE crystal.uta.edu/~jpatters.
Computer Architecture EKT 422
1 The Instruction Set Architecture September 27 th, 2007 By: Corbin Johnson CS 146.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 7, 8 Instruction Set Architecture.
Lecture 2: Instruction Set Architecture part 1 (Introduction) Mehran Rezaei.
Computer Organization Instructions Language of The Computer (MIPS) 2.
Computer Architecture & Operations I
Computer Architecture & Operations I
IT 251 Computer Organization and Architecture
A Closer Look at Instruction Set Architectures
Choices in Designing an ISA
ELEN 468 Advanced Logic Design
IT 251 Computer Organization and Architecture
Instructions - Type and Format
CSCI206 - Computer Organization & Programming
CSCE Fall 2013 Prof. Jennifer L. Welch.
The University of Adelaide, School of Computer Science
ECE232: Hardware Organization and Design
MIPS History MIPS is a computer family
Instruction encoding The ISA defines Format = Encoding
MIPS History MIPS is a computer family
Computer Instructions
Computer Architecture
CSCE Fall 2012 Prof. Jennifer L. Welch.
Instruction encoding The ISA defines Format = Encoding
Evolution of ISA’s ISA’s have changed over computer “generations”.
What is Computer Architecture?
Instruction encoding The ISA defines Format = Encoding
Introduction to Microprocessor Programming
What is Computer Architecture?
What is Computer Architecture?
Evolution of ISA’s ISA’s have changed over computer “generations”.
Instruction encoding The ISA defines Format = Encoding
MIPS History MIPS is a computer family
Evolution of ISA’s ISA’s have changed over computer “generations”.
CPU Structure CPU must:
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
Evolution of ISA’s ISA’s have changed over computer “generations”.
CSE378 Introduction to Machine Organization
Presentation transcript:

CSE378 MIPS ISA1 MIPS History MIPS is a computer family –R2000/R3000 (32-bit); R4000/4400 (64-bit); R8000; R10000 (64-bit) etc. MIPS originated as a Stanford research project under the direction of John Hennessy –Microprocessor without Interlocked Pipe Stages MIPS Co. bought by SGI MIPS used in previous generations of DEC (then Compaq, now HP) workstations Now MIPS Technologies is in the embedded systems market MIPS is a RISC

CSE378 MIPS ISA2 MIPS is a RISC RISC = Reduced Instruction Set Computer R could also stand for “regular” All arithmetic-logical instructions are of the form MIPS (as all RISC’s) is a Load-Store architecture –ALU operates only on operands that are in registers –The only instructions accessing memory are load and store

CSE378 MIPS ISA3 Registers Registers are the “bricks” of the CPU Registers are an essential part of the ISA –Visible to the hardware and to the programmer Registers are –Used for high speed storage for operands. For example, if a,b,c are in registers 8,9,10 respectively add $8,$9,$10 # a = b + c –Easy to name (most computers have 32 (integer) registers visible to the programmer and their names are 0, 1, 2, …,31) –Used also for addressing memory

CSE378 MIPS ISA4 Registers (ct’d) Not all registers are “equal” –Some are special-purpose (e.g., register 0 in MIPS is wired to the value 0) –Some are used for integer and some for floating-point (e.g., 32 of each in MIPS) –Some have restricted use by convention (cf. App. A pp A22-23) –Why no more than 32 or 64 registers Well, sometimes there is (SPARC, Itanium, Cray, Tera) Smaller is faster Instruction encoding (names have to be short) There can be more registers but they are invisible to the ISA –this is called register renaming (see CSE 471)

CSE378 MIPS ISA5 Memory system Memory is a hierarchy of devices with faster and more expensive ones closer to CPU –Registers –Caches (hierarchy: on-chip, off-chip) –Main memory (DRAM) –Secondary memory (disks)

CSE378 MIPS ISA6 Information units Basic unit is the bit (has value 0 or 1) Bits are grouped together in information units: –Byte = 8 bits –Word = 4 bytes (= 32 bits: the length of a MIPS integer register) –Double word = 2 words –etc.

CSE378 MIPS ISA7 Memory addressing Memory is a single-dimensional array of information units –Each unit has the same size –Each unit has its own address –Address of an unit and contents of the unit at that address are different address contents

CSE378 MIPS ISA8 Addressing In most of today’s computers, the basic I-unit that can be addressed is a byte –MIPS is byte addressable The address space is the set of all I-units that a program can reference –The address space is tied to the length of the registers –MIPS has 32-bit registers. Hence its address space is 4G bytes –Older micros (minis) had 16-bit registers, hence 64 KB address space (too small) –Some current (Alpha, Itanium, Sparc, Altheon, Pentium 4-EMT64) machines have 64-bit registers, hence an enormous address space

CSE378 MIPS ISA9 The CPU - Instruction Execution Cycle The CPU executes a program by repeatedly following this cycle 1. Fetch the next instruction, say instruction i 2. Execute instruction i 3. Compute address of the next instruction, say j 4. Go back to step 1 Of course we’ll optimize this but it’s the basic concept

CSE378 MIPS ISA10 What’s in an instruction? An instruction tells the CPU –the operation to be performed via the OPCODE –where to find the operands (source and destination) For a given instruction, the ISA specifies –what the OPCODE means (semantics) –how many operands are required and their types, sizes etc.(syntax) Operand is either –register (integer, floating-point, PC) –a memory address –a constant

CSE378 MIPS ISA11 ISA MIPS Registers Thirty-two 32-bit registers $0,$1,…,$31 used for –integer arithmetic; address calculation; temporaries; special- purpose functions (stack pointer etc.) A 32-bit Program Counter (PC) Two 32-bit registers (HI, LO) used for mult. and division Thirty-two 32-bit registers $f0, $f1,…,$f31 used for floating-point arithmetic –Often used in pairs: bit registers Registers are a major part of the “state” of a process

CSE378 MIPS ISA12 MIPS Register names and conventions

CSE378 MIPS ISA13 MIPS = RISC = Load-Store architecture Every operand must be in a register –Except for some small integer constants that can be in the instruction itself (see later) Variables have to be loaded in registers Results have to be stored in memory Explicit Load and Store instructions are needed because there are many more variables than the number of registers

CSE378 MIPS ISA14 Example The HLL statements a = b + c d = a + b will be “translated” into assembly language as: load b in register rx load c in register ry rz <- rx + ry store rz in a # not destructive; rz still contains the value of a rt <- rz + rx store rt in d

CSE378 MIPS ISA15 MIPS Information units Data types and size: –Byte –Half-word (2 bytes) –Word (4 bytes) –Float (4 bytes; single precision format) –Double (8 bytes; double-precision format) Memory is byte-addressable A data type must start at an address evenly divisible by its size (in bytes) In the little-endian environment (the one we’ll use), the address of a data type is the address of its lowest byte

CSE378 MIPS ISA16 Big-endian vs. little endian Byte order within a word: Little-endian (we’ll use this) Big-endian

CSE378 MIPS ISA17 Addressing of Information units Byte address 0 Half-word address 0 Word address 0 Byte address 2 Half-word address 2 Byte address 8 Half-word address 8 Word address 8 Byte address

CSE378 MIPS ISA18 SPIM Convention Words listed from left to right but little endians within words [0x7fffebd0] 0x x x x00010aff Byte 7fffebd2Word 7fffebd4 Half-word 7fffebde

CSE378 MIPS ISA19 Assembly Language programming or How to be nice to your TAs Use lots of detailed comments Don’t be too fancy Use lots of detailed comments Use words (rather than bytes) whenever possible Use lots of detailed comments Remember: The address of a word is evenly divisible by 4 Use lots of detailed comments The word following the word at address i is at address i+4 Use lots of detailed comments

CSE378 MIPS ISA20 MIPS Instruction types Few of them (RISC philosophy) Arithmetic –Integer (signed and unsigned); Floating-point Logical and Shift –work on bit strings Load and Store –for various data types (bytes, words,…) Compare (of values in registers) Branch and jumps (flow of control) –Includes procedure/function calls and returns

CSE378 MIPS ISA21 Notation for SPIM instructions Opcoderd, rs, rt Opcodert, rs, immed where –rd is always a destination register (result) –rs is always a source register (read-only) –rt can be either a source or a destination (depends on the opcode) –immed is a 16-bit constant (signed or unsigned)