Instructions: Language of the Computer

Similar documents
Instructions: Language of the Computer

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

Chapter 2A Instructions: Language of the Computer

Math 230 Assembly Programming (AKA Computer Organization) Spring 2008

Computer Organization MIPS ISA

Chapter 2: Instructions:

Instructions: Language of the Computer

Chapter 1. Computer Abstractions and Technology. Lesson 3: Understanding Performance

Announcements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls

Instructions: MIPS ISA. Chapter 2 Instructions: Language of the Computer 1

CS31001 COMPUTER ORGANIZATION AND ARCHITECTURE. Debdeep Mukhopadhyay, CSE, IIT Kharagpur. Instructions and Addressing

MIPS Processor Overview

COMPSCI 313 S Computer Organization. 7 MIPS Instruction Set

Chapter 2. Instructions: Language of the Computer. HW#1: 1.3 all, 1.4 all, 1.6.1, , , , , and Due date: one week.

MIPS%Assembly% E155%

EN164: Design of Computing Systems Lecture 09: Processor / ISA 2

ECE232: Hardware Organization and Design. Computer Organization - Previously covered

CS222: MIPS Instruction Set

Lecture 2. Instructions: Language of the Computer (Chapter 2 of the textbook)

Course Administration

ECE 486/586. Computer Architecture. Lecture # 7

CSCI 402: Computer Architectures. Instructions: Language of the Computer (1) Fengguang Song Department of Computer & Information Science IUPUI

Instruction Set Architectures Part I: From C to MIPS. Readings:

Computer Architecture

Chapter 2. Instruction Set Architecture (ISA)

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

Instruction Set Architecture. "Speaking with the computer"

CENG3420 L03: Instruction Set Architecture

Chapter 4. The Processor. Computer Architecture and IC Design Lab

CS3350B Computer Architecture MIPS Introduction

Unsigned Binary Integers

Unsigned Binary Integers

CENG3420 Lecture 03 Review

CS3350B Computer Architecture

Lecture 4: MIPS Instruction Set

Control Instructions. Computer Organization Architectures for Embedded Computing. Thursday, 26 September Summary

Control Instructions

MIPS and QTSPIM Recap. MIPS Architecture. Cptr280. Dr Curtis Nelson. Cptr280, Autumn

Chapter 3 MIPS Assembly Language. Ó1998 Morgan Kaufmann Publishers 1

CS/COE1541: Introduction to Computer Architecture

CS222: Dr. A. Sahu. Indian Institute of Technology Guwahati

CSEE 3827: Fundamentals of Computer Systems

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

MIPS History. ISA MIPS Registers

CSCI 402: Computer Architectures. Instructions: Language of the Computer (1) Fengguang Song Department of Computer & Information Science IUPUI

101 Assembly. ENGR 3410 Computer Architecture Mark L. Chang Fall 2009

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

CPSC 330 Computer Organization

Introduction to the MIPS. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

Levels of Programming. Registers

Today s topics. MIPS operations and operands. MIPS arithmetic. CS/COE1541: Introduction to Computer Architecture. A Review of MIPS ISA.

MIPS Datapath. MIPS Registers (and the conventions associated with them) MIPS Instruction Types

ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design

Reduced Instruction Set Computer (RISC)

ECE369. Chapter 2 ECE369

Instruction Set Architecture part 1 (Introduction) Mehran Rezaei

Instructions: MIPS arithmetic. MIPS arithmetic. Chapter 3 : MIPS Downloaded from:

Chapter 2. lw $s1,100($s2) $s1 = Memory[$s2+100] sw $s1,100($s2) Memory[$s2+100] = $s1

Five classic components

Architecture I. Computer Systems Laboratory Sungkyunkwan University

5/17/2012. Recap from Last Time. CSE 2021: Computer Organization. The RISC Philosophy. Levels of Programming. Stored Program Computers

Rechnerstrukturen. Chapter 2. Instructions: Language of the Computer

Recap from Last Time. CSE 2021: Computer Organization. Levels of Programming. The RISC Philosophy 5/19/2011

ECE 154A Introduction to. Fall 2012

ECE232: Hardware Organization and Design

Machine Language Instructions Introduction. Instructions Words of a language understood by machine. Instruction set Vocabulary of the machine

CS3350B Computer Architecture MIPS Instruction Representation

Topic Notes: MIPS Instruction Set Architecture

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

MIPS R-format Instructions. Representing Instructions. Hexadecimal. R-format Example. MIPS I-format Example. MIPS I-format Instructions

EC 413 Computer Organization

EN164: Design of Computing Systems Topic 03: Instruction Set Architecture Design

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

