Instruction content (2/2) Instruction content (1/2) The Instruction Set. Chapter 9. Each instruction must contain 4 basic pieces of information

Similar documents
Overview. EE 4504 Computer Organization. Much of the computer s architecture / organization is hidden from a HLL programmer

CHAPTER 5 A Closer Look at Instruction Set Architectures

Interfacing Compiler and Hardware. Computer Systems Architecture. Processor Types And Instruction Sets. What Instructions Should A Processor Offer?

CHAPTER 5 A Closer Look at Instruction Set Architectures

Chapter 5. A Closer Look at Instruction Set Architectures

Understand the factors involved in instruction set

CHAPTER 5 A Closer Look at Instruction Set Architectures

When an instruction is initially read from memory it goes to the Instruction register.

Chapter 11. Instruction Sets: Addressing Modes and Formats. Yonsei University

Addressing Modes. Immediate Direct Indirect Register Register Indirect Displacement (Indexed) Stack

Chapter 5. A Closer Look at Instruction Set Architectures

Instruction Sets: Characteristics and Functions

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 11 Instruction Sets: Addressing Modes and Formats

17. Instruction Sets: Characteristics and Functions

Chapter 5. A Closer Look at Instruction Set Architectures. Chapter 5 Objectives. 5.1 Introduction. 5.2 Instruction Formats

CDA 3103 Computer Organization Homework #7 Solution Set

Chapter 5. A Closer Look at Instruction Set Architectures

Computer Architecture and Organization. Instruction Sets: Addressing Modes and Formats

COMPUTER ORGANIZATION & ARCHITECTURE

Chapter 2: Instructions How we talk to the computer

Instruction Set Architecture

Instruction Set II. COMP 212 Computer Organization & Architecture. COMP 212 Fall Lecture 7. Instruction Set. Quiz. What is an Instruction Set?

Page 1. Structure of von Nuemann machine. Instruction Set - the type of Instructions

Computer Organization CS 206 T Lec# 2: Instruction Sets

Instruction Set Architectures. CS301 Prof. Szajda

Instruc=on Set Architecture

Instruction Sets: Characteristics and Functions Addressing Modes

Instruction Set Principles and Examples. Appendix B

Chapter 5. A Closer Look at Instruction Set Architectures

Chapter 5. A Closer Look at Instruction Set Architectures. Chapter 5 Objectives. 5.1 Introduction. 5.2 Instruction Formats

COMPUTER ORGANIZATION & ARCHITECTURE

CSCI 402: Computer Architectures. Instructions: Language of the Computer (1) Fengguang Song Department of Computer & Information Science IUPUI

55:132/22C:160, HPCA Spring 2011

Review of instruction set architectures

CS4617 Computer Architecture

Review Questions. 1 The DRAM problem [5 points] Suggest a solution. 2 Big versus Little Endian Addressing [5 points]

Chapter 2 Instruction: Language of the Computer

Typical Processor Execution Cycle

ECE 486/586. Computer Architecture. Lecture # 7

Problem with Scanning an Infix Expression

Instruction Set Architectures. Part 1

Chapter 04: Instruction Sets and the Processor organizations. Lesson 18: Stack-based processor Organisation

We briefly explain an instruction cycle now, before proceeding with the details of addressing modes.

Lecture 4: Instruction Set Architecture

Instruction Set Architectures

CSCE 5610: Computer Architecture

Evolution of ISAs. Instruction set architectures have changed over computer generations with changes in the

Lecture 3 Machine Language. Instructions: Instruction Execution cycle. Speaking computer before voice recognition interfaces

Problem with Scanning an Infix Expression

Architectures. CHAPTER 5 Instruction Set 5.1 INTRODUCTION 5.2 INSTRUCTION FORMATS

Instruction Set Architecture

Topics/Assignments. Class 10: Big Picture. What s Coming Next? Perspectives. So Far Mostly Programmer Perspective. Where are We? Where are We Going?

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CPU Architecture and Instruction Sets Chapter 1

