Operand Addressing And Instruction Representation Cs355-Chapter 6.

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

CPU Review and Programming Models CT101 – Computing Systems.
CS 6461: Computer Architecture Instruction Set Architecture Instructor: Morris Lancaster.
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.
There are two types of addressing schemes:
Instruction Set Architecture Classification According to the type of internal storage in a processor the basic types are Stack Accumulator General Purpose.
Computer Organization and Architecture
CSC 3650 Introduction to Computer Architecture Time: 3:30 to 6:30Meeting Days: WLocation: Oxendine 1237B Textbook: Essentials of Computer Architecture,
Instruction Set Architecture
Operand And Instructions Representation By Dave Maung.
10.2 Characteristics of Computer Memory RAM provides random access Most RAM is volatile.
From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved.
6.1 Introduction Two details related to instructions –The way instructions are specified –The ways that operands can be specified.
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
5.2 Mathematical Power, Convenience, and Cost The set of operations represents a tradeoff among the cost of the hardware, the convenience for a programmer,
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved. 7.2 A Central Processor.
Processor Organization and Architecture Module III.
Operand Addressing and Instruction Representation
Parul Polytechnic Institute Subject Code : Name Of Subject : Microprocessor and assembly language programming Name of Unit : Introduction to Microprossor.
Lecture 17 Today’s Lecture –Instruction formats Little versus big endian Internal storage in the CPU: stacks vs. registers Number of operands and instruction.
Machine Instruction Characteristics
Instruction Set Architecture
1 Copyright © 2011, Elsevier Inc. All rights Reserved. Appendix A Authors: John Hennessy & David Patterson.
CS 147 June 13, 2001 Levels of Programming Languages Svetlana Velyutina.
Instruction Set Architecture Basics. Our Progress Done with levels 0 and 1 Seen multiple examples of level 2 Ready for ISA general principles.
CSC 3210 Computer Organization and Programming Chapter 1 THE COMPUTER D.M. Rasanjalee Himali.
Chapter 5 A Closer Look at Instruction Set Architectures.
Chapter 5 A Closer Look at Instruction Set Architectures.
Chapter 2-2 Assembly Instructions Number Systems Number Systems Assembly Instructions Assembly Instructions Branch Branch Next Lecture Next Lecture  Addressing.
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
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.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
CS 211: Computer Architecture Lecture 2 Instructor: Morris Lancaster.
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.
Lecture 5 A Closer Look at Instruction Set Architectures Lecture Duration: 2 Hours.
Processor Types And Instruction sets Chapter- 5.
The Instruction Set Architecture. Hardware – Software boundary Java Program C Program Ada Program Compiler Instruction Set Architecture Microcode Hardware.
Chapter 2 — Instructions: Language of the Computer — 1 Memory Operands Main memory used for composite data – Arrays, structures, dynamic data To apply.
What is a program? A sequence of steps
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Instruction Set Architectures. Our Progress Done with levels 0 and 1 Seen multiple examples of level 2 Ready for ISA general principles.
Computer Architecture
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
A Closer Look at Instruction Set Architectures
A Closer Look at Instruction Set Architectures
A Closer Look at Instruction Set Architectures: Expanding Opcodes
Processor Organization and Architecture
Instruction Set Architectures
Intro to Architecture & Organization
CSCI206 - Computer Organization & Programming
The University of Adelaide, School of Computer Science
Processor Organization and Architecture
ECEG-3202 Computer Architecture and Organization
Computer Architecture
A Closer Look at Instruction Set Architectures Chapter 5
Introduction to Microprocessor Programming
CPU Structure CPU must:
Chapter 4 The Von Neumann Model
Presentation transcript:

Operand Addressing And Instruction Representation Cs355-Chapter 6

Design Issues A good ISA –Ease of implementing on current hardware –Provide clean target for compile code Choice of the number of operands in the instruction set is a matter of discussion.

