Csci 136 Computer Architecture II – Summary of MIPS ISA Xiuzhen Cheng

Slides:



Advertisements
Similar presentations
CS 6461: Computer Architecture Instruction Set Architecture Instructor: Morris Lancaster.
Advertisements

CEG3420 Lec2.1 ©UCB Fall 1997 ISA Review CEG3420 Computer Design Lecture 2.
ISA Issues; Performance Considerations. Testing / System Verilog: ECE385.
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.
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 5 MIPS ISA & Assembly Language Programming.
CS3350B Computer Architecture Winter 2015 Lecture 4
Systems Architecture Lecture 5: MIPS Instruction Set
Chapter 2.
Instruction Set Architecture Classification According to the type of internal storage in a processor the basic types are Stack Accumulator General Purpose.
COMP381 by M. Hamdi 1 Instruction Set Architectures.
S. Barua – CPSC 440 CHAPTER 2 INSTRUCTIONS: LANGUAGE OF THE COMPUTER Goals – To get familiar with.
RISC Concepts, MIPS ISA and the Mini–MIPS project
Recap.
ECE C61 Computer Architecture Lecture 3 – Instruction Set Architecture
Classifying Instruction Set Architectures
ECE 232 L5 Assembl.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 5 MIPS Assembly.
©UCB CPSC 161 Lecture 5 Prof. L.N. Bhuyan
CPE442 Lec 3 ISA.1 Intro to Computer Architectures Instruction Set Design instruction set software hardware.
Lecture 17 Today’s Lecture –Instruction formats Little versus big endian Internal storage in the CPU: stacks vs. registers Number of operands and instruction.
1  2004 Morgan Kaufmann Publishers Instructions: bne $t4,$t5,Label Next instruction is at Label if $t4≠$t5 beq $t4,$t5,Label Next instruction is at Label.
CPE442 Lec 3 ISA.1 Intro to Computer Architectures Instruction Set Design instruction set software hardware.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
13/02/2009CA&O Lecture 04 by Engr. Umbreen Sabir Computer Architecture & Organization Instructions: Language of Computer Engr. Umbreen Sabir Computer Engineering.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 5 Addressing Mode & Architectural Design Guidelines February.
1/9/02CSE ISA's Instruction Set Architectures Part 1 I/O systemInstr. Set Proc. Compiler Operating System Application Digital Design Circuit Design.
Memory and Addressing How and Where Information is Stored.
1  Modified from  1998 Morgan Kaufmann Publishers Chapter 2: Instructions: Language of the Machine citation and following credit line is included: 'Copyright.
Classifying GPR Machines TypeNumber of Operands Memory Operands Examples Register- Register 30 SPARC, MIPS, etc. Register- Memory 21 Intel 80x86, Motorola.
Lecture 4: MIPS Instruction Set Reminders: –Homework #1 posted: due next Wed. –Midterm #1 scheduled Friday September 26 th, 2014 Location: TODD 430 –Midterm.
1  1998 Morgan Kaufmann Publishers Machine Instructions: Language of the Machine Lowest level of programming, control directly the hardware Assembly instructions.
April 23, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Assemblers, Linkers, and Loaders * Jeremy R. Johnson Mon. April 23,
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Computer Architecture (CS 207 D) Instruction Set Architecture ISA.
Lecture 11: 10/1/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000.
Crosscutting Issues: The Rôle of Compilers Architects must be aware of current compiler technology Compiler Architecture.
Lecture 04: Instruction Set Principles Kai Bu
©UCB Fall CS/EE 362 Hardware Fundamentals Lecture 11 (Chapter 3: Hennessy and Patterson) Winter Quarter 1998 Chris Myers.
CS 211: Computer Architecture Lecture 2 Instructor: Morris Lancaster.
Chapter 2 CSF 2009 The MIPS Assembly Language. Stored Program Computers Instructions represented in binary, just like data Instructions and data stored.
Computer Organization CS224 Fall 2012 Lessons 7 and 8.
Csci 136 Computer Architecture II – More on MIPS ISA Xiuzhen Cheng
Lecture 5 A Closer Look at Instruction Set Architectures Lecture Duration: 2 Hours.
Machine Instructions Instruction Formats. Machine Instructions u Internal Signals in computer have high and low voltages which represent values 0 and.
What is a program? A sequence of steps
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 7, 8 Instruction Set Architecture.
Computer Architecture & Operations I
Computer Architecture & Operations I
Overview of Instruction Set Architectures
A Closer Look at Instruction Set Architectures
RISC Concepts, MIPS ISA Logic Design Tutorial 8.
A Closer Look at Instruction Set Architectures
The University of Adelaide, School of Computer Science
Computer Architecture (CS 207 D) Instruction Set Architecture ISA
CSCI206 - Computer Organization & Programming
Instructions - Type and Format
Lecture 4: MIPS Instruction Set
CS170 Computer Organization and Architecture I
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
Systems Architecture Lecture 5: MIPS Instruction Set
The University of Adelaide, School of Computer Science
UCSD ECE 111 Prof. Farinaz Koushanfar Fall 2018
COMS 361 Computer Organization
CPU Structure CPU must:
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
Presentation transcript:

