CIS429/529 ISA - 1 Instruction Set Architectures Classification Addressing Modes Types of Instructions Encoding Instructions MIPS64 Instruction Set.

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

Review of the MIPS Instruction Set Architecture. RISC Instruction Set Basics All operations on data apply to data in registers and typically change the.
CEG3420 Lec2.1 ©UCB Fall 1997 ISA Review CEG3420 Computer Design Lecture 2.
1 Instruction Set Principles and Examples 游象甫. 2 Outline Introduction Classifying instruction set architectures Memory addressing Type and size of operands.
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.
Lecture 3: Instruction Set Principles Kai Bu
EECC551 - Shaaban #1 Lec # 2 Fall Instruction Set Architecture (ISA) “... the attributes of a [computing] system as seen by the programmer,
INSTRUCTION SET ARCHITECTURES
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
ELEN 468 Advanced Logic Design
ITCS 3181 Logic and Computer Systems 2015 B. Wilkinson slides3.ppt Modification date: March 16, Addressing Modes The methods used in machine instructions.
1 Today’s lecture  Last lecture we started talking about control flow in MIPS (branches)  Finish up control-flow (branches) in MIPS —if/then —loops —case/switch.
The University of Adelaide, School of Computer Science
Informationsteknologi Saturday, September 29, 2007 Computer Architecture I - Class 41 Today’s class More assembly language programming.
1 Review Chpt 2 and 3 Five components of a computer Input Output Memory Arithmetic & Logic Unit (ALU) Control Two types of information Data and instruction.
CIS429.S00: Lec6- 1 Addressing Modes There are a variety of ways a machine instruction can specify an address in memory. Effective address - the actual.
COMP381 by M. Hamdi 1 Instruction Set Architectures.
Execution of an instruction
Memory - Registers Instruction Sets
S. Barua – CPSC 440 CHAPTER 2 INSTRUCTIONS: LANGUAGE OF THE COMPUTER Goals – To get familiar with.
RISC Concepts, MIPS ISA and the Mini–MIPS project
Recap.
CIS429.S00: Lec7- 1 Instruction Set Architectures (cont) History Addressing Modes --> Types of Instructions --> Encoding Instructions --> DLX Instruction.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
MIPS Instruction Set Advantages
1  2004 Morgan Kaufmann Publishers Instructions: bne $t4,$t5,Label Next instruction is at Label if $t4≠$t5 beq $t4,$t5,Label Next instruction is at Label.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
1 Copyright © 2011, Elsevier Inc. All rights Reserved. Appendix A Authors: John Hennessy & David Patterson.
1 Appendix B Classifying Instruction Set Architecture Memory addressing mode Operations in the instruction set Control flow instructions Instruction format.
Memory and Addressing How and Where Information is Stored.
Computer Architecture Instruction Set Architecture Lynn Choi Korea University.
Classifying GPR Machines TypeNumber of Operands Memory Operands Examples Register- Register 30 SPARC, MIPS, etc. Register- Memory 21 Intel 80x86, Motorola.
1. 2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together.
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 Architecture and Organization
Lecture 04: Instruction Set Principles Kai Bu
©These slides may be freely used, distributed, and incorporated into other works. 1 Addressing Modes For speed… we want fixed-size instructions, and they.
Computer Organization Rabie A. Ramadan Lecture 3.
MIPS Instructions Instructions: Language of the Machine
Processor Design CT101 – Computing Systems. Content GPR processor – non pipeline implementation Pipeline GPR processor – pipeline implementation Performance.
MIPS Instruction Set Architecture Prof. Sirer CS 316 Cornell University.
COMPUTER ORGANIZATION LECTURE 3: ISA YASSER MOHAMMAD.
Computer Organization Instructions Language of The Computer (MIPS) 2.
CS203 – Advanced Computer Architecture
Computer Architecture Instruction Set Architecture
MIPS Instruction Set Advantages
A Closer Look at Instruction Set Architectures
ELEN 468 Advanced Logic Design
COMP2121: Microprocessors and Interfacing
RISC Concepts, MIPS ISA Logic Design Tutorial 8.
Prof. Sirer CS 316 Cornell University
A Closer Look at Instruction Set Architectures: Expanding Opcodes
Lecture 04: Instruction Set Principles
Appendix A Classifying Instruction Set Architecture
The University of Adelaide, School of Computer Science
MIPS History MIPS is a computer family
MIPS History MIPS is a computer family
Part II Instruction-Set Architecture
MIPS Assembly.
Computer Instructions
Prof. Sirer CS 316 Cornell University
Instruction Set Principles
Evolution of ISA’s ISA’s have changed over computer “generations”.
MIPS Instruction Set Architecture
MIPS Assembly.
MIPS History MIPS is a computer family
Computer Organization
9/13/
Presentation transcript:

