Review: ISA. Review: Compiling Applications. Computer Architecture ELEC3441. Instruction Set Architecture (1) Computer Architecture: HW/SW Interface

Size: px
Start display at page:

Download "Review: ISA. Review: Compiling Applications. Computer Architecture ELEC3441. Instruction Set Architecture (1) Computer Architecture: HW/SW Interface"

Transcription

1 Computer Architecture ELEC3441 Instruction Set Architecture (1) 2 nd Semester, Dr. Hayden Kwok-Hay So Review: ISA n Instruction set architecture defines the user observable behavior a processor A contract between hardware and software n Usually includes: Observable state of a processor A set of machine instructions Semantics of the instruction and processor execution Department of Electrical and Electronic Engineering 2nd sem. '17-18 ENGG HS 2 Computer Architecture: HW/SW Interface Applications Review: Compiling Applications Software Compiler Assembler Applications (C/C++/Java) foo.c Operating System Instruction Set Architecture ISA Hardware Microarchitecture Processor Digital Design Circuit Design Transistors Memory I/O Assembly Code foo.s Assembler Machine Instructions foo.exe 2nd sem. '17-18 ENGG HS 3 2nd sem. '17-18 ENGG HS 4

2 Note about learning an ISA n By learning how ONE ISA is designed, you learn how various architectural tradeoffs are performed. n NOT to memorize details of a single ISA n The subset of RISC-V covered in class is very similar to MIPS: More examples in COD Will use MIPS software for simulation in some cases Version 2.0 2nd sem. '17-18 ENGG HS 5 2nd sem. '17-18 ENGG HS 6 RISC-V ISA n New RISC design from UC Berkeley n Realistic & complete ISA, but open & small n Not over-architected for a certain implementation style n 32-bit and 64-bit address space variants RV32 and RV64 n Designed to be extensible High-performance multiprocessing Efficient instruction encoding for embedded system etc n Easy to subset/extend for education/research n Complete compilation toolchain n FPGA and ASIC designs RISC-V Foundation 2nd sem. '17-18 ENGG HS 7 2nd sem. '17-18 ENGG HS 8

3 RISC-V ISA 2.0 n A revised version to the original definition n Divides into an integer base ISA + extension Floating point, etc n Revised instruction coding Make hardware design easier n Added 128-bit support n Much more n We will be using RISC-V ISA 2.0 this semester: Things may break RISC-V base integer ISA is similar to MIPS in textbook Will try cross reference between RISCV and MIPS 2nd sem. '17-18 ENGG HS 9 RISC-V ISA Overview n The riscv processor has a load-store architecture Most instructions operate on values directly to and from the register file Dedicated load/store instructions to transfer data between register file and main memory n RV32 has a 32-bit word length Fixed instruction length of 32 bits A data word is 32 bits wide RISCV-V ISA designed to allow variable length instruction code and instruction extension Not covered in this course 2nd sem. '17-18 ENGG HS 10 RV32 Processor State Base Integer Design n Register file with bit generalpurpose registers n Labeled x0 x31 x0 always contains the value 0 n Application Binary Interface (ABI) names used in assembler t0 t6 for temp variables s0 s11 for saved variables, etc n Additional Program Counter (PC) register Contains the memory address of the current executing instruction Register ABI Name x0 zero x1 ra x2 sp x3 gp x4 tp x5-7 t0-2 x8 s0/fp x9 s1 x10-17 a0-7 x18-27 s2-11 x28-31 t3-6 XLEN=32 in RV32 Integer Register-Register Operations n Basic arithmetic and bit operations: Arithmetic: ADD, SUB Bit Operations: AND, OR, XOR, SLL, SRL, SRA Comparison: SLT, SLTU n Take two source register inputs (denoted rs1, rs2) and produce one destination register output (denoted rd). 2nd sem. '17-18 ENGG HS 11 2nd sem. '17-18 ENGG HS 12

4 ADD/SUB Assembler ADD rd, rs1, rs2 SUB rd, rs1, rs2 n 3 operands: 2 sources and 1 destination n Add/sub the values of the 2 source registers (rs1, rs2) and store the result in destination register (rd) n Discard overflow n Lower 32 bits are written Semantics rd ß rs1 + rs2 rd ß rs1 - rs2 ADD/SUB Example n C code: n Assume e, f, g, h, y stored in a0, a1, a2, a3, a4 respectively. n RISCV code: y = (e + f) (g + h);! ADD t0, a0, a1! ADD t1, a2, a3! SUB a4, t0, t1!! 2nd sem. '17-18 ENGG HS 13 2nd sem. '17-18 ENGG HS 14 Bit Operations n Similar semantics to ADD/SUB instructions n Bit operations useful for masking values n E.g.: Assembler AND rd, rs1, rs2 OR rd, rs1, rs2 XOR rd, rs1, rs2 Semantics rd ß rs1 AND rs2 rd ß rs1 OR rs2 rd ß rs1 XOR rs2 # t0 ß 0xABCD0123! # t1 ß 0x000F0000! AND t2, t0, t1! # t2 contains 0x000D0000! Quick Quiz # t0 ß 0x00C00005! # t1 ß 0xFFFFFFFF! XOR t2, t0, t1! What is the value stored in t2? 2nd sem. '17-18 ENGG HS 15 2nd sem. '17-18 ENGG HS 16

