Instruction Set Architecture

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

INSTRUCTION SET ARCHITECTURES
Computer Organization and Architecture
Computer Organization and Architecture
1 Registers and MAL - Part I. Motivation So far there are some details that we have ignored instructions can have different formats most computers have.
Operand And Instructions Representation By Dave Maung.
Instruction Set Architecture & Design
Execution of an instruction
Chapter 2.2 Machine Language.
Unit -II CPU Organization By- Mr. S. S. Hire. CPU organization.
Processor Organization and Architecture Module III.
Operand Addressing and Instruction Representation
Lecture 18 Last Lecture Today’s Topic Instruction formats
Some material taken from Assembly Language for x86 Processors by Kip Irvine © Pearson Education, 2010 Slides revised 2/2/2014 by Patrick Kelley.
4-1 Chapter 4 - The Instruction Set Architecture Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring.
Machine Instruction Characteristics
8.3 Stack Organization Stack: A storage device that stores information in such a manner that the item stored last is the first item retrieved. Also called.
4-1 Chapter 4 - The Instruction Set Architecture Department of Information Technology, Radford University ITEC 352 Computer Organization Principles of.
Instructor: Yuzhuang Hu Assembly Lines An assembly line is a manufacture process in which parts are added into a product in a sequential.
L/O/G/O The Instruction Set Chapter 9 CS.216 Computer Architecture and Organization.
December 8, 2003Other ISA's1 Other ISAs Next, we discuss some alternative instruction set designs. – Different ways of specifying memory addresses – Different.
CSC 3210 Computer Organization and Programming Chapter 1 THE COMPUTER D.M. Rasanjalee Himali.
Chap. 9 Instruction Set Architecture. Computer Architecture Concepts Instruction format –Opcode field Specify the operation to be performed –Address field.
4-1 Chapter 4 - The Instruction Set Architecture Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
Chapter 5 A Closer Look at Instruction Set Architectures.
Chapter 5 A Closer Look at Instruction Set Architectures.
Module 3 Instruction Set Architecture (ISA): ISA Level Elements of Instructions Instructions Types Number of Addresses Registers Types of Operands.
4-1 Chapter 4 - The Instruction Set Architecture Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
Execution of an instruction
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
COMPUTER ARCHITECURE INSTRUCTION SET ARCHITECTURE.
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
Computer Architecture EKT 422
Operand Addressing And Instruction Representation Cs355-Chapter 6.
Computer Architecture Lecture 03 Fasih ur Rehman.
ECEG-3202 Computer Architecture and Organization Chapter 6 Instruction Sets: Addressing Modes and Formats.
Chapter 11 Instruction Sets: Addressing Modes and Formats Gabriel Baron Sydney Chow.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Instruction Sets: Addressing modes and Formats Group #4  Eloy Reyes  Rafael Arevalo  Julio Hernandez  Humood Aljassar Computer Design EEL 4709c Prof:
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
What is a program? A sequence of steps
Ass. Prof. Dr Masri Ayob TK 2123 Lecture 14: Instruction Set Architecture Level (Level 2)
Computer Organization 1
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
Computer Architecture
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Logic and Computer Design Fundamentals
Displacement (Indexed) Stack
Architecture Review Instruction Set Architecture
William Stallings Computer Organization and Architecture 8th Edition
Computer Organization and Design
Processor Organization and Architecture
CENTRAL PROCESSING UNIT
Chapter 8 Central Processing Unit
Processor Organization and Architecture
ECEG-3202 Computer Architecture and Organization
Introduction to Micro Controllers & Embedded System Design
Central Processing Unit.
INSTRUCTION SET ARCHITECTURE
William Stallings Computer Organization and Architecture 8 th Edition Chapter 11 Instruction Sets: Addressing Modes and Formats.
COMPUTER ORGANIZATION AND ARCHITECTURE
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

Instruction Set Architecture Chapter 10 Instruction Set Architecture

10-1 Computer architecture concepts Machine language: binary language Assembly language: symbolic language In the past, architecture, organization and hardware are used to descript a computer. Due to the higher and higher performance of computer, the relationships among architecture, organization and hardware become interwined. Instruction set architecture (ISA) is then used to encompass the whole of computer.

10-1 Computer architecture concepts The format of an instruction is divided into groups called fields as follows. opcode field address field mode field The steps for executing an instruction: Fetch the instruction Decode the instruction Locate the operand Fetch the operand (if necessary) Execute the operation in processor registers Store the results Go back to step 1