Chapter 2. Instruction Set Principles and Examples. In-Cheol Park Dept. of EE, KAIST

William Stallings Computer Organization and Architecture. Chapter 12 Reduced Instruction Set Computers

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

Dr. Ramesh K. Karne Department of Computer and Information Sciences, Towson University, Towson, MD /12/2014 Slide 1

Chapter 13 Reduced Instruction Set Computers

Computer Architecture

CS 206 Introduction to Computer Science II

Lecture #2 January 30, 2004 The 6502 Architecture

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 10 Instruction Sets: Characteristics and Functions

Computer Architecture

Practical Malware Analysis

Chapter 2 Instruction Set Architecture

Assembly Language Design

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

2. ADDRESSING METHODS

Computer System Architecture

I ve been getting this a lot lately So, what are you teaching this term? Computer Organization. Do you mean, like keeping your computer in place?

CISC Attributes. E.g. Pentium is considered a modern CISC processor

EE 3170 Microcontroller Applications

EC-801 Advanced Computer Architecture

Machine and Assembly Language Principles

Instruction Set Architecture ISA ISA

EC 413 Computer Organization

Instruction Sets Ch 9-10

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

Instruction Sets Ch 9-10

Computer Architecture Lecture No.4 5-Instruction Set Architecture and Design 5-1 Memory locations and Operations. word

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

Computer Architectures

Instruction : A command to the microprocessor to perform a given task on specified data. Each instruction has two parts

Instruction-set Design Issues: what is the ML instruction format(s) ML instruction Opcode Dest. Operand Source Operand 1...

Computer Organization and Programming

COSC 6385 Computer Architecture. Instruction Set Architectures

Chapter 2A Instructions: Language of the Computer

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

Outline. What Makes a Good ISA? Programmability. Implementability. Programmability Easy to express programs efficiently?

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro

ECE 486/586. Computer Architecture. Lecture # 8

2010 Summer Answers [OS I]

The Instruction Set. Chapter 5

COMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA?

Forecast. Instructions (354 Review) Basics. Basics. Instruction set architecture (ISA) is its vocabulary. Instructions are the words of a computer

Outline. What Makes a Good ISA? Programmability. Implementability

CSIS1120A. 10. Instruction Set & Addressing Mode. CSIS1120A 10. Instruction Set & Addressing Mode 1

COPYRIGHTED MATERIAL. What Is Assembly Language? Processor Instructions

Lecture Topics. Branch Condition Options. Branch Conditions ECE 486/586. Computer Architecture. Lecture # 8. Instruction Set Principles.

Transcription:

CS.216 Computer Architecture and Organization Chapter 9 The Instruction Set L/O/G/O www.themegallery.com Overview Much of the computer s architecture / organization is hidden from a HLL programmer In the abstract sense, the programmer should not care what the underlying architecture really is The instruction set is the boundary where the computer designer and the computer programmer can view the same machine Thus, an examination of the instruction set goes a long way to explaining the computer s CPU itself This section investigates the design of the instruction set and the impact of the set on the design of the overall computer system Readings: Chapters 10 and 11 Instruction content (1/2) Each instruction must contain 4 basic pieces of information Operation code: specifies the operation to be performed, expressed as a binary code Source operand references: operands required for the instruction are specified Result reference: where should the result of the operation be placed? Instruction content (2/2) Next instruction reference: how/whereisthenext instruction to be found In most cases, this is not explicitly stated in the instruction Next instruction is the one that logically follows the current one in the program (sequential / linear progression through the program)

Instruction types (1/2) An instruction set should be functionally complete Permit the user to formulate any high-level data processing task Five categories of instructions Arithmetic operations Logic operations Data movement (internal to the system) I/O (data movements between the computer and external devices) Control operations Addresses in an Instruction (1/8) In a typical arithmetic or logical instruction, 3 addresses are required -- 2 operands and a result These addresses can be explicitly given or implied by the instruction 3 address instructions Both operands and the destination for the result are explicitly contained in the instruction word Example: X =Y +Z Instruction types (2/2) Instruction sets have been designed with Small numbers of instructions (1) Hundreds of instructions Trend today is to use enough to get the job done well (more on this in the RISC/CISC discussions to come) Until the 1980s, the trend was to construct more and more complex instruction sets containing hundreds of instructions and variations Addresses in an Instruction (2/8) With memory speeds (due to caching) approaching the speed of the processor, this gives a high degree of flexibility to the compiler Avoid the hassles of keeping items in the register set -- use memory as one large set of registers This format is rarely used due to the length of addresses themselves and the resulting length of the instruction words