5 RISC-V Instruction Encoding n Each supported instruction in the ISA must be uniquely encoded to describe its function n Any unique encoding works, but good encoding may optimize: Regularity Simple hardware decode Instruction length Extensibility n In RV32, Each instruction is 32-bit wide Favors hardware regularity over human readability 6 general types of instructions R-type, I-type, S-type, SB-type, U-type, UJ-type 2nd sem. '17-18 ENGG HS 17 R-type Instruction Encoding n So far, all the simple integer register-register operations are encoded as R-type instructions n Instructions within the same type shares similar encoding n Differentiate only by the funct3 and funct7 fields R-Type format funct7 rs2 rs1 funct3 rd opcode src2 src1 ADD/SLT/SLTU dest OP src2 src1 AND/OR/XOR dest OP src2 src1 SLL/SRL dest OP src2 src1 SUB/SRA dest OP 2nd sem. '17-18 ENGG HS 18 Quick Quiz n If the size of register file is increased to include 64 registers, how many bits are needed to encode rs1? n How would the above change affect the number of instructions representable? Immediate Operations n Very often programs need to operate on (small) numerical constants in the code e.g.: a = b + 3 n RV32 includes register-immediate instructions for these cases n Small constant embedded within the instruction. Arithmetic: ADDI Bit Operations: ANDI, ORI, XORI Comparison: SLTI, SLTIU n Take one source register inputs (rs1) and produce one destination register output (rd). 2nd sem. '17-18 ENGG HS 19 2nd sem. '17-18 ENGG HS 20

6 I-type Instruction Encoding n Most register-immediate operations are encoded using the I-type format imm[11:0] rs1 funct3 rd opcode I-immediate[11:0] src ADDI/SLTI[U] dest OP-IMM I-immediate[11:0] src ANDI/ORI/XORI dest OP-IMM n NOTE: since the constant is encoded within the instruction, size of immediate must be < 32 bits n In RV32, I-type instruction, immediate constants are encoded using 12 bits n Note that bit locations of rs1, funct3, rd and opcode are the same as in R-type Simplicity è high performance I-Type format ADDI Example n C code: n Assume e, y stored in a0, a1 respectively. n RISCV code: ADD t0, a1, a0! ADDI a1, t0, 1!! y = y + e + 1! Why is there no SUBI instruction? 2nd sem. '17-18 ENGG HS 21 2nd sem. '17-18 ENGG HS 22 Unsigned Numbers n Represent non-negative binary numbers (0, 1, 2, 3, ) using their natural binary representations n An n-bit bitstring can represent numbers in "0, # 2 n 1$ % n Represents equally spaced integers on the number line Value Binary Bitstring (8- bit) Two s Complement (1) n Negative numbers are represented by the 2 s complement of the absolute value of that number 2 s complement of an n-bit number v is the value 2 n - v n For example, to represent value -3 using a 4- bit bitstring: = 16-3 = nd sem. '17-18 ENGG HS 23 2nd sem. '17-18 ENGG HS 24

7 Two s complement (2) n 2 s complement of a number can be obtained by adding 1 to the 1 s complement of the number Original s complement s complement n The value of a bitstring { b n 1 b n 2 b 0 } in 2 s complement can be calculated as: 2 n 1 + n 2 i= 0 n Range: Note that is asymmetric 2 i b i [ 2 n 1, 2 n 1 1] Quick Quiz n What is the binary representation of 13? n What is the binary representation of -13? Cannot be represented 4 Cannot be determined based on given information 2nd sem. '17-18 ENGG HS 25 2nd sem. '17-18 ENGG HS 26 Quick Quiz n What are the binary representations of 13 and -13 as 8-bit integers? : : : : n What are the binary representations of 13 and -13 as 12-bit integers? : : : : Sign Extension n The sign of an integer can only be known with the width of integer specified n In 2 s complement representations, the most significant bit (MSB) of an integer denotes its sign: MSB=1 è negative MSB=0 è non-negative n To cast an integer value to a representation with more bits, it must be sign-extended to preserve its sign: If it is negative number, fill the additional bits with 1 If it is non-negative, fill the additional bits with 0 2nd sem. '17-18 ENGG HS 27 2nd sem. '17-18 ENGG HS 28

8 ADDI with negative numbers imm[11:0] rs1 funct3 rd opcode I-immediate[11:0] src ADDI/SLTI[U] dest OP-IMM I-immediate[11:0] src ANDI/ORI/XORI dest OP-IMM n Subtraction with immediate values can be achieved by using negative immediate with ADDI n Recall that immediate constants are 12 bits long in all I-type instructions Range: [-2 11, ] n In general, instructions must clearly specify in its semantics if it is treating the value as signed or unsigned numbers E.g. SLTI vs SLTIU Load Upper Immediate n Load upper bits of immediate constant n Form constants of any values in combination with ADDI, etc n No need for sign extension U-Type format n NOTE: opcode and rd in the same location as most other instructions 2nd sem. '17-18 ENGG HS 29 2nd sem. '17-18 ENGG HS 30 Memory Operations n All program data + instruction originally stored in main memory Array, structure, user data, string, etc n Dedicated instruction to load/store data between register file and main memory n NOTE: registers are much faster than main memory Limited registers availability (32 registers vs. 4GB of memory) Compiler must use registers wisely for best performance RV32 Memory Model n Memory is byte-addressable Each address corresponds to 1 byte of data n Native data types: Word: 32 bit (int) Half-word: 16 bit (short) Byte: 8 bit (char) n RV32 has a Little-Endian byte addressing scheme The least significant byte is at the lowest address 2nd sem. '17-18 ENGG HS 31 2nd sem. '17-18 ENGG HS 32

9 Endianness Big Endian Little Endian Word Alignment int A[20]! A[0]=0xABCD0123! A[1]=0xFACECAFE! 0x000A0007 0x000A0006 0x000A0005 0x000A0004 FE CA CE FA FA CE CA FE n Words are naturally aligned at 4-byte boundary n Half-words naturally aligned at 2-byte boundary 0x000A0007 0x000A0006 0x000A0005 0x000A0004 AB CD AB CD 0x000A0003 0x000A0002 0x000A0001 0x000A CD AB AB CD n RV32I allows nonaligned access Not common in most processors See ISA spec 0x000A0003 0x000A0002 0x000A0001 0x000A0000 AB CD nd sem. '17-18 ENGG HS 33 2nd sem. '17-18 ENGG HS 34 I Memory Operations imm[11:0] rs1 f3 rd opcode S imm[11:5] rs2 rs1 f3 imm[4:0] opcode offset[11:5] src base width offset[4:0] STORE Load: offset[11:0] base width dest LOAD (dest) ß M[(base) + offset] n Immediate is sign extended n LW/SW Word n LH/SH Half Word Store: M[(base) + offset] ß (src) n LB/SB Byte 2nd sem. '17-18 ENGG HS 35 Memory Operations Load n Assume e, f, y stored in a0, a1, a2 respectively. n RISCV code: int y = e + f[3];! lw t0, 12(a1) # 12 = 3 x 4! ADD a2, a0, t0!! n LW, LH, LB instructions load word, half-word and byte from memory 2nd sem. '17-18 ENGG HS 36

