CS 211: Computer Architecture Lecture 2 Instructor: Morris Lancaster.

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
CS 6461: Computer Architecture Instruction Set Architecture Instructor: Morris Lancaster.
CEG3420 Lec2.1 ©UCB Fall 1997 ISA Review CEG3420 Computer Design Lecture 2.
1 Instruction Set Principles and Examples 游象甫. 2 Outline Introduction Classifying instruction set architectures Memory addressing Type and size of operands.
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.
Lecture 3: Instruction Set Principles Kai Bu
EECC551 - Shaaban #1 Lec # 2 Fall Instruction Set Architecture (ISA) “... the attributes of a [computing] system as seen by the programmer,
RISC / CISC Architecture By: Ramtin Raji Kermani Ramtin Raji Kermani Rayan Arasteh Rayan Arasteh An Introduction to Professor: Mr. Khayami Mr. Khayami.
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.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 5 MIPS ISA & Assembly Language Programming.
ELEN 468 Advanced Logic Design
Recap Measuring and reporting performance Quantitative principles Performance vs Cost/Performance.
1 CENG 450 Computer Systems and Architecture Lecture 4 Amirali Baniasadi
CS1104: Computer Organisation
COMP381 by M. Hamdi 1 Instruction Set Architectures.
Classifying Instruction Set Architectures
Rung-Bin Lin Chapter 2:Instruction Set Principles and Examples2-1 Chapter 2. Instruction Set Principles and Examples Topics –Present a taxonomy of instruction.
S. Barua – CPSC 440 CHAPTER 2 INSTRUCTIONS: LANGUAGE OF THE COMPUTER Goals – To get familiar with.
Recap.
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
Classifying Instruction Set Architectures
1 Lecture 3: Instruction Sets Section 1.3, Sections Technology trends Design issues in defining an instruction set  Register and memory access.
Lecture 17 Today’s Lecture –Instruction formats Little versus big endian Internal storage in the CPU: stacks vs. registers Number of operands and instruction.
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.
CMP 301A Computer Architecture 1 Lecture 4. 2 Outline zISA Introduction zISA Classes yStack yAccumulator yRegister memory yRegister register/load store.
1 Copyright © 2011, Elsevier Inc. All rights Reserved. Appendix A Authors: John Hennessy & David Patterson.
1 Appendix B Classifying Instruction Set Architecture Memory addressing mode Operations in the instruction set Control flow instructions Instruction format.
1/9/02CSE ISA's Instruction Set Architectures Part 1 I/O systemInstr. Set Proc. Compiler Operating System Application Digital Design Circuit Design.
1  Modified from  1998 Morgan Kaufmann Publishers Chapter 2: Instructions: Language of the Machine citation and following credit line is included: 'Copyright.
Instruction Set Architecture Basics. Our Progress Done with levels 0 and 1 Seen multiple examples of level 2 Ready for ISA general principles.
Classifying GPR Machines TypeNumber of Operands Memory Operands Examples Register- Register 30 SPARC, MIPS, etc. Register- Memory 21 Intel 80x86, Motorola.
Computer architecture Lecture 11: Reduced Instruction Set Computers Piotr Bilski.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
Chapter 5 A Closer Look at Instruction Set Architectures.
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
CS2100 Computer Organisation
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 19 & 20 Instruction Formats PDP-8,PDP-10,PDP-11 & VAX Course Instructor: Engr. Aisha Danish.
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.
Operand Addressing And Instruction Representation Cs355-Chapter 6.
Csci 136 Computer Architecture II – Summary of MIPS ISA Xiuzhen Cheng
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.
Instruction Sets: Addressing modes and Formats Group #4  Eloy Reyes  Rafael Arevalo  Julio Hernandez  Humood Aljassar Computer Design EEL 4709c Prof:
Lecture 5 A Closer Look at Instruction Set Architectures Lecture Duration: 2 Hours.
ISA's, Compilers, and Assembly
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 7, 8 Instruction Set Architecture.
Instruction Set Architectures. Our Progress Done with levels 0 and 1 Seen multiple examples of level 2 Ready for ISA general principles.
Lecture 12: 10/3/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Instruction Set Principles
15-740/ Computer Architecture Lecture 3: Performance
ELEN 468 Advanced Logic Design
A Closer Look at Instruction Set Architectures
Instruction Format MIPS Instruction Set.
Instruction Set Principles
Lecture 4: MIPS Instruction Set
CS170 Computer Organization and Architecture I
The University of Adelaide, School of Computer Science
Processor Organization and Architecture
Guest Lecturer TA: Shreyas Chand
Chapter 2. Instruction Set Principles and Examples
Instruction Set Principles
Lecture 4: Instruction Set Design/Pipelining
Presentation transcript:

CS 211: Computer Architecture Lecture 2 Instructor: Morris Lancaster

Appendix B Instruction Set Principles and Examples

5/7/2010CS 211 Lecture 23 ?Design a New High Performance System? ISA –What instructions should we include Internal Organization –How do the instructions implemented affect the internal organization (and subsequently performance) How best approach this problem? –Understand what a computer and an instruction set architecture does for us –Look at current architectures for insight

5/7/2010CS 211 Lecture 24 Classifying ISA’s Type of Internal Storage –Stack –Accumulator –Set of Registers

5/7/2010CS 211 Lecture 25 Operand Locations for 4 ISA Classes

5/7/2010CS 211 Lecture 26 Design Decisions Instruction Set Architecture Class (Load-Store?) –How Many Registers (more is good) How Many Operands in the instruction?