Addresses in an Instruction (3/8) 2 address instructions One of the addresses is used to specify both an operand and the result location Example: X =X +Y Very common in instruction sets 1 address instructions Two addresses are implied in the instruction Traditional accumulator-based operations Example: Acc = Acc + X Addresses in an Instruction (5/8) Trade off: Fewer addresses in the instruction results in More primitive instructions Less complex CPU Instructions with shorter length More total instructions in a program Longer, more complex programs Longer execution times Addresses in an Instruction (4/8) 0 address instructions All addresses are implied, as in register-based operations Example: TBA (transfer register B to A) Stack-based operations All operations are based on the use of a stack in memory to store operands Interact with the stack using push and pop operations Addresses in an Instruction (6/8) Consider Y = (A-B) / (C+D*E) 3 address 2 address

Addresses in an Instruction (7/8) Consider Y = (A-B) / (C+D*E) 1 address Endian Wars (1/3) Architects must specify how data is stored (its byte ordering) in memory and registers This leads to the endian wars Big endian Little endian Consider the hex value $12345678 and how it is stored in memory starting at address $100 Big endian stores most significant byte in the lowest address: 100 12 101 34 102 56 103 78 Addresses in an Instruction (8/8) 0 address Convert to postfix (reverse Polish) notation Y = AB-CDE*+/ PUSH A PUSH B SUB PUSH C PUSH D PUSH E MPY ADD DIV POP Y Endian Wars (2/3) Little endian stores the word in reverse: 100 78 101 56 102 34 103 12 Observations: In storing several data items into a memory segment, each item will have the same address (big or little endian does not change this) Endianness does not effect the ordering of items in a data structure No general consensus as to which is best Little endian: Intel X86, Pentium, VAX Big endian: S370, Motorola 680x0, RISCs

Endian Wars (3/3) Instruction Formats (1/7) No real advantage in one style over the other Decision is based on supporting previous machines in many cases Biggest problems: Data transfers between machines of different endianness Must go though a format conversion process Manipulation of individual bytes (bits) of multibyte word The instruction format defines the layout of instruction word in terms of its constituent parts Most basic issue is the instruction length Longer instruction lengths permit more opcodes, addressing modes, addressing ranges, etc. Longer does not imply a significant increase in functionality, however Instruction lengths are equal to the basic memory transfer data size or a multiple of that size If the memory system retrieves 32 bit words, instructions should be 32 bits (or 64) Instruction Formats (2/7) PDP-8: 12-bit fixed length variable format Allocation of bits Tradeoff between number of opcodes supported (rich instruction set) and the power of the addressing capability

Instruction Formats (4/7) PDP-10: 36-bit fixed length fixed format Stressed orthogonality, completeness, and direct addressing Trade off ease of programming with increased H/W expense Figure 11.6 Instruction formats for the PDP-11 Instruction Formats (5/7) PDP-11: variable length variable format 16-bit word length minicomputer Variable length instructions to provide flexibility -- more opcodes and memory addressing modes Cost of the flexibility is a significant increase in the CPU complexity PowerPC format Figure 11.9 PowerPC instruction formats

Summary (2/2) Instruction format Size and amount allocated to different fields Fixed and variable formats Complexity Summary (1/2) In this section, we have looked at the instruction set of the machine Content types of information contained in them Functional completeness Addressing in instructions Number of addresses included and the impact on the program Addressing modes -- how is the effective address determined D o y o u h a v e a n y Question! L/O/G/O www.themegallery.com