Csci 136 Computer Architecture II – Summary of MIPS ISA Xiuzhen Cheng

Announcement Homework assignments #2: Readings: Sections 3.6, 3.7, 3.10, 3.11, 3.13, 3.14 Problems 3.5, 3.10, 3.12, 3.22, 3.23, 3.24, 3.25 Project #1 is due on 11:59PM, Feb 13, 2003.

What is an ISA? A very important abstraction Provide the interface between the low-level software and hardware May have multiple hardware implementations Needs to answer the following questions What is the minimum instruction set to be supported? Use general purpose register or not? CIRS or RISC design? Instruction format? Addressing mode? …

Basic ISA Classes Accumulator Architecture Stack Architecture Load-Store (General Purpose Register) Architecture Register – Register Register – Memory Memory – Memory Code sequences for (C=A+B) for 4 classes of instruction set Stack Accumulator Register (load-store) Push ALoad ALoad R1,A Push BAdd BLoad R2,B AddStore C Register (register-memory) Load R1,A Add R1,B Store C, R1 Add R3,R1,R2 Pop CStore C,R3

°Since 1975, all machines use general purpose registers °Advantages of registers registers are faster than memory registers are easier for a compiler to use - e.g., (A*B) – (C*D) – (E*F) can do multiplies in any order vs. stack registers can hold variables -memory traffic is reduced, so program is sped up (since registers are faster than memory) - code density improves (since register named with fewer bits than memory location) General Purpose Register Dominates

Memory Addressing °Since 1980 almost every machine uses addresses to level of 8-bits (byte) °2 questions for design of ISA: Since one could read a 32-bit word as four loads of bytes from sequential byte addresses or as one load word from a single byte address, How do byte addresses map onto words? Can a word be placed on any byte boundary? What about MIPS?

ISA Operation Summary Support these simple instructions, since they will dominate the number of instructions executed: load, store, add, subtract, move register-register, and, shift, compare equal, compare not equal, branch, jump, call, return;

Summary: Salient features of MIPS 32-bit fixed format inst (3 formats) bit GPR (R0 contains zero) and 32 FP registers (and HI LO) – partitioned by software convention 3-address, reg-reg arithmetic instr. Single addressing mode for load/store: base+displacement – no indirection, scaled 16-bit immediate plus LUI Simple branch conditions – compare against zero or two registers for =,  – no integer condition codes

Summary: MIPS Instruction set design Use general purpose registers with a load-store architecture: yes or no? Provide 32 general purpose registers plus separate floating-point registers: What’s the addressing mode supported by MIPS? Use fixed instruction encoding if interested in performance and use variable instruction encoding if interested in code size :

Summary: MIPS Instruction set design Support these data sizes and types: 8-bit, 16-bit, 32-bit integers and 32-bit and 64-bit IEEE 754 floating point numbers: Support these simple instructions, since they will dominate the number of instructions executed: load, store, add, subtract, move register-register, and, shift, compare equal, compare not equal, branch, jump, call, and return: Aim for a minimalist instruction set:

MIPS Hardware Design Principles Simplicity favors regularity Keeping the hardware simple! R-Type instruction format Smaller is faster 32 general purpose registers, no more, no less. Good design demands good compromises R, I, J, 3 types of instruction formats Make the common case fast! I-type instructions for constant numbers

In-Class Exercise: Reverse a String Write a MIPS procedure to reverse a null-terminated character string. Assume the address of the string is in $a0 and the address of the reversed string is in $a1. Also assume the spaces needed by the reversed string have been pre-allocated.

In-Class Exercise: Reverse a String Write a MIPS procedure to reverse a null-terminated character string. Assume the address of the string is in $a0 and the address of the reversed string is in $a1. Also assume the spaces needed by the reversed string have been pre-allocated. reverseStr: addiu$sp, $sp, -32 sw$s0, 16($sp) sw$s1, 20($sp) move$s0, $a0 move$s1, $a1 addi$sp, $sp, -1 sb$zero, 0($sp) push:lbu$t0, 0($s0) beq$t0, $zero, pop addi$s0, $s0, 1 addi$sp, $sp, -1 sb$t0, 0($sp) jpush pop:lbu$t0, 0($sp) addi$sp, $sp, 1 sb$t0, 0($s1) beq$t0, $zero, done addi$s1, $s1, 1 jpop done:lw$s0, 16($sp) lw$s1, 20($sp) addi$sp, $sp, 32 jr$ra

Questions?