INSTRUCTION SET DESIGN

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

Chapter 8: Central Processing Unit
Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
CPU Review and Programming Models CT101 – Computing Systems.
1 (Review of Prerequisite Material). Processes are an abstraction of the operation of computers. So, to understand operating systems, one must have a.
ISA Issues; Performance Considerations. Testing / System Verilog: ECE385.
INSTRUCTION SET ARCHITECTURES
Computer Organization and Architecture
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
Microprocessors General Features To be Examined For Each Chip Jan 24 th, 2002.
Chapter 11 Instruction Sets
Operand And Instructions Representation By Dave Maung.
Execution of an instruction
6.1 Introduction Two details related to instructions –The way instructions are specified –The ways that operands can be specified.
Operand Addressing and Instruction Representation
Lecture 18 Last Lecture Today’s Topic Instruction formats
1 CSC 2405: Computer Systems II Spring 2012 Dr. Tom Way.
Dr. José M. Reyes Álamo 1.  The 80x86 memory addressing modes provide flexible access to memory, allowing you to easily access ◦ Variables ◦ Arrays ◦
Machine Instruction Characteristics
L/O/G/O The Instruction Set Chapter 9 CS.216 Computer Architecture and Organization.
Chapter 5 A Closer Look at Instruction Set Architectures.
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
Execution of an instruction
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
Operand Addressing And Instruction Representation Cs355-Chapter 6.
In1210/01-PDS 1 TU-Delft Instructions and addressing.
Instruction Sets: Addressing modes and Formats Group #4  Eloy Reyes  Rafael Arevalo  Julio Hernandez  Humood Aljassar Computer Design EEL 4709c Prof:
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Structure and Role of a Processor
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
F453 Module 8: Low Level Languages 8.1: Use of Computer Architecture.
Computer System Structures Interrupts
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
Displacement (Indexed) Stack
Basic Computer Organization and Design
William Stallings Computer Organization and Architecture 6th Edition
Interrupts and signals
MICROPROCESSOR BASED SYSTEM DESIGN
Control Unit Lecture 6.
A Closer Look at Instruction Set Architectures
Protection of System Resources
Alvaro Mauricio Peña Dariusz Niworowski Frank Rodriguez
Overview Introduction General Register Organization Stack Organization
A Closer Look at Instruction Set Architectures
A Closer Look at Instruction Set Architectures: Expanding Opcodes
William Stallings Computer Organization and Architecture 8th Edition
Computer Organization and Assembly Language (COAL)
Introduction to Micro Controllers & Embedded System Design Stored Program Machine Department of Electrical & Computer Engineering Missouri University.
Processor Organization and Architecture
Chapter 9 :: Subroutines and Control Abstraction
Chapter 8 Central Processing Unit
Processor Organization and Architecture
Direct Memory Access Disk and Network transfers: awkward timing:
ECEG-3202 Computer Architecture and Organization
Computer Architecture and the Fetch-Execute Cycle
BIC 10503: COMPUTER ARCHITECTURE
ECEG-3202 Computer Architecture and Organization
Architectural Support for OS
Computer Architecture
A Closer Look at Instruction Set Architectures Chapter 5
ECEG-3202 Computer Architecture and Organization
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Introduction to Microprocessor Programming
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Architectural Support for OS
Lecture 4: Instruction Set Design/Pipelining
Presentation transcript:

INSTRUCTION SET DESIGN

INSTRUCTION FORMATS ZERO-ADDRESS INSTRUCTION ONE-ADDRESS INSTRUCTION TWO-ADDRESS INSTRUCTION THREE-ADDRESS INSTRUCTION

DESIGN CRITERIA INSTRUCTION LENGTH MEMORY/BANDWIDTH REQUIREMENTS DECODING REQUIREMENTS TARGET ARCHITECTURE/INTER-OPERATABILITY REQUIREMENTS BIG ENDIAN/LITTLE ENDIAN FORMAT REGISTER/STACK-BASED DESIGN

ADDRESSING MODES IMMEDIATE ADDRESSING DIRECT ADDRESSING REGISTER ADDRESSING REGISTER INDIRECT ADDRESSING INDEXED ADDRESSING BASED-INDEXED ADDRESSING STACK ADDRESSING

