The ISA Level The Instruction Set Architecture (ISA) is positioned between the microarchtecture level and the operating system level.  Historically, this.

Slides:



Advertisements
Similar presentations
INSTRUCTION SET ARCHITECTURES
Advertisements

 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
Computer Organization and Architecture
Microprocessors General Features To be Examined For Each Chip Jan 24 th, 2002.
Computer Organization and Architecture
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
IA-32 Processor Architecture
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
PC hardware and x86 3/3/08 Frans Kaashoek MIT
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
CS2422 Assembly Language & System Programming November 28, 2006.
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Microprocessors Introduction to ia32 Architecture Jan 31st, 2002.
Informationsteknologi Friday, November 16, 2007Computer Architecture I - Class 111 Today’s class Instruction set architecture.
ICS312 Set 3 Pentium Registers. Intel 8086 Family of Microprocessors All of the Intel chips from the 8086 to the latest pentium, have similar architectures.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 2: 80386DX Internal Architecture & Data Organization.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
The ISA Level The Instruction Set Architecture (ISA) is positioned between the microarchtecture level and the operating system level.  Historically, this.
Processor Types And Instruction Sets Barak Perelman CS147 Prof. Lee.
An Introduction to 8086 Microprocessor.
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 2: IA-32 Processor Architecture (c) Pearson Education, All rights reserved. You.
6.828: PC hardware and x86 Frans Kaashoek
The Instruction Set Architecture Level Dept. of Computer Science Virginia Commonwealth University.
Instruction Set Architecture
Machine Instruction Characteristics
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
The x86 Architecture Lecture 15 Fri, Mar 4, 2005.
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.
Computer Architecture And Organization UNIT-II General System Architecture.
Computer Architecture and Organization
1 ICS 51 Introductory Computer Organization Fall 2009.
Computer Architecture Lecture 03 Fasih ur Rehman.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
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.
1 Microprocessors CSE – 341 EEE – 365 \\server2\tsr\Spring\CSE\CSE341
Chapter 2 The Microprocessor Architecture Microprocessors prepared by Dr. Mohamed A. Shohla.
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Computer Organization 1
Internal Programming Architecture or Model
The Microprocessor & Its Architecture A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
Chapter Overview General Concepts IA-32 Processor Architecture
Instruction Set Architectures
Assembly language.
x86 Processor Architecture
A Closer Look at Instruction Set Architectures
Microprocessor Systems Design I
A Closer Look at Instruction Set Architectures
Basic Microprocessor Architecture
Homework Reading Continue work on mp1
COAL Chapter 1,2,3.
THE sic mACHINE CSCI/CMPE 3334 David Egle.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
CS 301 Fall 2002 Computer Organization
The Microprocessor & Its Architecture
Computer Architecture CST 250
Introduction to Microprocessor Programming
Computer Operation 6/22/2019.
Computer Architecture and System Programming Laboratory
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

The ISA Level The Instruction Set Architecture (ISA) is positioned between the microarchtecture level and the operating system level.  Historically, this was the only level.  It is the interface between the software and the hardware.  Programs written in high-level languages (C, C++, FORTRAN 90, etc.) are compiled into a common intermediate form - the ISA level - which the hardware executes directly.

The ISA Level

 How do we decide what the ISA should support? Ideally, ask both hardware and software engineers the features they would like to have and reach a compromise. In practice, the most important feature is backward compatibility. A good ISA should should define a set of instructions that can be implemented effectively in current and future technologies. It should also provide a clean target for compiled code.

The ISA Level  For some architectures, the ISA level is specified by a formal defining document (e.g. ARM v7). This allows different implementations of the same architecture. Such defining documents contain normative sections, which impose requirements, and informative sections, that are intended to help the reader but are not part of the formal specification. A Core i7 ISA reference is available at

The ISA Level  There are at least two modes at the ISA level: Kernel mode is intended to run the operating system and allows all instructions to be executed. User mode is intended to run application programs and does not permit certain sensitive instructions to be executed.  All computers divide memory up into cells that have consecutive addresses. The most common cell size is 8 bits (called a byte). The reason for using 8 bits is that ASCII codes are 7 bits (add one bit for parity).

Memory Models  Bytes are grouped into 4-byte (32 bit) or 8-byte (64 bit) words with instructions available for manipulating entire words.  Many architectures require words to be aligned on their natural boundaries. This allows more efficient memory operations. Reading words at arbitrary addresses requires extra logic on the chip, making it bigger and more expensive. The Core i7 does not require alignment in order to retain compatibility with the 8088, however unaligned references require two memory references.