10-1 Computer architecture concepts Program counter (PC) keeps track of the instructions in the program stored in memory. Register set Register files in chap. 9 + processor status register (PSR)+ stack pointer (SPP

10-2 Operand addressing Three-address instructions (pages 518-519) Use mainly memory Use mainly register Two-address instructions (page 519) One-address instructions (pages 519-520) A register called accumulator (ACC) is necessary. Zero-address instructions (pages 530-521) Use a stack Last-in, first-out (LIFO) Use push and pop instruction TOS: top of stack

Addressing Architecture Memory-to-memory PC is the only register 21 accesses to memory needed in the previous example (includes accesses of address, data, instruction) instruction count is low, but the execution time is potentially high

Addressing Architecture Register-to-register allow only one memory address restrict its use to load and store type needs sizable register file see the program on the top of page 522 in textbook only 18 memory accesses are needed

Addressing Architecture Register-memory type ADD R1, A R1← R1+M[A] program lengths and number of memory accesses tend to be intermediate between the previous two architectures Single-accumulator architecture no register file significant additional memory accesses would be needed for complex programs inefficient, is restricted to use in CPUs for simple, low-cost applications

Fig. 10-1 Stack architecture high frequency of memory accesses has made it unattractive is useful for rapid interpretation of high-level language programs Infix expression (A+B) ×C+(D×E) Postfix expression AB+C×DE×+ Fig. 10-1

Fig. 10-2 PUSH A PUSH B ADD PUSH C MUL PUSH D PUSH E MUL ADD

10-3 Addressing Mode Addressing mode: The rule for interpreting or modifying the address field of an instruction. Effective address: The address of operand produced by the application of the rule for interpreting or modifying the address field of the instruction before the operand is actually referenced.

Addressing Mode Fig. 10-3 To give programming flexibility to user To reduce the number of bits in the address fields of the instruction Fig. 10-3

Addressing Mode Implied mode: needs no address field, the operand is specified implicitly in the definition of the opcode. For example, ADD in a stack computer. Immediate mode: an instruction has an operand field rather than an address field (the immediate format in Fig. 9-14). For example, ADI in Table 9-8 or the instruction in address 45 in Table 9-9.

Addressing Mode Register and register-indirect mode: Register mode: the address field specifies a processor register (the register format in Fig. 9-14) Register-indirect mode: the instruction specifies a register in the processor whose content gives the address of the operand in the memory. the address field uses fewer bits to select a register than would have been required to specify a memory address directly For example, the auto-increment mode ADD (R1)+, 3 M[R1]←M[R1]+3, R1 ←R1+1

Addressing Mode Direct addressing mode: the address field of the instruction gives the address of the operand in memory. ACC←M[ADRS] Fig. 10-4

Fig. 10-5 direct addressing in a branch instruction

Addressing Mode Indirect addressing mode: the address field of the instruction gives the address at which the effective address is stored in memory. For example, in Fig. 10-4, the effective address is 800 (the operand is the one found in memory at address 800) Relative addressing mode: Effective address= address part of the instruction + contents of PC (signed number) (the jump format in Fig. 9-14). For example, in Fig. 10-4, the effective address= 500 + 252 (next address in PC)

Addressing Mode Indexed addressing mode: the content of an indexed register is added to the address part of the instruction to obtain the effective address. The indexed register may be a special register in CPU or simply a register in register file. In the application of array, the distance between the beginning address and the address of the operand is the index value stored in the register.

Fig. 10-6 Numerical example

Table 10-1 Symbolic convention for addressing mode

10-4 Instruction Set Architectures Reduced Instruction Set Computers (RISCs) Simple instruction Flexibility Higher throughput Faster execution Complex Instruction Set Computers (CISCs) Hardware support for high-level language Compact program

Properties of RISC and CISC Store/load are the only memory accesses Data manipulation instructions are register-to-register Simple addressing mode Instruction formats are all the same length Instructions perform elementary operations One instruction per cycle (simple instruction)

Properties of RISC and CISC Memory access is available to most types of instruction Many addressing mode (substantial in number) Instruction formats are of different lengths Instructions perform both elementary and complex operations (microinstructions are then necessary0 Multiple cycle for executing one instruction (complex instruction)

RISC and CISC Actual instruction set architecture range between those which are purely RISC and those are purely CISC. There is a basic set of elementary operations that most computers include among their instruction. This chapter will focus on the elementary instructions that are included in both RISC and CISC Data transfer instructions Data manipulation instruction Program-control instructions

10-5 Data-transfer instructions

Stack instructions (push/pop) Reside in memory Due to the negative effects on performance, a stack typically handles only state information related to procedure calls/returns/interrupts. A register holds the address for the stack is called stack pointer (SP).

Fig. 10-7 Memory stack A new item is placed on the stack by the push operation: SP ←SP-1 M[SP] ←R1

I/O Instruction Independent I/O: The address ranges assigned to memory and I/O port are independent from each other. Memory map I/O: assigns a sub-range of the memory addresses for addressing I/O port. Didn’t need distinct input or output instructions.

10-6 Data-manipulation instructions Arithmetic instructions Logical and bit-manipulation instructions Shift instruction

Arithmetic instructions

Logical and bit-manipulation instructions

Shift instruction