CPE 731 Advanced Computer Architecture Instruction Set Principles Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University of California,

Slides:



Advertisements
Similar presentations
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
Advertisements

CS1104 – Computer Organization PART 2: Computer Architecture Lecture 5 MIPS ISA & Assembly Language Programming.
CS3350B Computer Architecture Winter 2015 Lecture 4
Chapter 2 Instructions: Language of the Computer
CpE442 Intro. To Computer Architecture CpE 442 Introduction To Computer Architecture Lecture 1 Instructor: H. H. Ammar These slides are based on the lecture.
10/28/091 Implementing an Instruction Set David E. Culler CS61CL Oct 28, 2009 Lecture 9 UCB CS61CL F09 Lec 9.
MIPS Assembler Programming
CS61CL Machine Structures Lec 6 – Number Representation David Culler Electrical Engineering and Computer Sciences University of California, Berkeley.
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
CPSC 614 Computer Architecture Lec 1 - Introduction E. J. Kim Dept. of Computer Science Texas A&M University
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 6: Logic/Shift Instructions Partially adapted from Computer Organization and Design, 4.
MIPS on FLEET Amir Kamil. Goals Run most MIPS assembly code on FLEET  Attempt to duplicate level of support in SPIM interpreter  MIPS assembly translated.
VHDL Synthesis of a MIPS-32 Processor Bryan Allen Dave Chandler Nate Ransom.
CpE442 Intro. To Computer Architecture CpE 442 Introduction To Computer Architecture Lecture 1 Instructor: H. H. Ammar These slides are based on the lecture.
CDA 3101 Fall 2012 Introduction to Computer Organization Instruction Set Architecture MIPS Instruction Format 04 Sept 2013.
83 Assembly Language Readings: Chapter 2 ( , 2.8, 2.9, 2.13, 2.15), Appendix A.10 Assembly language Simple, regular instructions – building blocks.
IT253: Computer Organization Lecture 5: Assembly Language and an Introduction to MIPS Tonga Institute of Higher Education.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
CS 5513: Computer Architecture Lecture 1: Introduction Daniel A. Jiménez The University of Texas at San Antonio
Chapter 10 The Assembly Process. What Assemblers Do Translates assembly language into machine code. Assigns addresses to all symbolic labels (variables.
CS 3853/3851: Computer Architecture Lecture 1: Introduction Daniel A. Jiménez The University of Texas at San Antonio
Small constants are used quite frequently (50% of operands) e.g., A = A + 5; B = B + 1; C = C - 18; Solutions? Why not? put 'typical constants' in memory.
Crosscutting Issues: The Rôle of Compilers Architects must be aware of current compiler technology Compiler Architecture.
CS61CL Machine Structures Lec 5 – Instruction Set Architecture
MIPS Instructions Instructions: Language of the Machine
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.
Yiorgos Makris Professor Department of Electrical Engineering University of Texas at Dallas EE/CE/CS 6304 Computer Architecture Lecture #2 (8/27/15) Course.
MIPS Instructions Instructions: Language of the Machine
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO CS 219 Computer Organization.
Chapter 2 — Instructions: Language of the Computer — 1 Conditional Operations Branch to a labeled instruction if a condition is true – Otherwise, continue.
EEL5708/Bölöni Lec 3.1 Fall 2006 Sept 1, 2006 Lotzi Bölöni EEL 5708 High Performance Computer Architecture Lecture 3 Review: Instruction Sets.
CMPUT Computer Organization and Architecture I1 CMPUT229 - Fall 2003 Topic6: Logic, Multiply and Divide Operations José Nelson Amaral.
CDA 3101 Spring 2016 Introduction to Computer Organization
MIPS Instruction Set Architecture Prof. Sirer CS 316 Cornell University.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Oct. 11, 2000Machine Organization1 Machine Organization (CS 570) Lecture 3: Instruction Set Principles and Examples * Jeremy R. Johnson Wed. Oct. 11, 2000.
EEL5708/Bölöni Lec 3.1 Fall 2004 Sept 1, 2004 Lotzi Bölöni Fall 2004 EEL 5708 High Performance Computer Architecture Lecture 3 Review: Instruction Sets.
Pirouz Bazargan SabetDecember 2003 Effective Implementation of a 32-bit RISC Processor Pirouz Bazargan Sabet University of Paris 6 - LIP6 - ASIM
Instruction Set Architecture of MIPS Processor Presentation B
Instructor: Prof. Hany H Ammar, LCSEE, WVU
Digital Logic Design Alex Bronstein
/ Computer Architecture and Design
CS 230: Computer Organization and Assembly Language
Prof. Hsien-Hsin Sean Lee
Computer Organization and Design Instruction Sets - 2
ELEN 468 Advanced Logic Design
Computer Organization and Design Instruction Sets - 2
CS352H: Computer Systems Architecture
ECE3055 Computer Architecture and Operating Systems MIPS ISA
32-bit MIPS ISA.
Computer Organization and Design Instruction Sets - 1
ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006
Computer Organization and Design Instruction Sets
Designing MIPS Processor (Single-Cycle) Presentation G
Instructions - Type and Format
Appendix A Classifying Instruction Set Architecture
Lecture 4: MIPS Instruction Set
ECE232: Hardware Organization and Design
Today’s Lecture Quick Review of Last Lecture
August 29 New address for Fang-Yi
/ Computer Architecture and Design
Computer Architecture
UCSD ECE 111 Prof. Farinaz Koushanfar Fall 2018
MIPS Instruction Set Architecture
January 16 The books are here. Assignment 1 now due Thursday 18 Jan.
CS352H Computer Systems Architecture
CPU Structure CPU must:
Reduced Instruction Set Computer (RISC)
Instruction Sets, Episode 1
Presentation transcript:

CPE 731 Advanced Computer Architecture Instruction Set Principles Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University of California, Berkeley

6/9/2015CPE 731, ISA 2 Outline Instruction Set Architecture (ISA) Computer Architecture v. Instruction Set Arch. Processor Types ISA Classes How the Architect Can Help the Compiler Writer? MIPS 64

6/9/2015CPE 731, ISA 3 Instruction Set Architecture: Critical Interface instruction set software hardware Properties of a good abstraction –Lasts through many generations (portability) –Used in many different ways (generality) –Provides convenient functionality to higher levels –Permits an efficient implementation at lower levels

6/9/2015CPE 731, ISA 4 Example: MIPS 0 r0 r1 ° r31 PC lo hi Programmable storage 2^32 x bytes 31 x 32-bit GPRs (R0=0) 32 x 32-bit FP regs (paired DP) HI, LO, PC Data types ? Format ? Addressing Modes? Arithmetic logical Add, AddU, Sub, SubU, And, Or, Xor, Nor, SLT, SLTU, AddI, AddIU, SLTI, SLTIU, AndI, OrI, XorI, LUI SLL, SRL, SRA, SLLV, SRLV, SRAV Memory Access LB, LBU, LH, LHU, LW, LWL,LWR SB, SH, SW, SWL, SWR Control J, JAL, JR, JALR BEQ, BNE, BLEZ,BGTZ,BLTZ,BGEZ,BLTZAL,BGEZAL 32-bit instructions on word boundary

6/9/2015CPE 731, ISA 5 Instruction Set Architecture “... the attributes of a [computing] system as seen by the programmer, i.e. the conceptual structure and functional behavior, as distinct from the organization of the data flows and controls the logic design, and the physical implementation.” – Amdahl, Blaauw, and Brooks, 1964SOFTWARE -- Organization of Programmable Storage -- Data Types & Data Structures: Encodings & Representations -- Instruction Formats -- Instruction (or Operation Code) Set -- Modes of Addressing and Accessing Data Items and Instructions -- Exceptional Conditions

6/9/2015CPE 731, ISA 6 Outline Instruction Set Architecture (ISA) Computer Architecture v. Instruction Set Arch. Processor Types ISA Classes How the Architect Can Help the Compiler Writer? MIPS 64

6/9/2015CPE 731, ISA 7 ISA vs. Computer Architecture Old definition of computer architecture = instruction set design –Other aspects of computer design called implementation –Insinuates implementation is uninteresting or less challenging Our view is computer architecture >> ISA Architect’s job much more than instruction set design; technical hurdles today more challenging than those in instruction set design Since instruction set design not where action is, some conclude computer architecture (using old definition) is not where action is –We disagree on conclusion –Agree that ISA not where action is (ISA in CA:AQA 4/e appendix)

6/9/2015CPE 731, ISA 8 Comp. Arch. is an Integrated Approach What really matters is the functioning of the complete system –hardware, runtime system, compiler, operating system, and application –In networking, this is called the “End to End argument” Computer architecture is not just about transistors, individual instructions, or particular implementations –E.g., Original RISC projects replaced complex instructions with a compiler + simple instructions

6/9/2015CPE 731, ISA 9 Computer Architecture is Design and Analysis Architecture is an iterative process: Searching the space of possible designs At all levels of computer systems Creativity Good Ideas Mediocre Ideas Bad Ideas Cost / Performance Analysis

6/9/2015CPE 731, ISA 10 Outline Instruction Set Architecture (ISA) Computer Architecture v. Instruction Set Arch. Processor Types ISA Classes How the Architect Can Help the Compiler Writer? MIPS 64

6/9/2015CPE 731, ISA 11 Processor Types General-Purpose Processors (desktop, server) –Use compilers Special-Purpose Processors (Embedded applications) –Use kernels written in assembly language Reduced Instruction Set Computer (RISC) –MIPS, Power, Alpha Complex Instruction Set Computer (CISC) –80x86, VAX

6/9/2015CPE 731, ISA 12 Outline Instruction Set Architecture (ISA) Computer Architecture v. Instruction Set Arch. Processor Types ISA Classes How the Architect Can Help the Compiler Writer? MIPS 64

6/9/2015CPE 731, ISA 13 ISA Classes

6/9/2015CPE 731, ISA 14 ISA Classes Number of Operands –Zero: Stack »add –One: Accumulator »add B –Two: Register and Memory »add R1, R2 –Three: Register and Memory »add R1, R2, R3 Operands Types –Register-Register (RISC) –Register-Memory (CISC) –Memory-Memory (CISC)

6/9/2015CPE 731, ISA 15 Instruction Encoding

6/9/2015CPE 731, ISA 16 Instruction Encoding: MIPS Example

6/9/2015CPE 731, ISA 17 Addressing Modes Registeradd r1, r3 Immediateaddi r1, 10 Displacementadd r1, 100(r3) Register indirectadd r1, (r3) Indexedadd r1, (r3+r4) Direct or absoluteadd r1, (1000) Memory indirectadd Auto-incrementadd r1, (r3)+ Auto-decrementadd r1, (r3)- Scaledadd r1, 100(r3)[r4] Can the black addressing modes be implemented from the red?

6/9/2015CPE 731, ISA 18 Outline Instruction Set Architecture (ISA) Computer Architecture v. Instruction Set Arch. Processor Types ISA Classes How the Architect Can Help the Compiler Writer? MIPS 64

6/9/2015CPE 731, ISA 19 How the Architect Can Help the Compiler Writer? Compiler optimizations can give orders in magnitude improvement in: –Performance –Code size Can Help by: 1.Provide regularity: operations, registers, addressing modes are orthogonal. 2.Provide Primitives, not solutions (semantic gap) 3.Simplify tradeoffs among alternatives

6/9/2015CPE 731, ISA 20 Outline Instruction Set Architecture (ISA) Computer Architecture v. Instruction Set Arch. Processor Types ISA Classes How the Architect Can Help the Compiler Writer? MIPS 64

6/9/2015CPE 731, ISA 21 MIPS bit GPRr0, r1, r2, … bit FPRf0, f1, f2, … Memory Instructions –LWLDRt, disp(Rs) –SWSDRt, disp(Rs) –L.SL.DFt, disp(Rs) –S.SS.DFt, disp(Rs) Integer Arithmetic Operations –ADDDADDRd, Rs, Rt FP Arithmetic Operations –ADD.SADD.DFd, Fs, Ft –MUL.SMUL.DFd, Fs, Ft