5/7/2010CS 211 Lecture 27 Code Sequences for the 4 Classes Since 1980s almost all new designs are load store architectures. –Machines have large register files –Registers are easier for the compiler to manage (addressed in only one way) StackAccumulatorRegister (register-memory) Register (load store) Push ALoad ALoad R1, A Push BAdd BAdd R3, R1, BLoad R2, B AddStore CStore R3, CAdd R3, R1, R2 Pop CStore R3,C

5/7/2010CS 211 Lecture 28 Number of Memory Addresses Number of memory addresses Maximum number of operands allowed Type of Architecture Examples 03Load-StoreAlpha, ARM, MIPS, PowerPC, SPARC, SuperH, TM32 12Register-MemoryIBM 360/370, Intel 80x86, Motorola 68000, TI TMS320C54x 22Memory – memoryVAX (also has 3 operand formats) 33Memory - memoryVAX (also has 2 operand formats)

5/7/2010CS 211 Lecture 29 Tradeoffs for the ISA Classes TypeAdvantagesDisadvantages Register-register (0,3) Simple, fixed length instruction encoding. Simple code generation model. Instructions take similar numbers of clocks to execute. Higher instruction count than architectures with memory references in the instructions. More instructions and lower instruction density leads to larger programs Register-memory (1,2) Data can be accessed without a separate load instruction first. Instruction format tends to be easy to encode and yields good density Operands are not equivalent since a source operand is destroyed. Encoding a register number and a memory address in each instruction may restrict the number of registers. Clocks per instruction vary by operand location Memory-memory (2,2) or (3,3) Most compact. Does not waste registers for temporaries. Large variation in instruction size, especially for three-operand instructions. In addition, large variation in work per instruction. Memory accesses create memory bottleneck. (Not used today)

5/7/2010CS 211 Lecture 210 Memory Addressing (page B9) RegisterAdd R4,R3R4<- R4 + R3 ImmediateAdd R4,#3R4<- R4 + 3 Displacement Add R4,100(R1) R4<- R4 + Mem[100+R1] Register IndirectAdd R4,(R1) R4<- R4 + Mem[R1] IndexedAdd R3,(R1+R2) R3<- R3 + Mem[R1+R2] DirectAdd R1, (1001) R1<- R1 + Mem[1001] Memory IndirectAdd R1<- R1 + Mem[Mem[R3]] AutoIncrementAdd R1, (R2)+R1<- R1 + Mem[R2] R2<- R2 +d AutoDecrementAdd R1, -(R2) R2<- R2 - d R1<- R1 + Mem[R2] ScaledAdd R1, 100(R2)[R3]R1<- (R1) + Mem[100+(R2) + (R3)*d]

5/7/2010CS 211 Lecture 211 Summary of Use of Addressing Modes for DEC VAX Architecture

5/7/2010CS 211 Lecture 212 Displacement Values Are Widely Distributed

5/7/2010CS 211 Lecture 213 About ¼ of Data Transfers and ALU Operations Have an Immediate Operand

5/7/2010CS 211 Lecture 214 Distribution of Immediate Values

5/7/2010CS 211 Lecture 215 Type and Size of Operands 8, 16, 32, 64 bits Alignment Fetch capability Encoding type

5/7/2010CS 211 Lecture 216 Distribution of Data Access By Size

5/7/2010CS 211 Lecture 217 Control Flow Addressing modes Conditional branch operations Frequency distributions

5/7/2010CS 211 Lecture 218 Breakdown of Control Flow Instructions

5/7/2010CS 211 Lecture 219 Branch Distance In Number of Instructions

5/7/2010CS 211 Lecture 220 Frequency of Different Types of Compares in Conditional Branches

5/7/2010CS 211 Lecture 221 Fig 2.38 Data Reference Sizes

5/7/2010CS 211 Lecture 222 Fig 2.23 Three Variations In Instruction Encoding

5/7/2010CS 211 Lecture 223 Instruction Encoding Balance –Desire to have as many registers and addressing modes as possible –The impact of the size of the register and addressing mode fields on the average instruction size and hence average program size –A desire to have instructions encoded into lengths that will be easy to handle in a pipelined implementation

5/7/2010CS 211 Lecture 224 The Role of Compilers Structure Optimizations Register Allocation (tied with hardware) Impact of Compiler Technology on Architects Decisions

5/7/2010CS 211 Lecture 225 Fig 2.24 Compiler Structure

5/7/2010CS 211 Lecture 226 Fig 2.26 Change in Instruction Count From Compiler Optimization (SPEC2000)

5/7/2010CS 211 Lecture 227 MIPS Instruction Set MIPS 64 has 32 general purpose registers of 64 bits in length (R0…R31) –Value of R0 is always 0 32 floating point registers capable of holding 32 or 64 bit floating point numbers Instruction formats –I type immediate –R type register-register –J type jump

5/7/2010CS 211 Lecture 228 MIPS Instruction Set Instruction nomenclature –Opcode –Registers rs, rd, rt

5/7/2010CS 211 Lecture 229 Fig 2.27 MIPS Instruction Layout

5/7/2010CS 211 Lecture 230 Fallacies and Pitfalls Pitfall – Designing a “high-level” instruction set feature specifically oriented to supporting a high-level language structure. Fallacy – There is such a thing as a typical program Pitfall – Innovating at the instruction set architecture to reduce code size without accounting for the compiler. Fallacy – An architecture with flaws cannot be successful Fallacy – You can design a flawless machine