10 Memory Operations Store n Assume f is stored in a0. n RISCV code: int f[7] = f[6] + f[5];! lw t0, 20(a0) # 20 = 5 x 4! lw t1, 24(a0)! ADD t0, t0, t1! sw t0, 28(a0)!! n SW, SH, SB instructions store word, halfword and byte to memory Load/Store Instruction Encoding imm[11:0] rs1 funct3 rd opcode o set[11:0] base width dest LOAD imm[11:5] rs2 rs1 funct3 imm[4:0] opcode o set[11:5] src base width o set[4:0] STORE n LOAD instructions are encoded as I-type n STORE instructions are encoded as S-type n funct3 encodes the length (W, H, B) n 12-bit offset is sign extended and added to base address in rs1 n Note the bit location of imm[11:5] and imm[4:0] in S-type 2nd sem. '17-18 ENGG HS 37 2nd sem. '17-18 ENGG HS 38 Branch Operations n Normally programs execute sequentially The next instruction to fetch is normally at location PC + 4 (32 bit) n Decision making constructs requires fetching instruction from run-time determined location if-the-else, do while, goto, switch, etc n RISCV has two types of control transfer instructions: Unconditional jump Conditional branch Motivation: Unconditional Jump n Just like GOTO n RISC-V Assembler supports unconditional jump 0xA000 addi a0, zero, 9! 0xA004 JUMP alabel! 0xA008 ori a0, a0, 27! alabel: 0xBC08 subi a0, a0, 18! 0xBC0C and a1, a1, a0! 0xBC10 <...>! label 2nd sem. '17-18 ENGG HS 39 2nd sem. '17-18 ENGG HS 40

11 Motivation: Conditional Branch n Just like If-Then n Jump only if the branch condition is true 0xA000 addi a0, zero, 9! 0xA004 BEQ a0, a1, alabel! 0xA008 ori a0, a0, 27! alabel: 0xBC08 subi a0, a0, 18! 0xBC0C and a1, a1, a0! 0xBC10 <...>! label Conditional Branches imm[12] imm[10:5] rs2 rs1 funct3 imm[4:1] imm[11] opcode o set[12,10:5] src2 src1 BEQ/BNE o set[11,4:1] BRANCH o set[12,10:5] src2 src1 BLT[U] o set[11,4:1] BRANCH o set[12,10:5] src2 src1 BGE[U] o set[11,4:1] BRANCH n 12-bit branch immediate encoded as signed offset in multiples of 2 E.g. offset[12:1] = 0x00C è jumps to PC + 12*2 = PC + 24 Assembler BEQ rs1, rs2, dest BNE rs1, rs2, dest BLT rs1, rs2, dest BGE rs1, rs2, dest BLTU, BGEU Semantics if rs1=rs2 then branch dest If rs1 rs2 then branch dest If rs1<rs2 then branch dest If rs1 rs2 then branch dest Unsigned comparison of BLT, BGE SB-Type format 2nd sem. '17-18 ENGG HS 41 2nd sem. '17-18 ENGG HS 42 Unconditional Jump-and-Link imm[20] imm[10:1] imm[11] imm[19:12] rd opcode o set[20:1] dest JAL n Semantics: Unconditional jump to PC+offset*2 Store return address (PC+4) in rd Jump n J-immediate encodes a signed offset in multiples of 2 bytes 20 bits è ±1MiB range n Jump relative to PC n Plain jump (J assembler) use rd=x0 UJ-Type format v = 9! and-link r = sqrt(v)! r = r + 27! n To facilitate function calls Call to function and return to the next instruciton n Convention is to use x1 (ra) as return register 0xA000 addi a0, zero, 9! 0xA004 jal ra, sqrt! 0xA008 addi a0, a0, 27! 0xBC04 <...>! 0xBC08 <...>! 0xBC0C <...>! 0xBC10 return! + 0x1C00 return to 0xA008 0xA008 stored in register ra from the jal instruction 2nd sem. '17-18 ENGG HS 43 2nd sem. '17-18 ENGG HS 44

12 Unconditional JALR imm[11:0] rs1 funct3 rd opcode o set[11:0] base 0 dest JALR n Similar to JAL, except destination is relative to the value of rs1 n Semantics: Unconditional jump to offset + (rs1) Store return address (PC+4) in rd n Note the offset is not offset by multiple of 2 Entirely same as an I-type format instruction I-Type format JAL + JALR for function calls 0xA000 addi a0, zero, 9! 0xA004 jal ra, 0x1C00! 0xA008 addi a0, a0, 27! 0xBC04 <...>! 0xBC08 <...>! 0xBC0C <...>! 0xBC10 jalr zero, ra! 2nd sem. '17-18 ENGG HS 45 2nd sem. '17-18 ENGG HS 46 If-Then-Else Conversion if (a >= b) {!!c = a b! } else {!!c = a + b! }! blt a1, a0, truepart! add a2, a1, a0! j exit! truepart: sub a2, a1, a0! exit : < >! Summary n RISC-V ISA is a new academic RISC ISA used as examples RV32 forms the base set of architectural feature 32-bit architecture 32 General Purpose Register File n Each instruction in an ISA must be uniquely encoded. Encoding and semantics of ISA must tradeoff between hardware efficiency and usability. 2nd sem. '17-18 ENGG HS 47 2nd sem. '17-18 ENGG HS 48