The ISA Level

Registers All computers have some registers visible at the ISA level. These  control execution of the program  hold temporary results  are used for other purposes ISA level registers can be divided into two categories:  special-purpose (PC, SP, etc.)  general-purpose (local variables, etc.)

Registers  On some machines the general-purpose registers are completely symmetric and interchangeable.  It is common for compilers and operating systems to adopt conventions about how the general-purpose registers are used.  Many special-purpose registers are available only in kernel mode (those that control cache, I/O devices and other hardware).

Registers One control register that is a hybrid kernel/user is the flags register or PSW (Program Status Word). This register contains various condition bits:  N - Set when the result was Negative  Z - Set when the result was Zero  V - Set when the result caused an oVerflow  C - Set when the result caused a Carry out of the leftmost bit  A - Set when there was a carry out of bit 3 (Auxiliary carry)  P - Set when the result had even parity

Core i7 ISA Level  The Core i7 has three operating modes, two of which make it look like an In real mode, features added since the 8088 are turned off. An application error causes the machine to crash.  Virtual 8086 mode makes it possible to run old 8088 programs in a protected way. A special isolated environment that acts like an 8088 is created, except that if the program crashes, the operating system is informed. Used when an MS-DOS window is opened.  Protected mode has four privilege levels controlled by bits in the PSW

Core i7 Registers  The first four registers are general-purpose: EAX is the main arithmetic register. EBX is good for holding pointers ECX plays a role in looping EDX is needed for multiplication and division (holding half of the 64-bit products and dividends)  These registers contain 8- and 16-bit registers in the low-order bits for manipulation of 8- and 16-bit quantities, respectively.

Core i7 Registers  The next three registers are general-purpose: ESI and EDI hold pointers into memory, especially for the hardware string manipulation routines. EBP is a pointer register (typically to the base of the current stack frame, like LV in JVM). ESP is the stack pointer.  CS through GS are segment registers.  EIP is the program counter  EFLAGS is the PSW.

Core i7 Primary Registers

Overview of the OMAP4430 ARM ISA Level The version 7 ARM’s general registers.

Overview of the ATmega168 AVR ISA Level On-chip register and memory organization for the ATmega168

Core i7 Data Types  The Core i7 supports two’s complement integers, unsigned integers, binary coded decimal numbers, and IEEE 754 floating-point numbers  It handles 8 and 16 bit integers as well.  64-bit mode with 64-bit registers and operations  Operands do not have to be aligned in memory, but better performance is obtained if they are.  There are also instructions for manipulating 8- bit ASCII character strings: copying and searching.

Core i7 Numeric Data Types

Data Types on the OMAP4430 ARM CPU

Data Types on the ATmega168 AVR CPU

Instruction Formats An instruction consists of an opcode, usually with some additional information such as where operands come from, and where results go. The general subject of specifying where the operands are is called addressing. Several possible formats for level 2 instructions are shown on the next slide.

Common Instruction Formats

Instruction Formats On some machines, all instructions have the same length; on others there may be many different lengths. Instructions may be shorter than, the same length as, or longer than the word length.  Having a single instruction length is simpler and makes decoding easier, but is less efficient.

Common Instruction Formats

Expanding Opcodes  We will now examine tradeoffs involving both opcodes and addresses.  Consider an (n + k) bit instruction with a k-bit opcode and a single n-bit address. This instruction allows 2 k different operations and 2 n addressable memory cells. Alternatively, the same n + k bits could be broken up into a (k - 1) bit opcode and an (n + 1) bit address, meaning half as many instructions and either twice as much addressable memory or the same amount of memory with twice the resolution.

Expanding Opcodes  The concept of a expanding opcode can best be seen through an example.  Consider a machine in which instructions are 16 bits long and addresses are 4 bits long. This might be reasonable on a machine that has 16 registers on which all arithmetic operations take place. One design would be a 4-bit opcode and three addresses in each instruction, giving 16 three- address instructions.

Expanding Opcodes

 However, if the designers need 15 three-address instructions, 14 two-address instructions, 31 one-address instructions, and 16 instructions with no address at all, they can use opcodes 0 to 14 as three-address instructions but interpret opcode 15 differently. Opcode 15 means that the opcode is contained in bits 8 to 15 instead of 12 to 15.

Expanding Opcodes

Core i7 Instruction Formats

OMAP4430 ARM CPU Instruction Formats The 32-bit ARM instruction formats.

ATmega168 AVR Instruction Formats