CIS429/529 ISA - 1 Instruction Set Architectures Classification Addressing Modes Types of Instructions Encoding Instructions MIPS64 Instruction Set

CIS429/529 ISA - 2 ISA Classification (Fig. 2.1)

CIS429/529 ISA - 3 Addressing Modes There are a variety of ways a machine instruction can specify an address in memory. Effective address - the actual address used to access memory. May not be the address that appears in the instruction but is computed from the instruction address Impacts of having a variety of addr. modes: –can significantly reduce number of instructions needed –can increase average CPI –more complexity for hardware design and implementation

CIS429/529 ISA - 4 Usage of memory addressing modes (Fig. 2.7)

CIS429/529 ISA - 5 Displacement addressing Add R4, 100(R1) Add R4 R1 100 ??? bits for this field of the instruction Useful for accessing nearby data How large should the displacement field be? n bits ==> 0 to 2^n if all positive ==> 0 to 2^(n-1) if both positive and negative because one bit is used for the sign

CIS429/529 ISA - 6 Displacements used in benchmarks (Fig. 2.8) x axis gives number of bits data is from a machine with max. 16 bit displacement

CIS429/529 ISA - 7 Immediate addressing ADDI R1,R2, #2 ADDI R1 R2 2 ??? bits for the immediate field Useful for many instructions that need a small constant How large should the immediate field be? n bits ==> 0 to 2^n if all positive ==> 0 to 2^(n-1) if both positive and negative because one bit is used for the sign

CIS429/529 ISA - 8 Immediate data usage in benchmarks (Fig. 2.9) Heavy use of immediate data

CIS429/529 ISA - 9 Immediate data usage in benchmarks Data is from a machine limited to 16 bit immediates

CIS429/529 ISA - 10 Types of instructions (by operation ) arithmetic/logical data movement control floating point decimal string graphics

CIS429/529 ISA - 11 Top ten 80x86 instructions

CIS429/529 ISA - 12 Control flow instructions conditional branchesBEQZ HOME unconditional branches or jumps JMP ROPE procedure call procedure return Target of the branch can be specified as explicit directJMP ROPE explicit indirectJMP (R1) displacementJMP 100(R2) PC relative JMP 100(PC)

CIS429/529 ISA - 13 Use of branches in benchmarks (Fig. 2.19)

CIS429/529 ISA - 14 Displacements used in branches (Fig. 2.20) 4-8 bits captures most of the displacements

CIS429/529 ISA - 15 Instruction encoding issues total size(s) of instructions (halfword, word, doubleword) number of fields, number of operands number of bits for each field Dependent on: number of registers types of instructions (operations) addressing modes etc.

CIS429/529 ISA - 16 Basic varieties of instruction encoding: variable, fixed, hybrid (Fig. 2.23)

CIS429/529 ISA - 17 MIPS64 Architecture Registers bit general purpose registers R0, R1, R2 ….. R bit floating points registers F0, F1, … F31

CIS429/529 ISA - 18 MIPS64 Architecture (cont) Data types Integer data types byte (8 bits), halfword (16 bits), word (32 bits), doubleword (64 bits) Floating point data types single precision (32 bits) double precision (64 bits)

CIS429/529 ISA - 19 MIPS64 Architecture (cont) Addressing modes (looks like four, only two) Immediate - 16 bits ADD R1, R2,#3 Displacement - 16 bits LW R1,30(R2) Registered deferred/indirect - use 0 displacement LW R1,0(R2) Absolute - use R0 as the base, R0 = 0 LW R1,508(R0)

CIS429/529 ISA - 20 MIPS64 Instruction Format (Fig. 2.27)

CIS429/529 ISA - 21 Deciphering MIPS64 notation LD R1,30(R2) Regs[R1] <-- 64 Mem[30 + Regs[R2]] LH R1,40(R3) Regs[R1] <-- 64 (Mem[40 + Regs[R3] 0 )**48 ## Mem[40 + Regs[R3]] ## Mem[41 + Regs[R3]] Load halfword Duplicate the sign bit, concatenate with the byte at Mem[40 + Regs[R3]] and concatenate with the byte at Mem[41 + Regs[R3]]. This makes a total of 64 bits.

CIS429/529 ISA - 22 Deciphering MIPS64 notation JAL NAME Regs[R31] <-- PC + 4 save return address PC <-- NAME ((PC + 4) - 2 **27 <= NAME < ((PC + 4) + 2**27 ) Check bounds on value of NAME since this uses PC relative addressing Used for subroutine calls