13 SI Prefix Prefix Symbol (base 10) Power (base 10) n Binary prefix more important as order-ofmagnitude increases: 1000 ó ,000,000,000 ó 1,073,741,824 Symbol (base 2) exa E 18 Ei 60 peta P 15 Pi 50 tera T 12 Ti 40 giga G 9 Gi 30 mega M 6 Mi 20 kilo k 3 Ki 10 milli m -3 micro µ -6 nano n -9 pico p -12 Power (base 2) 2nd sem. '17-18 ENGG HS 49

Programmable Machines

Programmable Machines Programmable Machines Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. Quiz 1: next week Covers L1-L8 Oct 11, 7:30-9:30PM Walker memorial 50-340 L09-1 6.004 So Far Using Combinational

More information

Programmable Machines

Programmable Machines Programmable Machines Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. Quiz 1: next week Covers L1-L8 Oct 11, 7:30-9:30PM Walker memorial 50-340 L09-1 6.004 So Far Using Combinational

More information

RISC-V Assembly and Binary Notation

RISC-V Assembly and Binary Notation RISC-V Assembly and Binary Notation L02-1 Course Mechanics Reminders Course website: http://6004.mit.edu All lectures, videos, tutorials, and exam material can be found under Information/Resources tab.

More information

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA CISC 662 Graduate Computer Architecture Lecture 4 - ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

More information

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

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization CISC 662 Graduate Computer Architecture Lecture 4 - ISA MIPS ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

More information

ece4750-tinyrv-isa.txt

ece4750-tinyrv-isa.txt ========================================================================== Tiny RISC-V Instruction Set Architecture ========================================================================== # Author :

More information

Computer Architecture

Computer Architecture CS3350B Computer Architecture Winter 2015 Lecture 4.2: MIPS ISA -- Instruction Representation Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design,

More information

Chapter 2A Instructions: Language of the Computer

Chapter 2A Instructions: Language of the Computer Chapter 2A Instructions: Language of the Computer Copyright 2009 Elsevier, Inc. All rights reserved. Instruction Set The repertoire of instructions of a computer Different computers have different instruction

More information

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

ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2014 Sources: Computer

More information

Instructions: Language of the Computer

Instructions: Language of the Computer 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

More information

COMPSCI 313 S Computer Organization. 7 MIPS Instruction Set

COMPSCI 313 S Computer Organization. 7 MIPS Instruction Set COMPSCI 313 S2 2018 Computer Organization 7 MIPS Instruction Set Agenda & Reading MIPS instruction set MIPS I-format instructions MIPS R-format instructions 2 7.1 MIPS Instruction Set MIPS Instruction

More information

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

Instructions: MIPS ISA. Chapter 2 Instructions: Language of the Computer 1 Instructions: MIPS ISA Chapter 2 Instructions: Language of the Computer 1 PH Chapter 2 Pt A Instructions: MIPS ISA Based on Text: Patterson Henessey Publisher: Morgan Kaufmann Edited by Y.K. Malaiya for

More information

CS3350B Computer Architecture MIPS Instruction Representation

CS3350B Computer Architecture MIPS Instruction Representation CS3350B Computer Architecture MIPS Instruction Representation Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada

More information

ISA and RISCV. CASS 2018 Lavanya Ramapantulu

ISA and RISCV. CASS 2018 Lavanya Ramapantulu ISA and RISCV CASS 2018 Lavanya Ramapantulu Program Program =?? Algorithm + Data Structures Niklaus Wirth Program (Abstraction) of processor/hardware that executes 3-Jul-18 CASS18 - ISA and RISCV 2 Program

More information

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

101 Assembly. ENGR 3410 Computer Architecture Mark L. Chang Fall 2009 101 Assembly ENGR 3410 Computer Architecture Mark L. Chang Fall 2009 What is assembly? 79 Why are we learning assembly now? 80 Assembly Language Readings: Chapter 2 (2.1-2.6, 2.8, 2.9, 2.13, 2.15), Appendix

More information

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

Introduction to the MIPS. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Introduction to the MIPS Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Introduction to the MIPS The Microprocessor without Interlocked Pipeline Stages

More information

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

Lecture 2. Instructions: Language of the Computer (Chapter 2 of the textbook) Lecture 2 Instructions: Language of the Computer (Chapter 2 of the textbook) Instructions: tell computers what to do Chapter 2 Instructions: Language of the Computer 2 Introduction Chapter 2.1 Chapter

More information

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

Today s topics. MIPS operations and operands. MIPS arithmetic. CS/COE1541: Introduction to Computer Architecture. A Review of MIPS ISA. Today s topics CS/COE1541: Introduction to Computer Architecture MIPS operations and operands MIPS registers Memory view Instruction encoding A Review of MIPS ISA Sangyeun Cho Arithmetic operations Logic

More information

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

Chapter 2. Instructions: Language of the Computer. HW#1: 1.3 all, 1.4 all, 1.6.1, , , , , and Due date: one week. Chapter 2 Instructions: Language of the Computer HW#1: 1.3 all, 1.4 all, 1.6.1, 1.14.4, 1.14.5, 1.14.6, 1.15.1, and 1.15.4 Due date: one week. Practice: 1.5 all, 1.6 all, 1.10 all, 1.11 all, 1.14 all,

More information

MIPS%Assembly% E155%

MIPS%Assembly% E155% MIPS%Assembly% E155% Outline MIPS Architecture ISA Instruction types Machine codes Procedure call Stack 2 The MIPS Register Set Name Register Number Usage $0 0 the constant value 0 $at 1 assembler temporary

More information

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

MIPS ISA. 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support Components of an ISA EE 357 Unit 11 MIPS ISA 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support SUBtract instruc. vs. NEGate + ADD instrucs. 3. Registers accessible

More information

Course Administration

Course Administration Fall 2017 EE 3613: Computer Organization Chapter 2: Instruction Set Architecture 2/4 Avinash Kodi Department of Electrical Engineering & Computer Science Ohio University, Athens, Ohio 45701 E-mail: kodi@ohio.edu

