1. 2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together.

Slides:



Advertisements
Similar presentations
Review of the MIPS Instruction Set Architecture. RISC Instruction Set Basics All operations on data apply to data in registers and typically change the.
Advertisements

Lecture 5: MIPS Instruction Set
1 Procedure Calls, Linking & Launching Applications Lecture 15 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 5 MIPS ISA & Assembly Language Programming.
ELEN 468 Advanced Logic Design
Chapter 2 Instructions: Language of the Computer
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
Lec 9Systems Architecture1 Systems Architecture Lecture 9: Assemblers, Linkers, and Loaders Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Comp Sci instruction encoding 1 Instruction Encoding MIPS machine language Binary encoding of instructions MIPS instruction = 32 bits Three instruction.
The Processor: Datapath & Control
MIPS Architecture CPSC 321 Computer Architecture Andreas Klappenecker.
Instruction Representation II (1) Fall 2007 Lecture 10: Instruction Representation II.
Computer Architecture CPSC 321 E. J. Kim. Overview Logical Instructions Shifts.
CPSC CPSC 3615 Computer Architecture Chapter 3 Instructions and Addressing (Text Book: Chapter 5)
Computer Structure - The Instruction Set (2) Goal: Implement Functions in Assembly  When executing a procedure (function in C) the program must follow.
1 Lecture 2: MIPS Instruction Set Today’s topic:  MIPS instructions Reminder: sign up for the mailing list cs3810 Reminder: set up your CADE accounts.
RISC Concepts, MIPS ISA and the Mini–MIPS project
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
Chapter Five The Processor: Datapath and Control.
ECE 232 L5 Assembl.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 5 MIPS Assembly.
Feb 18, 2009 Lecture 4-1 instruction set architecture (Part II of [Parhami]) MIPS assembly language instructions MIPS assembly programming.
ISA-2 CSCE430/830 MIPS: Case Study of Instruction Set Architecture CSCE430/830 Computer Architecture Instructor: Hong Jiang Courtesy of Prof. Yifeng Zhu.
IT253: Computer Organization Lecture 5: Assembly Language and an Introduction to MIPS Tonga Institute of Higher Education.
Memory and Addressing How and Where Information is Stored.
Computer Architecture Instruction Set Architecture Lynn Choi Korea University.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
1  1998 Morgan Kaufmann Publishers Machine Instructions: Language of the Machine Lowest level of programming, control directly the hardware Assembly instructions.
Chapter 10 The Assembly Process. What Assemblers Do Translates assembly language into machine code. Assigns addresses to all symbolic labels (variables.
April 23, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Assemblers, Linkers, and Loaders * Jeremy R. Johnson Mon. April 23,
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Computer Architecture (CS 207 D) Instruction Set Architecture ISA.
CS2100 Computer Organisation The Processor: Datapath (AY2015/6) Semester 1.
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
 1998 Morgan Kaufmann Publishers MIPS arithmetic All instructions have 3 operands Operand order is fixed (destination first) Example: C code: A = B +
FAMU-FSU College of Engineering 1 Computer Architecture EEL 4713/5764, Spring 2006 Dr. Michael Frank Module #6 – MIPS ISA, part 1: Instructions and Addressing.
Chapter 2 CSF 2009 The MIPS Assembly Language. Stored Program Computers Instructions represented in binary, just like data Instructions and data stored.
Computer Organization Instructions Language of The Computer (MIPS) 2.
D ATA P ATH OF A PROCESSOR (MIPS) Module 1.1 : Elements of computer system UNIT 1.
Computer Organization CS224 Fall 2012 Lessons 7 and 8.
Computer Organization Rabie A. Ramadan Lecture 3.
Arrays in MIPS Assembly Computer Organization and Assembly Language: Module 6.
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Instruction Set Architecture Chapter 3 – P & H. Introduction Instruction set architecture interface between programmer and CPU Good ISA makes program.
Lecture 16: 10/29/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
MIPS Processor.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
CS 230: Computer Organization and Assembly Language
Computer Architecture Instruction Set Architecture
COMPUTER ARCHITECTURE & OPERATIONS I
Computer Organization and Design Instruction Sets - 2
ELEN 468 Advanced Logic Design
Computer Organization and Design Instruction Sets - 2
Morgan Kaufmann Publishers
RISC Concepts, MIPS ISA Logic Design Tutorial 8.
Computer Organization and Design Instruction Sets
Instruction Execution in Simple Computer
CSCI206 - Computer Organization & Programming
Appendix A Classifying Instruction Set Architecture
MISP Assembly.
ECE232: Hardware Organization and Design
Instruction encoding The ISA defines Format = Encoding
Part II Instruction-Set Architecture
MIPS Assembly.
Systems Architecture I
MIPS Assembly.
7/6/
9/13/
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

1

2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together with parts of machine and their function that must be mastered by a user to produce correct, compact, and fast program.

3 Figure 5.1 Memory and processing subsystems for MiniMIPS. 5.1 Abstract View of Hardware

4 Figure 5.2 Registers and data sizes in MiniMIPS.

5 Figure 5.3 A typical instruction for MiniMIPS and steps in its execution. 5.2 Instruction Formats

6 Figure 5.4 MiniMIPS instructions come in only three formats: register (R), immediate (I), and jump (J).

7 Figure 5.5 The arithmetic instructions add and sub have a format that is common to all two-operand ALU instructions. For these, the fn field specifies the arithmetic/logic operation to be performed. add: 32 sub: 34 and: 36 or: 37 and: 38 or: Simple Arithmetic and Logic Instruction

8 Figure 5.6 Instructions such as addi allow us to perform an arithmetic or logic operation for which one operand is a small constant. In the case of that one operand of an arithmetic or logical operation is a constant. addi: 8 andi: 12 ori: 13 xori: 14 Constant: to 32767

9 Figure 5.7 MiniMIPS lw and sw instructions and their memory addressing convention that allows for simple access to array elements via a base address and an offset (offset = 4i leads us to the ith word). 5.4 Load and Store Inst Instructions lw: 35 sw: 43

10 Figure 5.8 The lui instruction allows us to load an arbitrary 16-bit value into the upper half of a register while setting its lower half to 0s. Load upper immediate lui: 15 Application: to make a 32-bit constant.

11 Figure 5.9 The jump instruction j of MiniMIPS is a J -type instruction which is shown along with how its effective target address is obtained.The jump register (jr) instruction is R-type, with its specified register often being $ra. 5.5 Jump and Branch Instructions j: 2 jr: 8 (go to loc whose address is in $ra) 4 high-order bits from PC (pseudodirect addressing)

12 Branch less than zero Set less than Memory address: Multiplied by 4 + PC slt $s1, $s2, $s3# if ($s2)<($s3), set $s1 to 1, else to 0. slti $s1, $s2, 61# if ($s2)<61, set $s1 to 1, else to 0.

Address Modes Addressing mode is the method by which the location of an operand is specified within an instruction e.g. ja1 in section 6.1 e.g. addi, andi, ori, xori e.g. lw, sw e.g. add, and, or, xor, nor e.g. j

14 Implied addressing: operand comes from, or result goes to, a predefined place that is not explicitly specified in the instruction. E.g., ja1 (in section 6.1) Immediate addressing: operand if given in the instruction itself. E.g., addi, andi, ori, xori. Register addressing: operand is taken from, or result placed in, a specified register. Base addressing: operand is in memory and its location is computed by adding an offset (16-bit signed integer) to the contents of a specified base register. E.g., lw, sw. PC-relative addressing: same as base addressing, but with the register always being the program counter and the offset appended with two 0s at the right end. Pseudodirect addressing: the operand address is supplied as part of instruction, e.g., j

15 Table 5.1 The 20 MiniMIPS instructions covered in Chapter 5.