Zero Operand Instructions Zero address architecture machines are called as the stack machines. The Instruction does not specify any operands. Operands are implicit. Push adds a given node to the top of the stack. Pop removes current top node of the stack and places it in the memory. Based on the Last in first out principle.

From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved.

One Operand Instruction Architecture that limit each instruction to single operand is known as 1-address design. Relies on implicit operand for each instruction to store in special register known as an accumulator.

Step to process one operand per Instruction Processor extracts the current value of the accumulator. Performs the specified operation using the extracted value and the operand. place the result back in the accumulator Ex: Add X Accumulator Accumulator + X

From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved.

Disadvantage of One Operand Per Instruction It does not allow instructions to specify two values. It requires two instructions that load the value into the accumulator and then need to store the values back in the new location

Two Operands Per Instruction Overcomes the limitation 1-address systems Using 2 address process, an operation can be applied to a specified value. It also offers data movement instructions that treat the operand as source and destination. Ex: Move Q R Copies directly from Q to R

From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved.

Three Operand Per Instruction Similar as Two Operand Per Instruction except that it can operate three input value per instruction. For processors which have multiple general purpose registers. Ex: Add X Y Z Computes Z X + Y

Operand Sources And Immediate Values Operand that specifies a source must be -A signed constant -An Unsigned constant -The content of a register -The value in a memory location

Operand Sources And Immediate Values Operand the specifies a destination must be: -A signed register -A pair of contiguous registers -A memory location

Von Neumann Bottleneck Operand addressing is the central weakness of a von Neumann architecture. memory access may become a bottleneck because instructions are stored in memory and a processor must make at least one memory per instruction. To Optimize the performance, operand must be taken from a register instead of memory.

Types of Encoding 1. Explicit Operand Encoding 2. Implicit Operand Encoding

Implicit Operand Encoding The Opcode specifies the types of operands. A processor that uses a implicit encoding contains multiple operand code for a given operation.

Disadvantage of Implicit encoding Multiple opcodes are needed for a given operation. A list of opcodes can become large, when a processor allows many types of operands.

Explicit Encoding Using Explicit can overcome the disadvantage of implicit encoding. Each operand is represented by two fields: 1. Type of Operand 2. Type of Value

From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved.

Tradeoffs in the choice of operands Ease of Programming Fewer Instructions Smaller Instructions Larger Range of Immediate Values Faster Operand Fetch and Decode Decreased Hardware size

Tradeoffs in the choice of operands Ease of Programming : We know that complex forms of operands make programming easier 3-address approach mean we do not need to code separate instructions. Fewer Instructions : Reduces the number of instruction in a program by increasing the expressive power of operands Lowers the count of instructions by increasing the number of addresses

Tradeoffs in the choice of operands Smaller Instructions : How to keep smaller Instruction? Limiting the number of operands Limiting the set of operands types Limiting maximum size of an operand keep instruction small

Tradeoffs in the choice of operands Larger Range of Immediate values : Increasing the size allows larger values because the size of a field in the operand determines the numeric range of immediate values. Disadvantage: Larger instruction results

Tradeoffs in the choice of operands Faster Operand Fetch and Decode : How to operate hardware faster? limit the number of operands limit the possible types of each operand Decreased Hardware size : How to decrease the hardware size? limits the types and complexity of operands Reduces the size of circuitry

Values in Memory Every processors include at least one instruction that allows an operand to specify value in memory Values in the operand interpreted as an memory address. This memory address is for the processor to perform memory lookup.

Advantage of memory look up Helps ease programming Helps allowing arbitrary instruction to reference memory. improves performance.

Operand Addressing Modes Instruction register is used to hold an instruction that is being decoded. A immediate value can be found in instruction register

From Essentials of Computer Architecture by Douglas E. Comer. ISBN © 2005 Pearson Education, Inc. All rights reserved.

Key Points Different type of Operand instruction Von Neumann Bottleneck. Different choice of Operand Addressing Modes