More information

Computer Organization MIPS ISA

Computer Organization MIPS ISA CPE 335 Computer Organization MIPS ISA Dr. Iyad Jafar Adapted from Dr. Gheith Abandah Slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html CPE 232 MIPS ISA 1 (vonneumann) Processor Organization

More information

Reduced Instruction Set Computer (RISC)

Reduced Instruction Set Computer (RISC) Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the ISA. RISC Goals RISC: Simplify ISA Simplify CPU Design Better CPU Performance Motivated by simplifying

More information

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

ECE232: Hardware Organization and Design. Computer Organization - Previously covered ECE232: Hardware Organization and Design Part 6: MIPS Instructions II http://www.ecs.umass.edu/ece/ece232/ Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Computer Organization

More information

The MIPS Instruction Set Architecture

The MIPS Instruction Set Architecture The MIPS Set Architecture CPS 14 Lecture 5 Today s Lecture Admin HW #1 is due HW #2 assigned Outline Review A specific ISA, we ll use it throughout semester, very similar to the NiosII ISA (we will use

More information

Reduced Instruction Set Computer (RISC)

Reduced Instruction Set Computer (RISC) Reduced Instruction Set Computer (RISC) Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the machine. Reduced number of cycles needed per instruction.

More information

Computer Architecture. The Language of the Machine

Computer Architecture. The Language of the Machine Computer Architecture The Language of the Machine Instruction Sets Basic ISA Classes, Addressing, Format Administrative Matters Operations, Branching, Calling conventions Break Organization All computers

More information

CS3350B Computer Architecture MIPS Introduction

CS3350B Computer Architecture MIPS Introduction CS3350B Computer Architecture MIPS Introduction Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada Thursday January

More information

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

Chapter 2. Instructions: Language of the Computer. Adapted by Paulo Lopes Chapter 2 Instructions: Language of the Computer Adapted by Paulo Lopes Instruction Set The repertoire of instructions of a computer Different computers have different instruction sets But with many aspects

More information

Mark Redekopp, All rights reserved. EE 357 Unit 11 MIPS ISA

Mark Redekopp, All rights reserved. EE 357 Unit 11 MIPS ISA EE 357 Unit 11 MIPS ISA Components of an ISA 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support SUBtract instruc. vs. NEGate + ADD instrucs. 3. Registers accessible

More information

CS3350B Computer Architecture

CS3350B Computer Architecture CS3350B Computer Architecture Winter 2015 Lecture 4.1: MIPS ISA: Introduction Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted d from lectures on Computer Organization and Design, Patterson & Hennessy,

More information

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Computer Organization and Structure. Bing-Yu Chen National Taiwan University Computer Organization and Structure Bing-Yu Chen National Taiwan University Instructions: Language of the Computer Operations and Operands of the Computer Hardware Signed and Unsigned Numbers Representing

More information

CS222: MIPS Instruction Set

CS222: MIPS Instruction Set CS222: MIPS Instruction Set Dr. A. Sahu Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati 1 Outline Previous Introduction to MIPS Instruction Set MIPS Arithmetic's Register Vs Memory, Registers

More information

Instructions: Language of the Computer

Instructions: Language of the Computer Instructions: Language of the Computer Tuesday 22 September 15 Many slides adapted from: and Design, Patterson & Hennessy 5th Edition, 2014, MK and from Prof. Mary Jane Irwin, PSU Summary Previous Class

More information

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

EN164: Design of Computing Systems Topic 03: Instruction Set Architecture Design EN164: Design of Computing Systems Topic 03: Instruction Set Architecture Design Professor Sherief Reda http://scale.engin.brown.edu Electrical Sciences and Computer Engineering School of Engineering Brown

More information

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

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2) ELEC 5200-001/6200-001 Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2) Victor P. Nelson, Professor & Asst. Chair Vishwani D. Agrawal, James J. Danaher Professor Department

More information

Unsigned Binary Integers

Unsigned Binary Integers Unsigned Binary Integers Given an n-bit number x x n 1 n 2 1 0 n 12 xn 22 x12 x02 Range: 0 to +2 n 1 Example 2.4 Signed and Unsigned Numbers 0000 0000 0000 0000 0000 0000 0000 1011 2 = 0 + + 1 2 3 + 0

More information

Unsigned Binary Integers

Unsigned Binary Integers Unsigned Binary Integers Given an n-bit number x x n 1 n 2 1 0 n 12 xn 22 x12 x02 Range: 0 to +2 n 1 Example 2.4 Signed and Unsigned Numbers 0000 0000 0000 0000 0000 0000 0000 1011 2 = 0 + + 1 2 3 + 0

More information

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

CSCI 402: Computer Architectures. Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI. CSCI 402: Computer Architectures Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI Recall Big endian, little endian Memory alignment Unsigned

More information

Computer Architecture. MIPS Instruction Set Architecture

Computer Architecture. MIPS Instruction Set Architecture Computer Architecture MIPS Instruction Set Architecture Instruction Set Architecture An Abstract Data Type Objects Registers & Memory Operations Instructions Goal of Instruction Set Architecture Design

More information

Lecture 2: RISC V Instruction Set Architecture. Housekeeping

Lecture 2: RISC V Instruction Set Architecture. Housekeeping S 17 L2 1 18 447 Lecture 2: RISC V Instruction Set Architecture James C. Hoe Department of ECE Carnegie Mellon University Housekeeping S 17 L2 2 Your goal today get bootstrapped on RISC V RV32I to start

More information

EEM 486: Computer Architecture. Lecture 2. MIPS Instruction Set Architecture

EEM 486: Computer Architecture. Lecture 2. MIPS Instruction Set Architecture EEM 486: Computer Architecture Lecture 2 MIPS Instruction Set Architecture EEM 486 Overview Instruction Representation Big idea: stored program consequences of stored program Instructions as numbers Instruction

More information

CENG3420 Lecture 03 Review