Chapter 2. Instructions: Language of the Computer. Adapted by Paulo Lopes

Course Administration

Reduced Instruction Set Computer (RISC)

Computer Organization and Components

Instruction Set Architecture

MIPS ISA and MIPS Assembly. CS301 Prof. Szajda

Overview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2)

Chapter 2. Computer Abstractions and Technology. Lesson 4: MIPS (cont )

Thomas Polzer Institut für Technische Informatik

Chapter 2. Instructions:

MIPS ISA. 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support

EEC 581 Computer Architecture Lecture 1 Review MIPS

MIPS Instruction Set Architecture (1)

Computer Architecture. MIPS Instruction Set Architecture

Lecture 3: Instruction Set Architecture

Computer Architecture. Lecture 2 : Instructions

Lecture Topics. Announcements. Today: The MIPS ISA (P&H ) Next: continued. Milestone #1 (due 1/26) Milestone #2 (due 2/2)

Chapter 3. Instructions:

Lecture 4: Review of MIPS. Instruction formats, impl. of control and datapath, pipelined impl.

Part II Instruction-Set Architecture. Jan Computer Architecture, Instruction-Set Architecture Slide 1

Computer Architecture

Lecture 3 Machine Language. Instructions: Instruction Execution cycle. Speaking computer before voice recognition interfaces

MIPS (SPIM) Assembler Syntax

Review. Lecture #9 MIPS Logical & Shift Ops, and Instruction Representation I Logical Operators (1/3) Bitwise Operations

Transcription:

CS359: Computer Architecture Instructions: Language of the Computer Yanyan Shen Department of Computer Science and Engineering 1

The Language a Computer Understands Word a computer understands: instruction Vocabulary of all words a computer understands: instruction set (aka instruction set architecture or ISA) Different computers may have different vocabularies (i.e., different ISAs) iphone (ARM) not same as Macbook (x86) Or the same vocabulary (i.e., same ISA) iphone and ipad computers have same instruction set (ARM) Instructions are represented as numbers and, as such, are indistinguishable from data 2

MIPS Instruction Fields MIPS fields are given names to make them easier to refer to op rs rt rd shamt funct op 6-bits opcode that specifies the operation rs 5-bits register file address of the first source operand rt 5-bits register file address of the second source operand rd 5-bits register file address of the result s destination shamt 5-bits shift amount (for shift instructions) funct 6-bits function code augmenting the opcode 3

MIPS (RISC) Design Principles Simplicity favors regularity fixed size instructions small number of instruction formats opcode always the first 6 bits Smaller is faster limited instruction set limited number of registers in register file limited number of addressing modes Make the common case fast arithmetic operands from the register file (load-store machine) allow instructions to contain immediate operands Good design demands good compromises three instruction formats 4

MIPS-32 ISA Instruction Categories Computational Load/Store Jump and Branch Floating Point Memory Management Special Registers R0 - R31 PC HI LO 3 Instruction Formats: all 32 bits wide op op op rs rt rd sa funct rs rt immediate jump target R format I format J format 5

MIPS ISA Design MIPS Instruction Set has 32 integer registers MIPS registers are 32 bits wide MIPS calls this quantity a word Some computers use 16-bit or 64-bit wide words E.g., Intel 8086 (16-bit), MIPS64 (64-bit) 6

MIPS Register File Holds thirty-two 32-bit registers Two read ports One write port Registers are Faster than main memory - Read/write port increase impacts speed quadratically Easier for a compiler to use - e.g., (A*B) (C*D) (E*F) can do multiplies in any order Can hold variables so that src1 addr src2 addr dst addr write data - code density improves (since register are named with fewer bits than a memory location) 5 5 5 32 Register File 32 bits 32 location s 32 32 write control src1 data src2 data 7

Aside: MIPS Register Convention Name Register Usage Number $zero 0 constant 0 (hardware) $at 1 reserved for assembler $v0 - $v1 2-3 returned values $a0 - $a3 4-7 arguments $t0 - $t7 8-15 temporaries $s0 - $s7 16-23 saved values $t8 - $t9 24-25 temporaries $gp 28 global pointer $sp 29 stack pointer $fp 30 frame pointer $ra 31 return addr (hardware) 8

MIPS Arithmetic Instructions MIPS assembly language arithmetic statement add $t0, $s1, $s2 sub $t0, $s1, $s2 Each arithmetic instruction performs one operation Each specifies exactly three operands that are all contained in the register file ($t0,$s1,$s2) destination source1 op source2 Instruction Format (R format) op rs rt td sa funct 9