Processor Organization and Architecture Module III.

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

There are two types of addressing schemes:
Computer Organization and Architecture
Instruction Set Architecture
Computer Organization and Architecture
Chapter 11 Instruction Sets
The Central Processing Unit Instruction Sets: Addressing Modes and Formats.
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.
Abdullah, Ibrahim Ali, Javeed Budhram, Dharmendra Galiana, Thomas Monegro, Wesley Silva, Frank.
6.1 Introduction Two details related to instructions –The way instructions are specified –The ways that operands can be specified.
Mod-Mod Pengalamat Segera (Immediate) Terus (Direct)
CH11 Instruction Sets: Addressing Modes and Formats
Pentium Addressing Modes
CH12 CPU Structure and Function
Machine Instruction Characteristics
Instruction Set Architecture
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 15 & 16 Stacks, Endianness Addressing Modes Course Instructor: Engr. Aisha Danish.
Homework Problems 1. M1 runs the program P in 1.4 * 9 * ns or ns M2 runs the program P in 1.6*9800*10ns or ns Hence M2 is faster by.
Chap. 9 Instruction Set Architecture. Computer Architecture Concepts Instruction format –Opcode field Specify the operation to be performed –Address field.
Module 3 Instruction Set Architecture (ISA): ISA Level Elements of Instructions Instructions Types Number of Addresses Registers Types of Operands.
Instruction Sets: Characteristics Functions Addressing Modes Formats Chapter7:
COMPUTER ARCHITECURE INSTRUCTION SET ARCHITECTURE.
Computer Organization
Chapter 11 Instruction Sets: Addressing Modes and Formats
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.
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.
Addressing Modes and Formats
WEEK 3 I/O Port Programming ET2640 Microprocessors and Microcontrollers.
What is a program? A sequence of steps
EKT 422/4 COMPUTER ARCHITECTURE SoME-0809-I 1 Chapter 3a Instruction Sets: Characteristics and Functions.
Computer Organization 1
MicroProcessors Lec. 3 Dr. Tamer Samy Gaafar. Course Web Page
1 ADDRESSING MODES Addressing Modes: * Specifies a rule for interpreting or modifying the address field of the instruction (before the operand is actually.
Computer Architecture
EEL 4709C Prof. Watson Herman Group 4 Ali Alshamma, Derek Montgomery, David Ortiz 11/11/2008.
İnformasiya texnologiyaları kafedrası Mövzu № 7. Ünvanlaşdırma üsulları. (Ünvanlaşdırma rejimləri. Bilavasitə ünvanlaşdırma. Birbaşa ünvanlaşdırma. Registrli.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Displacement (Indexed) Stack
William Stallings Computer Organization and Architecture 6th Edition
Alvaro Mauricio Peña Dariusz Niworowski Frank Rodriguez
William Stallings Computer Organization and Architecture 8th Edition
Processor Organization and Architecture
BIC 10503: COMPUTER ARCHITECTURE
Introduction to Micro Controllers & Embedded System Design Background to Module4 Department of Electrical & Computer Engineering Missouri University.
Central Processing Unit
Processor Organization and Architecture
ECEG-3202 Computer Architecture and Organization
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
Computer Architecture
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
CPU Structure and Function
William Stallings Computer Organization and Architecture 8 th Edition Chapter 11 Instruction Sets: Addressing Modes and Formats.
COMPUTER ORGANIZATION AND ARCHITECTURE
Presentation transcript:

Processor Organization and Architecture Module III

Addressing Modes How to specify operands The different modes are: – Immediate – Direct – Indirect – Register – Register Indirect – Displacement (Indexed) – Stack

Immediate Addressing Operand is part of instruction e.g. ADD 5 – Add 5 to contents of accumulator – 5 is operand Adv: – No memory reference to fetch data – Fast Disadv: – Limited range

Immediate Addressing OperandOpcode Instruction

Direct Addressing Address field contains effective address of operand e.g. ADD A – Look in memory at address A for operand Adv: – Single memory reference to access data – No additional calculations to work out effective address Disadv: Limited address space

Direct Addressing Address AOpcode Instruction Memory Operand

Indirect Addressing Memory cell pointed to by address field contains the address of (pointer to) the operand EA = (A) – Look in A, find address (A) and look there for operand e.g. ADD (A) – Add contents of cell pointed to by contents of A to accumulator

Indirect Addressing Adv: – Large address space – 2 n where n = word length – May be nested, multilevel, cascaded e.g. EA = (((A))) Disadv: Multiple memory accesses to find operand and hence slower

Indirect Addressing Address AOpcode Instruction Memory Operand Pointer to operand

Register Addressing Address field refers to a register EA = R Adv: – Only a small address field is needed in the instruction – Less access time Disadv: – Limited number of registers – Limited address space

Register Addressing Register Address ROpcode Instruction Registers Operand

Register Indirect Addressing Similar to indirect addressing EA = (R) Operand is in memory cell pointed to by contents of register R One fewer memory access than indirect addressing

Register Indirect Addressing Register Address ROpcode Instruction Memory Operand Pointer to Operand Registers

Displacement Addressing Combines direct and register indirect addressing EA = A + (R) Address field hold two values – A = base value – R = register that holds displacement – or vice versa

Displacement Addressing Register ROpcode Instruction Memory Operand Pointer to Operand Registers Address A +

Uses of Displacement Addressing Relative Addressing Base-Register Addressing Indexed Addressing

Relative Addressing R = Program counter, PC EA = A + (PC) i.e. get operand from A cells from current location pointed to by PC Exploits locality of reference If memory references are near to the instruction being executed, this saves address bits in the instruction

Base-Register Addressing The referenced register (R) may contain – A main memory address – Displacement from that address R may be explicit or implicit Exploits locality of reference

Indexed Addressing just opposite of base register addressing Address field contains main memory address A = base Register contains displacement R = displacement EA = A + R Good for accessing arrays

Stack Addressing Stack is a reserved block of locations Stack pointer holds the address of the top of the stack. It is a form of implied addressing: as no memory reference is required but operate on the top of the stack

Instruction Formats Defines the layout of bits in an instruction Includes opcode & (implicit or explicit) operand(s) Usually more than one instruction format in an instruction set

Common Instruction Formats Four of them are a)Zero-address instruction b)One-address instruction c)Two-address instruction d)Three-address instruction

Zero-address instruction 0 (zero) addresses – All addresses implicit – Example: stack push a push b pop c

One-address instruction 1 address – Implicit second address : Usually a register (accumulator) – E.g. Add C // C=C+A(accumulator)

Two-address instruction 2 addresses – One address doubles as operand and result – a = a + b – Reduces length of instruction – Requires temporary storage to hold some results

Three-address instruction 3 addresses – Operand 1, Operand 2, Result – a = b + c; – May be a forth - usually implicit – Not common – Needs very long words to hold everything