CENG3420 Lecture 03 Review CENG3420 Lecture 03 Review Bei Yu byu@cse.cuhk.edu.hk 2017 Spring 1 / 38 CISC vs. RISC Complex Instruction Set Computer (CISC) Lots of instructions of variable size, very memory optimal, typically less

More information

MIPS Memory Access Instructions

MIPS Memory Access Instructions MIPS Memory Access Instructions MIPS has two basic data transfer instructions for accessing memory lw $t0, 4($s3) #load word from memory sw $t0, 8($s3) #store word to memory The data is loaded into (lw)

More information

EE108B Lecture 3. MIPS Assembly Language II

EE108B Lecture 3. MIPS Assembly Language II EE108B Lecture 3 MIPS Assembly Language II Christos Kozyrakis Stanford University http://eeclass.stanford.edu/ee108b 1 Announcements Urgent: sign up at EEclass and say if you are taking 3 or 4 units Homework

More information

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

Machine Language Instructions Introduction. Instructions Words of a language understood by machine. Instruction set Vocabulary of the machine Machine Language Instructions Introduction Instructions Words of a language understood by machine Instruction set Vocabulary of the machine Current goal: to relate a high level language to instruction

More information

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

Overview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2) Introduction to the MIPS ISA Overview Remember that the machine only understands very basic instructions (machine instructions) It is the compiler s job to translate your high-level (e.g. C program) into

More information

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

5/17/2012. Recap from Last Time. CSE 2021: Computer Organization. The RISC Philosophy. Levels of Programming. Stored Program Computers CSE 2021: Computer Organization Recap from Last Time load from disk High-Level Program Lecture-2 Code Translation-1 Registers, Arithmetic, logical, jump, and branch instructions MIPS to machine language

More information

Character Is a byte quantity (00~FF or 0~255) ASCII (American Standard Code for Information Interchange) Page 91, Fig. 2.21

Character Is a byte quantity (00~FF or 0~255) ASCII (American Standard Code for Information Interchange) Page 91, Fig. 2.21 2.9 Communication with People: Byte Data & Constants Character Is a byte quantity (00~FF or 0~255) ASCII (American Standard Code for Information Interchange) Page 91, Fig. 2.21 32: space 33:! 34: 35: #...

More information

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Computer Organization and Structure. Bing-Yu Chen National Taiwan University Computer Organization and Structure Bing-Yu Chen National Taiwan University Instructions: Language of the Computer Operations and Operands of the Computer Hardware Signed and Unsigned Numbers Representing

More information

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

Recap from Last Time. CSE 2021: Computer Organization. Levels of Programming. The RISC Philosophy 5/19/2011 CSE 2021: Computer Organization Recap from Last Time load from disk High-Level Program Lecture-3 Code Translation-1 Registers, Arithmetic, logical, jump, and branch instructions MIPS to machine language

More information

Lecture 2: RISC V Instruction Set Architecture. James C. Hoe Department of ECE Carnegie Mellon University

Lecture 2: RISC V Instruction Set Architecture. James C. Hoe Department of ECE Carnegie Mellon University 18 447 Lecture 2: RISC V Instruction Set Architecture James C. Hoe Department of ECE Carnegie Mellon University 18 447 S18 L02 S1, James C. Hoe, CMU/ECE/CALCM, 2018 Your goal today Housekeeping get bootstrapped

More information

Instruction Set Architecture part 1 (Introduction) Mehran Rezaei

Instruction Set Architecture part 1 (Introduction) Mehran Rezaei Instruction Set Architecture part 1 (Introduction) Mehran Rezaei Overview Last Lecture s Review Execution Cycle Levels of Computer Languages Stored Program Computer/Instruction Execution Cycle SPIM, a

More information

MIPS PROJECT INSTRUCTION SET and FORMAT

MIPS PROJECT INSTRUCTION SET and FORMAT ECE 312: Semester Project MIPS PROJECT INSTRUCTION SET FORMAT This is a description of the required MIPS instruction set, their meanings, syntax, semantics, bit encodings. The syntax given for each instruction

More information

CS 4200/5200 Computer Architecture I

CS 4200/5200 Computer Architecture I CS 4200/5200 Computer Architecture I MIPS Instruction Set Architecture Dr. Xiaobo Zhou Department of Computer Science CS420/520 Lec3.1 UC. Colorado Springs Adapted from UCB97 & UCB03 Review: Organizational

More information

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

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands Stored Program Concept Instructions: Instructions are bits Programs are stored in memory to be read or written just like data Processor Memory memory for data, programs, compilers, editors, etc. Fetch

More information

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

MIPS R-format Instructions. Representing Instructions. Hexadecimal. R-format Example. MIPS I-format Example. MIPS I-format Instructions Representing Instructions Instructions are encoded in binary Called machine code MIPS instructions Encoded as 32-bit instruction words Small number of formats encoding operation code (opcode), register

More information

TSK3000A - Generic Instructions

TSK3000A - Generic Instructions TSK3000A - Generic Instructions Frozen Content Modified by Admin on Sep 13, 2017 Using the core set of assembly language instructions for the TSK3000A as building blocks, a number of generic instructions

More information

A Processor. Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University. See: P&H Chapter , 4.1-3

A Processor. Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University. See: P&H Chapter , 4.1-3 A Processor Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University See: P&H Chapter 2.16-20, 4.1-3 Let s build a MIPS CPU but using Harvard architecture Basic Computer System Registers ALU

More information

ECE 154A Introduction to. Fall 2012

ECE 154A Introduction to. Fall 2012 ECE 154A Introduction to Computer Architecture Fall 2012 Dmitri Strukov Lecture 4: Arithmetic and Data Transfer Instructions Agenda Review of last lecture Logic and shift instructions Load/store instructionsi

More information

1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer

1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer 1 5. Addressing Modes MIPS Addressing Modes 2 Addressing takes care of where to find data instruction We have seen, so far three addressing modes of MIPS (to find data): 1. Immediate addressing: provides

More information

CS 61c: Great Ideas in Computer Architecture

