CS 6461: Computer Architecture Instruction Set Architecture Instructor: Morris Lancaster.

Slides:



Advertisements
Similar presentations
Chapter 2 Instruction Set Principles. Computer Architecture’s Changing Definition 1950s to 1960s: Computer Architecture Course = Computer Arithmetic 1970s.
Advertisements

Instruction Set Design
Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
CPU Review and Programming Models CT101 – Computing Systems.
by Wannarat Computer System Design Lecture 2 Instruction Set Architecture.
CEG3420 Lec2.1 ©UCB Fall 1997 ISA Review CEG3420 Computer Design Lecture 2.
CPE 631: Instruction Set Principles and Examples Electrical and Computer Engineering University of Alabama in Huntsville Aleksandar Milenkovic,
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.
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.
1 ECE369 ECE369 Chapter 2. 2 ECE369 Instruction Set Architecture A very important abstraction –interface between hardware and low-level software –standardizes.
Instruction Set Architecture Classification According to the type of internal storage in a processor the basic types are Stack Accumulator General Purpose.
Tuan Tran. What is CISC? CISC stands for Complex Instruction Set Computer. CISC are chips that are easy to program and which make efficient use of memory.
Operand And Instructions Representation By Dave Maung.
Chapter 6 สถาปัตยกรรมไมโครโพรเซสเซอร์แบบต่างๆ Processor Architectures
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
1 Lecture 3: Instruction Sets Section 1.3, Sections Technology trends Design issues in defining an instruction set  Register and memory access.
Processor Organization and Architecture
MIPS assembly. Computer What’s in a computer? Processor, memory, I/O devices (keyboard, mouse, LCD, video camera, speaker), disk, CD drive, …
Lecture 17 Today’s Lecture –Instruction formats Little versus big endian Internal storage in the CPU: stacks vs. registers Number of operands and instruction.
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/9/02CSE ISA's Instruction Set Architectures Part 1 I/O systemInstr. Set Proc. Compiler Operating System Application Digital Design Circuit Design.
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.
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.
Chapter 5 A Closer Look at Instruction Set Architectures.
Instruction Set Architecture Formats Speaker: Duc Nguyen Prof. Sin-Min Lee, CS 147, Fall 2009.
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
Computer Organization and Architecture Tutorial 1 Kenneth Lee.
CS2100 Computer Organisation
Chapter 2 Instructions: Language of the Computer Part I.
RISC and CISC. What is CISC? CISC is an acronym for Complex Instruction Set Computer and are chips that are easy to program and which make efficient use.
Lecture 11: 10/1/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Differences in ISA Instruction length
MIPS Processor Chapter 12 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
Operand Addressing And Instruction Representation Cs355-Chapter 6.
Csci 136 Computer Architecture II – Summary of MIPS ISA Xiuzhen Cheng
©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.
Lecture 5 A Closer Look at Instruction Set Architectures Lecture Duration: 2 Hours.
ISA's, Compilers, and Assembly
MIPS assembly. Computer  What’s in a computer?  Processor, memory, I/O devices (keyboard, mouse, LCD, video camera, speaker), disk, CD drive, …
Instruction Set Architectures. Our Progress Done with levels 0 and 1 Seen multiple examples of level 2 Ready for ISA general principles.
Addressing modes, memory architecture, interrupt and exception handling, and external I/O. An ISA includes a specification of the set of opcodes (machine.
Computer Architecture & Operations I
Computer Architecture & Operations I
Overview of Instruction Set Architectures
A Closer Look at Instruction Set Architectures
ISA's, Compilers, and Assembly
A Closer Look at Instruction Set Architectures
An example of multiplying two numbers A = A * B;
Chapter 1 Fundamentals of Computer Design
Instruction Set Architectures
MIPS Assembly.
CS170 Computer Organization and Architecture I
Computer Programming Machine and Assembly.
MIPS assembly.
Processor Organization and Architecture
A Closer Look at Instruction Set Architectures Chapter 5
Addressing mode summary
COMS 361 Computer Organization
CPU Structure CPU must:
Lecture 4: Instruction Set Design/Pipelining
Presentation transcript:

CS 6461: Computer Architecture Instruction Set Architecture Instructor: Morris Lancaster

Appendix A+ Instruction Set Principles and Examples

August 13, 2012CS 6461 Instruction Set Architecture3 ?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

August 13, 2012CS 6461 Instruction Set Architecture4 Classifying ISA’s Type of Internal Storage –Stack –Accumulator –Set of Registers

August 13, 2012CS 6461 Instruction Set Architecture5 Operand Locations for 4 ISA Classes

August 13, 2012CS 6461 Instruction Set Architecture6 Design Decisions Instruction Set Architecture Class (Load-Store?) –How Many Registers (more is good) How Many Operands in the instruction?

August 13, 2012CS 6461 Instruction Set Architecture7 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

August 13, 2012CS 6461 Instruction Set Architecture8 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)

August 13, 2012CS 6461 Instruction Set Architecture9 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)

August 13, 2012CS 6461 Instruction Set Architecture10 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]

August 13, 2012CS 6461 Instruction Set Architecture11 Summary of Use of Addressing Modes for DEC VAX Architecture

August 13, 2012CS 6461 Instruction Set Architecture12 Displacement Values Are Widely Distributed

August 13, 2012CS 6461 Instruction Set Architecture13 About ¼ of Data Transfers and ALU Operations Have an Immediate Operand

August 13, 2012CS 6461 Instruction Set Architecture14 Distribution of Immediate Values

August 13, 2012CS 6461 Instruction Set Architecture15 Type and Size of Operands 8, 16, 32, 64 bits Alignment Fetch capability Encoding type

August 13, 2012CS 6461 Instruction Set Architecture16 Distribution of Data Access By Size

August 13, 2012CS 6461 Instruction Set Architecture17 Control Flow Addressing modes Conditional branch operations Frequency distributions

August 13, 2012CS 6461 Instruction Set Architecture18 Breakdown of Control Flow Instructions

August 13, 2012CS 6461 Instruction Set Architecture19 Branch Distance In Number of Instructions

August 13, 2012CS 6461 Instruction Set Architecture20 Frequency of Different Types of Compares in Conditional Branches

August 13, 2012CS 6461 Instruction Set Architecture21 Fig 2.38 Data Reference Sizes

August 13, 2012CS 6461 Instruction Set Architecture22 Fig 2.23 Three Variations In Instruction Encoding

August 13, 2012CS 6461 Instruction Set Architecture23 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

August 13, 2012CS 6461 Instruction Set Architecture24 The Role of Compilers Structure Optimizations Register Allocation (tied with hardware) Impact of Compiler Technology on Architects Decisions

August 13, 2012CS 6461 Instruction Set Architecture25 Fig 2.24 Compiler Structure

August 13, 2012CS 6461 Instruction Set Architecture26 Fig 2.26 Change in Instruction Count From Compiler Optimization (SPEC2000)

August 13, 2012CS 6461 Instruction Set Architecture27 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

August 13, 2012CS 6461 Instruction Set Architecture28 MIPS Instruction Set Instruction nomenclature –Opcode –Registers rs, rd, rt

August 13, 2012CS 6461 Instruction Set Architecture29 Fig 2.27 MIPS Instruction Layout

August 13, 2012CS 6461 Instruction Set Architecture30 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