IMMEDIATE ADDRESSING THE ADDRESS PART OF THE INSTRUCTION CONTAINS THE OPERAND ITSELF RATHER THAN AN ADDRESS OR OTHER INFORMATION DESCRIBING WHERE THE OPERAND IS. ADVANTAGES: OPERAND IS FETCHED AT SAME TIME AS INSTRUCTION, HENCE AVAILABLE FOR IMMEDIATE USE; NO EXTRA MEMORY REFERENCE REQUIRED. DISADVANTAGES: ONLY A CONSTANT CAN BE SUPPLIED THIS WAY. THE NUMBER OF VALUES IS LIMITED BY SIZE OF FIELD.

DIRECT ADDRESSING FULL MEMORY ADDRESS OF OPERAND IS SPECIFIED. DISADVANTAGES: MEMORY LOCATION IS FIXED. CAN BE USED TO ACCESS GLOBAL VARIABLES WHOSE ADDRESS IS KNOWN AT COMPILE TIME.

REGISTER ADDRESSING MOST COMMONLY USED ADDRESSING MODE SIMILAR TO DIRECT ADDRESSING; A REGISTER IS SPECIFIED INSTEAD OF A MEMORY LOCATION. ADVANTAGES: FASTER ACCESS (IN MOST CHIP ARCHITECTURES, THE REGISTERS ARE LOCATED ON THE CPU CHIP) AND SHORTER ADDRESSES.

REGISTER-INDIRECT ADDRESSING ADDRESS OF OPERAND IS CONTAINED IN A REGISTER. THIS TYPE OF ADDRESS IS CALLED POINTER.

INDEXED ADDRESSING MEMORY IS ACCESSED BY GIVING A REGISTER PLUS A CONSTANT OFFSET (INDEX).

BASED-INDEXED ADDRESSING MEMORY ADDRESS IS COMPUTED BY ADDING UP TWO REGISTERS PLUS AN (OPTIONAL) OFFSET. ONE OF THE REGISTERS IS THE BASE AND THE OTHER IS THE INDEX.

STACK ADDRESSING PUSH-POP DESIGN ADVANTAGES: SHORT INSTRUCTION LENGTH, SIMPLER INSTRUCTIONS DISADVANTAGES: LINEAR IMPLEMENTATION.n INSTRUCTIONS HAVE TO BE “POPPED” TO REACH THE n+1th INSTRUCTION

EXCEPTION HANDLING TRAPS INTERRUPTS

TRAPS TRAP: AUTOMATIC PROCEDURE CALL INITIATED BY SOME CONDITION (FLOATING-POINT OVERFLOW, FLOATING-POINT UNDERFLOW, INTERGER OVERFLOW, PROTECTION VIOLATION, UNDEFINED OPCODE, STACK OVERFLOW, DIVISION BY ZERO) CAUSED BY THE PROGRAM. HARDWARE-BASED MECHANISM. FASTER THAN SOFTWARE IMPLEMENTED EXCEPTION HANDLING.

TRAPS WHEN A TRAP OCCURS, THE FLOW OF CONTROL IS SWITCHED TO SOME FIXED MEMORY LOCATION INSTEAD OF CONTINUING IN SEQUENCE. AT THAT FIXED LOCATION IS A BRANCH TO A PROCEDURE CALLED THE TRAP HANDLER, WHICH PERFORMS SOME APPROPRIATE ACTION, SUCH AS PRINTING AN ERROR MESSAGE.

INTERRUPTS INTERRUPTS: CHANGES IN THE FLOW OF CONTROL CAUSED NOT BY THE RUNNING PROGRAM, BUT BY SOMETHING ELSE (EG., I/O) INTERRUPT STOPS THE RUNNING PROGRAM AND TRANSFERS CONTROL TO AN INTERRUPT HANDLER, WHICH PERFORMS SOME APPROPRIATE ACTION. WHEN FINISHED, THE INTERRUPT HANDLER RETURNS CONTROL TO INTERRUPTED PROGRAM. ADDITIONAL DETAILS IN SECTION 5.6.5

TRAPS VS.INTERRUPTS TRAPS ARE CAUSED DIRECTLY BY PROGRAM, WHILE INTERRUPTS ARE, AT BEST, CAUSED INDIRECTLY BY THE PROGRAM. TRAPS ARE SYNCHRONOUS WITH THE PROGRAM WHILE INTERRUPTS ARE ASYNCHRONOUS. IF THE PROGRAM IS RERUN WITH THE SAME INPUT, TRAPS WILL RECOOUR IN THE SAME PLACE EACH TIME, WHILE INTERRUPT-OCCURANCE MAY VARY.