CS 61c: Great Ideas in Computer Architecture MIPS Instruction Formats July 2, 2014 Review New registers: $a0-$a3, $v0-$v1, $ra, $sp New instructions: slt, la, li, jal, jr Saved registers: $s0-$s7, $sp, $ra Volatile registers: $t0-$t9, $v0-$v1, $a0-$a3

More information

MIPS Instruction Set

MIPS Instruction Set MIPS Instruction Set Prof. James L. Frankel Harvard University Version of 7:12 PM 3-Apr-2018 Copyright 2018, 2017, 2016, 201 James L. Frankel. All rights reserved. CPU Overview CPU is an acronym for Central

More information

Thomas Polzer Institut für Technische Informatik

Thomas Polzer Institut für Technische Informatik Thomas Polzer tpolzer@ecs.tuwien.ac.at Institut für Technische Informatik Branch to a labeled instruction if a condition is true Otherwise, continue sequentially beq rs, rt, L1 if (rs == rt) branch to

More information

Computer Organization and Components

Computer Organization and Components 2 Course Structure Computer Organization and Components Module 4: Memory Hierarchy Module 1: Logic Design IS1500, fall 2014 Lecture 4: and F1 DC Ö1 F2 DC Ö2 F7b Lab: dicom F8 Module 2: C and Associate

More information

CPS311 - COMPUTER ORGANIZATION. A bit of history

CPS311 - COMPUTER ORGANIZATION. A bit of history CPS311 - COMPUTER ORGANIZATION A Brief Introduction to the MIPS Architecture A bit of history The MIPS architecture grows out of an early 1980's research project at Stanford University. In 1984, MIPS computer

More information

CSCI 402: Computer Architectures

CSCI 402: Computer Architectures CSCI 402: Computer Architectures Instructions: Language of the Computer (2) Fengguang Song Department of Computer & Information Science IUPUI Memory Operands Two tribes: Big Endian: Most-significant byte

More information

Topic Notes: MIPS Instruction Set Architecture

Topic Notes: MIPS Instruction Set Architecture Computer Science 220 Assembly Language & Comp. Architecture Siena College Fall 2011 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture.

More information

Anne Bracy CS 3410 Computer Science Cornell University. See P&H Chapter: , , Appendix B

Anne Bracy CS 3410 Computer Science Cornell University. See P&H Chapter: , , Appendix B Anne Bracy CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. See P&H Chapter: 2.16-2.20, 4.1-4.4,

More information

Processor. Han Wang CS3410, Spring 2012 Computer Science Cornell University. See P&H Chapter , 4.1 4

Processor. Han Wang CS3410, Spring 2012 Computer Science Cornell University. See P&H Chapter , 4.1 4 Processor Han Wang CS3410, Spring 2012 Computer Science Cornell University See P&H Chapter 2.16 20, 4.1 4 Announcements Project 1 Available Design Document due in one week. Final Design due in three weeks.

More information

Chapter 2: Instructions:

Chapter 2: Instructions: Chapter 2: Instructions: Language of the Computer Computer Architecture CS-3511-2 1 Instructions: To command a computer s hardware you must speak it s language The computer s language is called instruction

More information

Chapter 2. Instruction Set. RISC vs. CISC Instruction set. The University of Adelaide, School of Computer Science 18 September 2017

Chapter 2. Instruction Set. RISC vs. CISC Instruction set. The University of Adelaide, School of Computer Science 18 September 2017 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface RISC-V Edition Chapter 2 Instructions: Language of the Computer These slides are based on the slides by the authors. The slides doesn t

More information

Concocting an Instruction Set

Concocting an Instruction Set Concocting an Instruction Set Nerd Chef at work. move flour,bowl add milk,bowl add egg,bowl move bowl,mixer rotate mixer... Read: Chapter 2.1-2.7 L03 Instruction Set 1 A General-Purpose Computer The von

More information

COMPUTER ORGANIZATION AND DESIGN

COMPUTER ORGANIZATION AND DESIGN COMPUTER ORGANIZATION AND DESIGN 5 th The Hardware/Software Interface Edition Chapter 2 Instructions: Language of the Computer 2.1 Introduction Instruction Set The repertoire of instructions of a computer

More information

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 Computer Science 324 Computer Architecture Mount Holyoke College Fall 2009 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:

More information

Chapter 2. Instructions: Language of the Computer

Chapter 2. Instructions: Language of the Computer Chapter 2 Instructions: Language of the Computer Instruction Set The repertoire of instructions of a computer Different computers have different instruction sets But with many aspects in common Early computers

More information

Anne Bracy CS 3410 Computer Science Cornell University. [K. Bala, A. Bracy, E. Sirer, and H. Weatherspoon]

Anne Bracy CS 3410 Computer Science Cornell University. [K. Bala, A. Bracy, E. Sirer, and H. Weatherspoon] Anne Bracy CS 3410 Computer Science Cornell University [K. Bala, A. Bracy, E. Sirer, and H. Weatherspoon] Understanding the basics of a processor We now have the technology to build a CPU! Putting it all

More information

Computer Architecture Instruction Set Architecture part 2. Mehran Rezaei

Computer Architecture Instruction Set Architecture part 2. Mehran Rezaei Computer Architecture Instruction Set Architecture part 2 Mehran Rezaei Review Execution Cycle Levels of Computer Languages Stored Program Computer/Instruction Execution Cycle SPIM, a MIPS Interpreter

More information

EEC 581 Computer Architecture Lecture 1 Review MIPS

EEC 581 Computer Architecture Lecture 1 Review MIPS EEC 581 Computer Architecture Lecture 1 Review MIPS 1 Supercomputing: Suddenly Fancy 2 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control

More information

I-Format Instructions (3/4) Define fields of the following number of bits each: = 32 bits

I-Format Instructions (3/4) Define fields of the following number of bits each: = 32 bits CS61C L10 MIPS Instruction Representation II (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #10 Instruction Representation II 2007-7-8 Review There are register calling conventions!

More information

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

Chapter 2. Computer Abstractions and Technology. Lesson 4: MIPS (cont ) Chapter 2 Computer Abstractions and Technology Lesson 4: MIPS (cont ) Logical Operations Instructions for bitwise manipulation Operation C Java MIPS Shift left >>> srl Bitwise

More information

Lecture 4: MIPS Instruction Set

Lecture 4: MIPS Instruction Set Lecture 4: MIPS Instruction Set No class on Tuesday Today s topic: MIPS instructions Code examples 1 Instruction Set Understanding the language of the hardware is key to understanding the hardware/software

More information

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

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands Stored Program Concept nstructions: nstructions are bits Programs are stored in memory to be read or written just like data Processor Memory memory for data, programs, compilers, editors, etc. Fetch &

More information

ISA: The Hardware Software Interface

ISA: The Hardware Software Interface ISA: The Hardware Software Interface Instruction Set Architecture (ISA) is where software meets hardware In embedded systems, this boundary is often flexible Understanding of ISA design is therefore important

More information

A General-Purpose Computer The von Neumann Model. Concocting an Instruction Set. Meaning of an Instruction. Anatomy of an Instruction

A General-Purpose Computer The von Neumann Model. Concocting an Instruction Set. Meaning of an Instruction. Anatomy of an Instruction page 1 Concocting an Instruction Set Nerd Chef at work. move flour,bowl add milk,bowl add egg,bowl move bowl,mixer rotate mixer... A General-Purpose Computer The von Neumann Model Many architectural approaches

More information

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

CS31001 COMPUTER ORGANIZATION AND ARCHITECTURE. Debdeep Mukhopadhyay, CSE, IIT Kharagpur. Instructions and Addressing CS31001 COMPUTER ORGANIZATION AND ARCHITECTURE Debdeep Mukhopadhyay, CSE, IIT Kharagpur Instructions and Addressing 1 ISA vs. Microarchitecture An ISA or Instruction Set Architecture describes the aspects

More information

MIPS Instruction Set Architecture (2)

MIPS Instruction Set Architecture (2) MIPS Instruction Set Architecture (2) Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu

More information

Mark Redekopp, All rights reserved. EE 352 Unit 3 MIPS ISA

Mark Redekopp, All rights reserved. EE 352 Unit 3 MIPS ISA EE 352 Unit 3 MIPS ISA Instruction Set Architecture (ISA) Defines the software interface of the processor and memory system Instruction set is the vocabulary the HW can understand and the SW is composed

More information

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

Chapter 3 MIPS Assembly Language. Ó1998 Morgan Kaufmann Publishers 1 Chapter 3 MIPS Assembly Language Ó1998 Morgan Kaufmann Publishers 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive

More information

Assembly Programming

Assembly Programming Designing Computer Systems Assembly Programming 08:34:48 PM 23 August 2016 AP-1 Scott & Linda Wills Designing Computer Systems Assembly Programming In the early days of computers, assembly programming

More information

Lectures 3-4: MIPS instructions

Lectures 3-4: MIPS instructions Lectures 3-4: MIPS instructions Motivation Learn how a processor s native language looks like Discover the most important software-hardware interface MIPS Microprocessor without Interlocked Pipeline Stages

More information

EE 109 Unit 13 MIPS Instruction Set. Instruction Set Architecture (ISA) Components of an ISA INSTRUCTION SET OVERVIEW

EE 109 Unit 13 MIPS Instruction Set. Instruction Set Architecture (ISA) Components of an ISA INSTRUCTION SET OVERVIEW 1 2 EE 109 Unit 13 MIPS Instruction Set Architecting a vocabulary for the HW INSTRUCTION SET OVERVIEW 3 4 Instruction Set Architecture (ISA) Defines the of the processor and memory system Instruction set

More information

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

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University. Instructions: ti Language of the Computer Rui Wang, Assistant professor Dept. of Information and Communication Tongji University it Email: ruiwang@tongji.edu.cn Computer Hierarchy Levels Language understood

More information

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

Instructions: MIPS arithmetic. MIPS arithmetic. Chapter 3 : MIPS Downloaded from: Instructions: Chapter 3 : MIPS Downloaded from: http://www.cs.umr.edu/~bsiever/cs234/ Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very restrictive

More information

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

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements CSE141: Introduction to Computer Architecture CSE 141 Computer Architecture Spring 2005 Lecture 3 Instruction Set Architecute Pramod V. Argade April 4, 2005 Instructor: TAs: Pramod V. Argade (p2argade@cs.ucsd.edu)

More information

Concocting an Instruction Set

Concocting an Instruction Set Concocting an Instruction Set Nerd Chef at work. move flour,bowl add milk,bowl add egg,bowl move bowl,mixer rotate mixer... Read: Chapter 2.1-2.6 L04 Instruction Set 1 A General-Purpose Computer The von

More information

COMP MIPS instructions 2 Feb. 8, f = g + h i;

COMP MIPS instructions 2 Feb. 8, f = g + h i; Register names (save, temporary, zero) From what I have said up to now, you will have the impression that you are free to use any of the 32 registers ($0,..., $31) in any instruction. This is not so, however.

More information

Instruction Set Architecture of. MIPS Processor. MIPS Processor. MIPS Registers (continued) MIPS Registers

Instruction Set Architecture of. MIPS Processor. MIPS Processor. MIPS Registers (continued) MIPS Registers CSE 675.02: Introduction to Computer Architecture MIPS Processor Memory Instruction Set Architecture of MIPS Processor CPU Arithmetic Logic unit Registers $0 $31 Multiply divide Coprocessor 1 (FPU) Registers

More information

Rechnerstrukturen. Chapter 2. Instructions: Language of the Computer

Rechnerstrukturen. Chapter 2. Instructions: Language of the Computer 182.690 Rechnerstrukturen Chapter 2 Instructions: Language of the Computer Instruction Set The repertoire of instructions of a computer Different computers have different instruction sets But with many

More information