Review: MIPS Addressing Modes/Instruction Formats

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Review: MIPS Addressing Modes/Instruction Formats"

Transcription

1 Review: Addressing Modes Addressing mode Example Meaning Register Add R4,R3 R4 R4+R3 Immediate Add R4,#3 R4 R4+3 Displacement Add R4,1(R1) R4 R4+Mem[1+R1] Register indirect Add R4,(R1) R4 R4+Mem[R1] Indexed / Base Add R3,(R1+R2) R3 R3+Mem[R1+R2] Direct or absolute Add R1,(11) R1 R1+Mem[11] indirect Add R1 R1+Mem[Mem[R3]] Auto-increment Add R1,(R2)+ R1 R1+Mem[R2]; R2 R2+d Auto-decrement Add R1, (R2) R2 R2 d; R1 R1+Mem[R2] Scaled Add R1,1(R2)[R3] R1 R1+Mem[1+R2+R3*d] ECE 2 L3 InstructionSet4 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Review: MIPS Addressing Modes/Instruction Formats All instructions are -bit wide Register (direct) op rs rt rd register Immediate op rs rt immed Base+index op rs rt immed register + PC-relative op rs rt immed PC + Register Indirect? ECE 2 L3 InstructionSet6 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

2 MIPS: Software conventions for registers R $zero constant R1 $at reserved for assembler R2 $v value registers & R3 $v1 function results R4 $a arguments R5 $a1 R6 $a2 R7 $a3 R8 $t temporary: caller saves (callee can clobber) R15 $t7 R $s callee saves R23 $s7 R24 $t8 temporary (cont d) R25 $t9 R26 $k reserved for OS kernel R27 $k1 R28 $gp pointer to global area R29 $sp Stack pointer R3 $fp Frame pointer R $ra return Address ECE 2 L3 InstructionSet19 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers MIPS data transfer instructions Instruction Comment sw 5($r4), $r3 Store word sh 52($r2), $r3 Store half sb 41($r3), $r2 Store byte lw $r1, 3($r2) Load word lh $r1, 4($r3) Load halfword lhu $r1, 4($r3) Load halfword unsigned lb $r1, 4($r3) Load byte lbu $r1, 4($r3) Load byte unsigned lui $r1, 4 Load Upper Immediate ( bits shifted left by ) LUI $r5 $r5 ECE 2 L3 InstructionSet2 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

3 Loading large numbers Pseudo-instruction li $t, big: load -bit constant lui $t, upper ori $t, $t, lower # $t[:] upper # $t ($t Or [extlower]) Or upper 15 lower $to: upper lower -bit constant ECE 2 L3 InstructionSet21 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Processor Design Basics: Outline Design a processor: step-by-step Requirements of the Instruction Set Components and clocking Assembling an adequate path Controlling the path ECE 2 L3 InstructionSet Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

4 The Big Picture: The Performance Perspective Performance of a machine is determined by: Instruction count Clock cycle time Clock cycles per instruction Processor design (datapath and control) will determine: Clock cycle time CPI Clock cycles per instruction Today: Inst Count Single cycle processor: - Advantage: One clock cycle per instruction - Disadvantage: long cycle time Cycle Time ECE 2 L3 InstructionSet Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers How to Design a Processor: step-by-step 1 Analyze instruction set => datapath requirements the meaning of each instruction is given by the register transfers datapath must include storage element for ISA registers - possibly more datapath must support each register transfer 2 Select set of datapath components and establish clocking methodology 3 Assemble datapath meeting the requirements 4 Analyze implementation of each instruction to determine setting of control points that effects the register transfer 5 Assemble the control logic ECE 2 L3 InstructionSet33 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

5 The MIPS Instruction Formats All MIPS instructions are bits long The three instruction formats: R-type op 6 bits rs 5 bits rt 5 bits rd 5 bits shamt 5 bits funct 6 bits I-type op rs rt immediate 6 bits 5 bits 5 bits bits J-type 26 op target address 6 bits 26 bits The different fields are: op: operation of the instruction rs, rt, rd: the source and destination register specifiers shamt: shift amount funct: selects the variant of the operation in the op field address / immediate: address offset or immediate value target address: target address of the jump instruction ECE 2 L3 InstructionSet34 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Step 1a: The MIPS-light Subset ADD and SUB addu rd, rs, rt subu rd, rs, rt OR Immediate: ori rt, rs, imm LOAD and STORE Word lw rt, rs, imm sw rt, rs, imm BRANCH: beq rs, rt, imm op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits op rs rt immediate 6 bits 5 bits 5 bits bits op rs rt immediate 6 bits 5 bits 5 bits bits op rs rt immediate 6 bits 5 bits 5 bits bits ECE 2 L3 InstructionSet35 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

6 Logical Register Transfers RTL gives the meaning of the instructions All start by fetching the instruction op rs rt rd shamt funct = MEM[ PC ] op rs rt Imm = MEM[ PC ] inst Register Transfers ADDU R[rd] < R[rs] + R[rt]; PC < PC + 4 SUBU R[rd] < R[rs] R[rt]; PC < PC + 4 ORi R[rt] < R[rs] + zero_ext(imm); PC < PC + 4 LOAD R[rt] < MEM[ R[rs] + sign_ext(imm)]; PC < PC + 4 STORE MEM[ R[rs] + sign_ext(imm) ] < R[rt]; PC < PC + 4 BEQ if ( R[rs] == R[rt] ) then PC < PC + sign_ext(imm)] else PC < PC + 4 ECE 2 L3 InstructionSet36 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Step 1: Requirements of the Instruction Set instruction & data Registers ( x ) read RS read RT Write RT or RD PC Extender Add and Sub register or extended immediate Add 4 or extended immediate to PC ECE 2 L3 InstructionSet37 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

7 Step 2: Components of the path Combinational Elements Storage Elements Clocking methodology ECE 2 L3 InstructionSet38 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Combinational Logic Elements (Basic Building Blocks) Adder A B CarryIn Adder Sum Carry MUX Selec t A Y B MUX A B O P Result ECE 2 L3 InstructionSet39 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

8 Storage Element: Register (Basic Building Block) Register Write Enable Similar to the D Flip Flop except In Out - N-bit input and output N N - Write Enable input Write Enable: - negated (): Out will not change - asserted (1): Out will become In ECE 2 L3 InstructionSet4 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Storage Element: Register File Register File consists of registers: Two -bit output buses: and busb One -bit input bus: Register is selected by: RA (number) selects the register to put on (data) RB (number) selects the register to put on busb (data) RW (number) selects the register to be written via (data) when Write Enable is 1 Clock input (CLK) Write Enable RWRARB bit Registers The CLK input is a factor ONLY during write operation During read operation, behaves as a combinational logic block: - RA or RB valid => or busb valid after access time busb ECE 2 L3 InstructionSet41 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

9 Storage Element: Idealized (idealized) One input bus: In One output bus: Out word is selected by: Address selects the word to put on Out Write Enable = 1: address selects the memory word to be written via the In bus Clock input (CLK) Write Enable Address In Out The CLK input is a factor ONLY during write operation During read operation, behaves as a combinational logic block: - Address valid => Out valid after access time ECE 2 L3 InstructionSet42 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Clocking Methodology Setup Hold Don t Care Setup Hold All storage elements are clocked by the same clock edge Cycle Time = CLK-to-Q + Longest Delay Path + Setup + Clock Skew (CLK-to-Q + Shortest Delay Path - Clock Skew) > Hold Time ECE 2 L3 InstructionSet43 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

10 Step 3 Register Transfer Requirements > path Assembly Instruction Fetch Read Operands and Execute Operation ECE 2 L3 InstructionSet44 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers 3a: Overview of the Instruction Fetch Unit The common RTL operations Fetch the Instruction: mem[pc] Update the program counter: - Sequential Code: PC <- PC Branch and Jump: PC <- something else PC Next Address Logic Address Instruction Instruction Word ECE 2 L3 InstructionSet45 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

11 3b: Add & Subtract R[rd] <- R[rs] op R[rt] Example: addu rd, rs, rt Ra, Rb, and Rw come from instruction s rs, rt, and rd fields ctr and RegWr: control logic after decoding the instruction op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits RegWr Rd Rs Rt -bit Registers busb ctr Result ECE 2 L3 InstructionSet46 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Register-Register Timing PC Rs, Rt, Rd, Op, Func ctr RegWr, B Old Value -to-q New Value Old Value Old Value Old Value Old Value Old Value Instruction Access Time New Value Delay through Control Logic New Value New Value Register File Access Time New Value Delay New Value RegWr Rd Rs Rt bit Registers busb ctr Result Register Write Occurs Here ECE 2 L3 InstructionSet47 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

12 3c: Logical Operations with Immediate R[rt] <- R[rs] op ZeroExt[imm] ] bits Rd Rt RegDst Rs RegWr ctr imm -bit Registers 26 op rs rt immediate busb ZeroExt 21 6 bits 5 bits 5 bits rd? bits 15 Src Result 11 immediate bits ECE 2 L3 InstructionSet48 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers 3d: Load Operations R[rt] <- Mem[R[rs] + SignExt[imm]] Example: lw rt, rs, imm op rs rt immediate 6 bits 5 bits 5 bits rd bits Rd Rt RegDst Rs RegWr imm -bit Registers busb Extender Src ctr In MemWr WrEn Adr W_Src ExtOp ECE 2 L3 InstructionSet49 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

13 3e: Store Operations Mem[ R[rs] + SignExt[imm] <- R[rt] ] Example: sw rt, rs, imm op rs rt immediate 6 bits 5 bits 5 bits bits RegDst Rd Rt RegWr 5 5 imm Rs Rt 5 -bit Registers busb Extender ctr In MemWr WrEn Adr W_Src ExtOp Src ECE 2 L3 InstructionSet5 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers 3f: The Branch Instruction op rs rt immediate 6 bits 5 bits 5 bits bits beq rs, rt, imm mem[pc] Fetch the instruction from memory Equal <- R[rs] == R[rt] Calculate the branch condition if (COND eq ) Calculate the next instruction s address - PC <- PC ( SignExt(imm) x 4 ) else - PC <- PC + 4 ECE 2 L3 InstructionSet51 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

14 path for Branch Operations beq rs, rt, imm path generates condition (equal) op rs rt immediate 6 bits 5 bits 5 bits bits Inst Address Cond 4 imm PC Ext npc_sel Adder Adder PC Rs Rt RegWr bit Registers busb Equal? ECE 2 L3 InstructionSet52 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Putting it All Together: A Single Cycle path Inst Adr <:15> <11:15> <:2> <21:25> Rs Rt Rd Imm Instruction<:> imm 4 PC Ext Adder Adder npc_sel PC RegDst Rd Rt Equal 1 RegWr Rs Rt bit Registers busb imm Extender 1 ctr = MemWr WrEn Adr In MemtoReg 1 ExtOp Src ECE 2 L3 InstructionSet53 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

15 An Abstract View of the Critical Path Register file and ideal memory: Next Address The CLK input is a factor ONLY during write operation During read operation, behave as combinational logic: - Address valid => Output valid after access time Ideal Instruction Instruction Address PC Rd 5 Instruction Rs 5 Rt 5 -bit Registers Imm A B Critical Path (Load Operation) = PC s -to-q + Instruction s Access Time + Register File s Access Time + to Perform a -bit Add + Access Time + Setup Time for Register File Write + Clock Skew Address In Ideal ECE 2 L3 InstructionSet54 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Step 4: Given path: RTL -> Control Instruction<:> Inst Adr Op <21:25> <21:25> Fun Rt <:15> <11:15> <:2> Rs Rd Imm Control npc_selregwr RegDst ExtOp Src ctr MemWr MemtoReg Equal DATA PATH ECE 2 L3 InstructionSet55 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

16 Meaning of the Control Signals (see slide 28) Rs, Rt, Rd and Imed hardwired into datapath npc_sel: => PC < PC + 4; 1 => PC < PC SignExt(Im) npc_sel Inst Adr 4 imm PC Ext Adder Adder PC ECE 2 L3 InstructionSet56 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Meaning of the Control Signals (see slide 28) ExtOp: zero, sign src: immed => regb; 1 => ctr: add, sub, or RegDst Rd Rt Equal 1 RegWr Rs Rt bit Registers busb imm Extender MemWr: write memory MemtoReg: 1 => Mem RegDst: => rt ; 1 => rd RegWr: write dest register ctr MemWr MemtoReg 1 = WrEn Adr In 1 ExtOp Src ECE 2 L3 InstructionSet57 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

17 Control Signals inst Register Transfer ADD R[rd] < R[rs] + R[rt]; PC < PC + 4 src = RegB, ctr = add, RegDst = rd, RegWr, npc_sel = +4 SUB R[rd] < R[rs] R[rt]; PC < PC + 4 src =, Extop =, ctr =, RegDst =, RegWr(?), MemtoReg(?), MemWr(?), npc_sel = ORi R[rt] < R[rs] + zero_ext(imm); PC < PC + 4 src =, Extop =, ctr =, RegDst =, RegWr(?), MemtoReg(?), MemWr(?), npc_sel = LOAD R[rt] < MEM[ R[rs] + sign_ext(imm)]; PC < PC + 4 src =, Extop =, ctr =, RegDst =, RegWr(?), MemtoReg(?), MemWr(?), npc_sel = STORE MEM[ R[rs] + sign_ext(imm)] < R[rs]; PC < PC + 4 src =, Extop =, ctr =, RegDst =, RegWr(?), MemtoReg(?), MemWr(?), npc_sel = BEQ if ( R[rs] == R[rt] ) then PC < PC + sign_ext(imm)] else PC < PC + 4 src =, Extop =, ctr =, RegDst =, RegWr(?), MemtoReg(?), MemWr(?), npc_sel = ECE 2 L3 InstructionSet58 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Step 5: Logic for each control signal npc_sel <= if (OP == BEQ) then EQUAL else src <= if (OP == ) then regb else immed ctr <= if (OP == ) then funct elseif (OP == ORi) then OR elseif (OP == BEQ) then sub else add ExtOp <= MemWr <= MemtoReg<= RegWr: <= RegDst: <= ECE 2 L3 InstructionSet6 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

18 Example: Load Instruction Inst Adr <:15> <11:15> <:2> <21:25> Rs Rt Rd Imm Instruction<:> imm 4 PC Ext Adder Adder npc_sel +4 PC RegDst ct MemWr MemtoReg rt Rd Rt Equal radd 1 Rs Rt RegWr = -bit Registers busb WrEn Adr 1 1 In imm sign ext ECE 2 L3 InstructionSet62 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Extender ExtOp Src An Abstract View of the Implementation Next Address Ideal Instruction Instruction Address PC Rd 5 Instruction Rs 5 Rt 5 -bit Registers Logical vs Physical Structure A B Control Control Signals path Conditions Address In Ideal Out ECE 2 L3 InstructionSet63 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

19 A Real MIPS path (CNS T) ECE 2 L3 InstructionSet64 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers Summary 5 steps to design a processor 1 Analyze instruction set => datapath requirements 2 Select set of datapath components & establish clock methodology 3 Assemble datapath meeting the requirements 4 Analyze implementation of each instruction to determine setting of control points that effects the register transfer 5 Assemble the control logic MIPS makes it easier Instructions same size Source registers always in same place Immediates same size, location Operations always on registers/immediates Single cycle datapath => CPI=1, CCT => long Next time: implementing control ECE 2 L3 InstructionSet65 Adapted from Patterson 97 UCB Copyright 1998 Morgan Kaufmann Publishers

Ch 5: Designing a Single Cycle Datapath

Ch 5: Designing a Single Cycle Datapath Ch 5: Designing a Single Cycle path Computer Systems Architecture CS 365 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Control Memory path Input Output Today s

More information

CS3350B Computer Architecture Winter Lecture 5.6: Single-Cycle CPU: Datapath Control (Part 1)

CS3350B Computer Architecture Winter Lecture 5.6: Single-Cycle CPU: Datapath Control (Part 1) CS3350B Computer Architecture Winter 2015 Lecture 56: Single-Cycle CPU: Datapath Control (Part 1) Marc Moreno Maza wwwcsduwoca/courses/cs3350b [Adapted from lectures on Computer Organization and Design,

More information

Decoding Instructions

Decoding Instructions Decoding s Decoding instructions involves Sending the instruction s fields to the control unit Control Unit r Register r 2 Write r Data ing two values from the Register Executing R-Type s R-type instructions

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

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek Instruction Set Architecture or How to talk to computers if you aren t in Star Trek The Instruction Set Architecture Application Compiler Instr. Set Proc. Operating System I/O system Instruction Set Architecture

More information

Basic Computer Organization

Basic Computer Organization SE 292 (3:0) High Performance Computing L2: Basic Computer Organization R. Govindarajan govind@serc Basic Computer Organization Main parts of a computer system: Processor: Executes programs Main memory:

More information

Machine Code. How the Assembler Works

Machine Code. How the Assembler Works 1 / 32 Machine Code -and- How the Assembler Works Mar 8 13, 2013 2 / 32 Outline What is machine code? RISC vs. CISC MIPS instruction formats Assembling basic instructions R-type instructions I-type instructions

More information

Computing Systems. The Processor: Datapath and Control. The performance of a machine depends on 3 key factors:

Computing Systems. The Processor: Datapath and Control. The performance of a machine depends on 3 key factors: Computing Systems The Processor: Datapath and Control claudio.talarico@mail.ewu.edu 1 Introduction The performance of a machine depends on 3 key factors: compiler and ISA instruction count clock cycle

More information

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

Chapter 3. lw $s1,100($s2) $s1 = Memory[$s2+100] sw $s1,100($s2) Memory[$s2+100] = $s1 Chapter 3 1 MIPS Instructions Instruction Meaning add $s1,$s2,$s3 $s1 = $s2 + $s3 sub $s1,$s2,$s3 $s1 = $s2 $s3 addi $s1,$s2,4 $s1 = $s2 + 4 ori $s1,$s2,4 $s2 = $s2 4 lw $s1,100($s2) $s1 = Memory[$s2+100]

More information

Lecture 3: MIPS Instruction Set

Lecture 3: MIPS Instruction Set Lecture 3: MIPS Instruction Set Today s topic: More MIPS instructions Procedure call/return Reminder: Assignment 1 is on the class web-page (due 9/7) 1 Memory Operands Values must be fetched from memory

More information

7. MIPS Instruction Set Architecture

7. MIPS Instruction Set Architecture CSEE 3827: Fundamentals of Computer Systems, Spring 2011 7. MIPS Instruction Set Architecture Prof. Martha Kim (martha@cs.columbia.edu) Web: http://www.cs.columbia.edu/~martha/courses/3827/sp11/ Outline

More information

Computer Architecture

Computer Architecture Computer Architecture Having studied numbers, combinational and sequential logic, and assembly language programming, we begin the study of the overall computer system. The term computer architecture is

More information

Instructions: Assembly Language

Instructions: Assembly Language Chapter 2 Instructions: Assembly Language Reading: The corresponding chapter in the 2nd edition is Chapter 3, in the 3rd edition it is Chapter 2 and Appendix A and in the 4th edition it is Chapter 2 and

More information

Chapter 3 MIPS Assembly Language Morgan Kaufmann Publishers

Chapter 3 MIPS Assembly Language Morgan Kaufmann Publishers Chapter 3 MIPS Assembly Language 1 Review MIPS instruction:fixed instruction size(32bit) and 3 simple formats bne or beq: R type or I-type? Using slt and beq to simulate branch if less than pseudo instruction

More information

Intro to Digital Design

Intro to Digital Design Intro to Digital Design Basic Computer Components Instructor: Justin Hsia Practice Problem Inputs A and B come from registers. Output S goes directly to a register input. For an bit adder, what is the

More information

Instruction Set Architecture

Instruction Set Architecture Instruction Set Architecture Consider x := y+z. (x, y, z are memory variables) 1-address instructions 2-address instructions LOAD y (r :=y) ADD y,z (y := y+z) ADD z (r:=r+z) MOVE x,y (x := y) STORE x (x:=r)

More information

Assignment 2 Solutions Instruction Set Architecture, Performance, Spim, and Other ISAs

Assignment 2 Solutions Instruction Set Architecture, Performance, Spim, and Other ISAs Assignment 2 Solutions Instruction Set Architecture, Performance, Spim, and Other ISAs Alice Liang Apr 18, 2013 Unless otherwise noted, the following problems are from the Patterson & Hennessy textbook

More information

response (or execution) time -- the time between the start and the finish of a task throughput -- total amount of work done in a given time

response (or execution) time -- the time between the start and the finish of a task throughput -- total amount of work done in a given time Chapter 4: Assessing and Understanding Performance 1. Define response (execution) time. response (or execution) time -- the time between the start and the finish of a task 2. Define throughput. throughput

More information

Midterm I SOLUTIONS March 3, 1999 CS152 Computer Architecture and Engineering

Midterm I SOLUTIONS March 3, 1999 CS152 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Spring 1999 John Kubiatowicz Midterm I SOLUTIONS March 3, 1999 CS15 Computer Architecture and Engineering Your Name:

More information

Computer organization

Computer organization Computer organization Computer design an application of digital logic design procedures Computer = processing unit + memory system Processing unit = control + datapath Control = finite state machine inputs

More information

Loop Example. CMPE 325 Computer Architecture II. Loop Solution. Loops in C. Improved Loop Solution. Loop Efficiency. Assembly Language (cont)

Loop Example. CMPE 325 Computer Architecture II. Loop Solution. Loops in C. Improved Loop Solution. Loop Efficiency. Assembly Language (cont) CMPE 325 Computer rchitecture II Cem Ergün Eastern Mediterranean University ssembly Language (cont) Loop Example Consider the code where array is an integer array with 100 elements Loop: g = g + [i] i

More information

Lecture 6 Machine language designed for the common case

Lecture 6 Machine language designed for the common case Lecture 6 Machine language, the binary representation for instructions. We ll see how it is designed for the common case Fixed-sized (32-bit) instructions Only 3 instruction formats Limited-sized immediate

More information

361 Computer Architecture Lecture 12: Designing a Pipeline Processor. Overview of a Multiple Cycle Implementation

361 Computer Architecture Lecture 12: Designing a Pipeline Processor. Overview of a Multiple Cycle Implementation 36 Computer rchitecture Lecture 2: Designing a Pipeline Processor pipeline. Overview of a Multiple Cycle mplementation The root of the single cycle processor s problems: The cycle time has to be long enough

More information

Computer Systems Architecture

Computer Systems Architecture Computer Systems Architecture http://cs.nott.ac.uk/ txa/g51csa/ Thorsten Altenkirch and Liyang Hu School of Computer Science and IT University of Nottingham Lecture 04: Machine Code, Data Transfer and

More information

We also introduced the MIPS processor and its instructions

We also introduced the MIPS processor and its instructions 5JJ70 Computation Implementatie van rekenprocessen Translate C into MIPS assembly Henk Corporaal December 2009 Welcome So far we covered almost all of C, and a large part of C++ We also introduced the

More information

System Programming. The SPIM S20 MIPS Simulator

System Programming. The SPIM S20 MIPS Simulator Sep 06 Hugo Marcondes (http://www.lisha.ufsc.br) 1 System Programming The SPIM S MIPS Simulator Hugo Marcondes hugom@lisha.ufsc.br http://www.lisha.ufsc.br/~hugom Sep 06 Sep 06 Hugo Marcondes (http://www.lisha.ufsc.br)

More information

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu. Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.tw Review Computers in mid 50 s Hardware was expensive

More information

Pipeline Hazards. Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. Based on the material prepared by Arvind and Krste Asanovic

Pipeline Hazards. Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. Based on the material prepared by Arvind and Krste Asanovic 1 Pipeline Hazards Computer Science and Artificial Intelligence Laboratory M.I.T. Based on the material prepared by and Krste Asanovic 6.823 L6-2 Technology Assumptions A small amount of very fast memory

More information

Computer Organization and Components

Computer Organization and Components Computer Organization and Components IS5, fall 25 Lecture : Pipelined Processors ssociate Professor, KTH Royal Institute of Technology ssistant Research ngineer, University of California, Berkeley Slides

More information

CS4617 Computer Architecture

CS4617 Computer Architecture 1/39 CS4617 Computer Architecture Lecture 20: Pipelining Reference: Appendix C, Hennessy & Patterson Reference: Hamacher et al. Dr J Vaughan November 2013 2/39 5-stage pipeline Clock cycle Instr No 1 2

More information

Typy danych. Data types: Literals:

Typy danych. Data types: Literals: Lab 10 MIPS32 Typy danych Data types: Instructions are all 32 bits byte(8 bits), halfword (2 bytes), word (4 bytes) a character requires 1 byte of storage an integer requires 1 word (4 bytes) of storage

More information

Processing Unit Design

Processing Unit Design &CHAPTER 5 Processing Unit Design In previous chapters, we studied the history of computer systems and the fundamental issues related to memory locations, addressing modes, assembly language, and computer

More information

Introduction to MIPS Assembly Programming

Introduction to MIPS Assembly Programming 1 / 26 Introduction to MIPS Assembly Programming January 23 25, 2013 2 / 26 Outline Overview of assembly programming MARS tutorial MIPS assembly syntax Role of pseudocode Some simple instructions Integer

More information

Mips Code Examples Peter Rounce

Mips Code Examples Peter Rounce Mips Code Examples Peter Rounce P.Rounce@cs.ucl.ac.uk Some C Examples Assignment : int j = 10 ; // space must be allocated to variable j Possibility 1: j is stored in a register, i.e. register $2 then

More information

Chapter 5. Processing Unit Design

Chapter 5. Processing Unit Design Chapter 5 Processing Unit Design 5.1 CPU Basics A typical CPU has three major components: Register Set, Arithmetic Logic Unit, and Control Unit (CU). The register set is usually a combination of general-purpose

More information

Design of Pipelined MIPS Processor. Sept. 24 & 26, 1997

Design of Pipelined MIPS Processor. Sept. 24 & 26, 1997 Design of Pipelined MIPS Processor Sept. 24 & 26, 1997 Topics Instruction processing Principles of pipelining Inserting pipe registers Data Hazards Control Hazards Exceptions MIPS architecture subset R-type

More information

Translating C code to MIPS

Translating C code to MIPS Translating C code to MIPS why do it C is relatively simple, close to the machine C can act as pseudocode for assembler program gives some insight into what compiler needs to do what's under the hood do

More information

Instruction Set Design

Instruction Set Design Instruction Set Design Instruction Set Architecture: to what purpose? ISA provides the level of abstraction between the software and the hardware One of the most important abstraction in CS It s narrow,

More information

MIPS Hello World. MIPS Assembly 1

MIPS Hello World. MIPS Assembly 1 MIPS Hello World MIPS Assembly 1 # Hello, World!.data ## Data declaration section ## String to be printed: out_string:.asciiz "\nhello, World!\n".text ## Assembly language instructions go in text segment

More information

CS 350 COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE PROGRAMMING Week 5

CS 350 COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE PROGRAMMING Week 5 CS 350 COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE PROGRAMMING Week 5 Reading: Objectives: 1. D. Patterson and J. Hennessy, Chapter- 4 To understand load store architecture. Learn how to implement Load

More information

High level language programs versus Machine code

High level language programs versus Machine code High level language programs versus Machine code You all have experience programming in a high level language. You know that when you write a program in a language such as C or Java, the program is nothing

More information

Advanced Computer Architecture-CS501

Advanced Computer Architecture-CS501 Lecture Handouts Computer Architecture Lecture No. 12 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 4 Computer Systems Design and Architecture 4.1, 4.2, 4.3 Summary 7) The design process

More information

Computer Architectures

Computer Architectures Computer Architectures Central Processing Unit (CPU) Pavel Píša, Michal Štepanovský, Miroslav Šnorek The lecture is based on A0B36APO lecture. Some parts are inspired by the book Paterson, D., Henessy,

More information

MIPS ISA-II: Procedure Calls & Program Assembly

MIPS ISA-II: Procedure Calls & Program Assembly MIPS ISA-II: Procedure Calls & Program Assembly Module Outline Review ISA and understand instruction encodings Arithmetic and Logical Instructions Review memory organization Memory (data movement) instructions

More information

CSE 141 Introduction to Computer Architecture Summer Session I, 2005. Lecture 1 Introduction. Pramod V. Argade June 27, 2005

CSE 141 Introduction to Computer Architecture Summer Session I, 2005. Lecture 1 Introduction. Pramod V. Argade June 27, 2005 CSE 141 Introduction to Computer Architecture Summer Session I, 2005 Lecture 1 Introduction Pramod V. Argade June 27, 2005 CSE141: Introduction to Computer Architecture Instructor: Pramod V. Argade (p2argade@cs.ucsd.edu)

More information

Solutions. Solution 4.1. 4.1.1 The values of the signals are as follows:

Solutions. Solution 4.1. 4.1.1 The values of the signals are as follows: 4 Solutions Solution 4.1 4.1.1 The values of the signals are as follows: RegWrite MemRead ALUMux MemWrite ALUOp RegMux Branch a. 1 0 0 (Reg) 0 Add 1 (ALU) 0 b. 1 1 1 (Imm) 0 Add 1 (Mem) 0 ALUMux is the

More information

Quiz for Chapter 2 Instructions: Language of the Computer3.10

Quiz for Chapter 2 Instructions: Language of the Computer3.10 Date: 3.10 Not all questions are of equal difficulty. Please review the entire quiz first and then budget your time carefully. Name: Course: Solutions in Red 1. [5 points] Prior to the early 1980s, machines

More information

Instruction Set Architecture (ISA) Design. Classification Categories

Instruction Set Architecture (ISA) Design. Classification Categories Instruction Set Architecture (ISA) Design Overview» Classify Instruction set architectures» Look at how applications use ISAs» Examine a modern RISC ISA (DLX)» Measurement of ISA usage in real computers

More information

Assembly Language Programming

Assembly Language Programming Assembly Language Programming Assemblers were the first programs to assist in programming. The idea of the assembler is simple: represent each computer instruction with an acronym (group of letters). Eg:

More information

Pipeline Hazards. Structure hazard Data hazard. ComputerArchitecture_PipelineHazard1

Pipeline Hazards. Structure hazard Data hazard. ComputerArchitecture_PipelineHazard1 Pipeline Hazards Structure hazard Data hazard Pipeline hazard: the major hurdle A hazard is a condition that prevents an instruction in the pipe from executing its next scheduled pipe stage Taxonomy of

More information

Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings: 9.1-9.

Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings: 9.1-9. Code Generation I Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings: 9.1-9.7 Stack Machines A simple evaluation model No variables

More information

Introducción. Diseño de sistemas digitales.1

Introducción. Diseño de sistemas digitales.1 Introducción Adapted from: Mary Jane Irwin ( www.cse.psu.edu/~mji ) www.cse.psu.edu/~cg431 [Original from Computer Organization and Design, Patterson & Hennessy, 2005, UCB] Diseño de sistemas digitales.1

More information

Effective Exploiting of Hardware Description. Language as a Tool in Teaching the Digital. and Computer Circuits

Effective Exploiting of Hardware Description. Language as a Tool in Teaching the Digital. and Computer Circuits Contemporary Engineering Sciences, Vol. 6, 2013, no. 1, 19 34 HIKARI Ltd, www.m-hikari.com Effective Exploiting of Hardware Description Language as a Tool in Teaching the Digital and Computer Circuits

More information

The University of Nottingham

The University of Nottingham The University of Nottingham School of Computer Science A Level 1 Module, Autumn Semester 2007-2008 Computer Systems Architecture (G51CSA) Time Allowed: TWO Hours Candidates must NOT start writing their

More information

Lecture 5: MIPS Examples

Lecture 5: MIPS Examples Lecture 5: MIPS Examples Today s topics: the compilation process full example sort in C Reminder: 2 nd assignment will be posted later today 1 Dealing with Characters Instructions are also provided to

More information

CSI 333 Lecture 17 MIPS Assembly Language (MAL): Part V (MIPS Instruction Formats) 17 1 / 16

CSI 333 Lecture 17 MIPS Assembly Language (MAL): Part V (MIPS Instruction Formats) 17 1 / 16 CSI 333 Lecture 17 MIPS Assembly Language (MAL): Part V (MIPS Instruction Formats) 17 1 / 16 MIPS Instruction Formats Each MIPS machine instruction occupies one word (32 bits). Three instruction formats

More information

Example: Array Access

Example: Array Access ECE232: Hardware Organization and Design Part 7: MIPS Instructions III http://www.ecs.umass.edu/ece/ece232/ Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Example: Array Access

More information

CS-208 Computer Architecture

CS-208 Computer Architecture CS-208 Computer Architecture Lecture 5 Computer Arithmetic II: Shifters & Multipliers Fall 2014 Prof. Babak Falsafi parsa.epfl.ch/courses/cs208/ Adapted from slides originally developed by Profs. Hill,

More information

The LC-3. University of Texas at Austin CS310H - Computer Organization Spring 2010 Don Fussell

The LC-3. University of Texas at Austin CS310H - Computer Organization Spring 2010 Don Fussell The LC-3 University of Texas at Austin CS310H - Computer Organization Spring 2010 Don Fussell Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer

More information

CA226 Advanced Computer Architecture

CA226 Advanced Computer Architecture Table of Contents Stephen Blott MIPS MIPS is: a RISC instruction-set architecture: all ALU operations are register-register initially 32-bit, later 64-bit Its design is heavily influenced

More information

MIPS Assembly Code Layout

MIPS Assembly Code Layout Learning MIPS & SPIM MIPS assembly is a low-level programming language The best way to learn any programming language is to write code We will get you started by going through a few example programs and

More information

CS107 Handout 12 Spring 2008 April 18, 2008 Computer Architecture: Take I

CS107 Handout 12 Spring 2008 April 18, 2008 Computer Architecture: Take I CS107 Handout 12 Spring 2008 April 18, 2008 Computer Architecture: Take I Computer architecture Handout written by Julie Zelenski and Nick Parlante A simplified picture with the major features of a computer

More information

Chapter 9 Computer Design Basics!

Chapter 9 Computer Design Basics! Logic and Computer Design Fundamentals Chapter 9 Computer Design Basics! Part 2 A Simple Computer! Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode)

More information

Lecture Outline. Stack machines The MIPS assembly language. Code Generation (I)

Lecture Outline. Stack machines The MIPS assembly language. Code Generation (I) Lecture Outline Code Generation (I) Stack machines The MIPS assembl language Adapted from Lectures b Profs. Ale Aiken and George Necula (UCB) A simple source language Stack- machine implementation of the

More information

Chapter 2 Topics. 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC

Chapter 2 Topics. 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC Chapter 2 Topics 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC See Appendix C for Assembly language information. 2.4

More information

More MIPS: Recursion. Computer Science 104 Lecture 9

More MIPS: Recursion. Computer Science 104 Lecture 9 More MIPS: Recursion Computer Science 104 Lecture 9 Admin Homework Homework 1: graded. 50% As, 27% Bs Homework 2: Due Wed Midterm 1 This Wed 1 page of notes 2 Last time What did we do last time? 3 Last

More information

Intel 8086 architecture

Intel 8086 architecture Intel 8086 architecture Today we ll take a look at Intel s 8086, which is one of the oldest and yet most prevalent processor architectures around. We ll make many comparisons between the MIPS and 8086

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

The Von Neumann Model. University of Texas at Austin CS310H - Computer Organization Spring 2010 Don Fussell

The Von Neumann Model. University of Texas at Austin CS310H - Computer Organization Spring 2010 Don Fussell The Von Neumann Model University of Texas at Austin CS310H - Computer Organization Spring 2010 Don Fussell The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic

More information

6.5 TOY Machine Architecture

6.5 TOY Machine Architecture The TOY Machine 6.5 TOY Machine Architecture Combinational circuits. ALU. Sequential circuits. Memory. Machine architecture. Wire components together to make computer. TOY machine. 256 16-bit words of

More information

MIPS Introduction. Reading: Chapter 3. Appendix A. Language of the Machine. More primitive than higher level languages

MIPS Introduction. Reading: Chapter 3. Appendix A. Language of the Machine. More primitive than higher level languages MIPS Introduction Reading: Chapter 3. Appendix A. Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow such as for and while only simple branch, jump,

More information

Quiz for Chapter 4 The Processor3.10

Quiz for Chapter 4 The Processor3.10 Date: 3.10 Not all questions are of equal difficulty. Please review the entire quiz first and then budget your time carefully. Name: Course: Solutions in RED 1. [6 points] For the MIPS datapath shown below,

More information

Recap & Perspective. Sequential Logic Circuits & Architecture Alternatives. Register Operation. Building a Register. Timing Diagrams.

Recap & Perspective. Sequential Logic Circuits & Architecture Alternatives. Register Operation. Building a Register. Timing Diagrams. Sequential Logic Circuits & Architecture Alternatives Recap & Perspective COMP 251 Computer Organization and Architecture Fall 2009 So Far: ALU Implementation Next: Register Implementation Register Operation

More information

Computer Organization and Architecture

Computer Organization and Architecture Computer Organization and Architecture Chapter 11 Instruction Sets: Addressing Modes and Formats Instruction Set Design One goal of instruction set design is to minimize instruction length Another goal

More information

CSE320 Final Exam Practice Questions

CSE320 Final Exam Practice Questions CSE320 Final Exam Practice Questions Single Cycle Datapath/ Multi Cycle Datapath Adding instructions Modify the datapath and control signals to perform the new instructions in the corresponding datapath.

More information

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010 Instruction Set Architecture Micro-architecture Datapath & Control CIT 595 Spring 2010 ISA =Programmer-visible components & operations Memory organization Address space -- how may locations can be addressed?

More information

ARM instruction set. ARM versions. ARM assembly language

ARM instruction set. ARM versions. ARM assembly language ARM instruction set ARM versions. ARM assembly language. ARM programming model. ARM memory organization. ARM data operations. ARM flow of control. ARM versions ARM architecture has been extended over several

More information

Instruction Set Architecture

Instruction Set Architecture Instruction Set Architecture Arquitectura de Computadoras Arturo Díaz D PérezP Centro de Investigación n y de Estudios Avanzados del IPN adiaz@cinvestav.mx Arquitectura de Computadoras ISA- 1 Instruction

More information

The Program Counter. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

The Program Counter. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas 1 The Program Counter PC = 0040003c EPC = 00000000 Cause = 00000000 BadVAddr= 00000000 Status = 3000ff10 HI = 00000000 LO = 00000000 General Registers R0 (r0) = 00000000 R8 (t0) = 00000000 R16 (s0) = 00000000

More information

A SystemC Transaction Level Model for the MIPS R3000 Processor

A SystemC Transaction Level Model for the MIPS R3000 Processor SETIT 2007 4 th International Conference: Sciences of Electronic, Technologies of Information and Telecommunications March 25-29, 2007 TUNISIA A SystemC Transaction Level Model for the MIPS R3000 Processor

More information

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language 198:211 Computer Architecture Topics: Processor Design Where are we now? C-Programming A real computer language Data Representation Everything goes down to bits and bytes Machine representation Language

More information

Design of Digital Circuits (SS16)

Design of Digital Circuits (SS16) Design of Digital Circuits (SS16) 252-0014-00L (6 ECTS), BSc in CS, ETH Zurich Lecturers: Srdjan Capkun, D-INFK, ETH Zurich Frank K. Gürkaynak, D-ITET, ETH Zurich Labs: Der-Yeuan Yu dyu@inf.ethz.ch Website:

More information

Introduction to Design of a Tiny Computer

Introduction to Design of a Tiny Computer Introduction to Design of a Tiny Computer (Background of LAB#4) Objective In this lab, we will build a tiny computer in Verilog. The execution results will be displayed in the HEX[3:0] of your board. Unlike

More information

Lecture 4. Announcements:

Lecture 4. Announcements: Announcements: Lecture 4 HW1 posted on Saturday morning. We gave a little over a week. We are going to discuss relevant material over the next two lectures. Lab1 posted. But if you start doing it, you

More information

UNIT III CONTROL UNIT DESIGN

UNIT III CONTROL UNIT DESIGN UNIT III CONTROL UNIT DESIGN INTRODUCTION CONTROL TRANSFER FETCH CYCLE INSTRUCTION INTERPRETATION AND EXECUTION HARDWIRED CONTROL MICROPROGRAMMED CONTROL Slides Courtesy of Carl Hamacher, Computer Organization,

More information

HW 5 Solutions. Manoj Mardithaya

HW 5 Solutions. Manoj Mardithaya HW 5 Solutions Manoj Mardithaya Question 1: Processor Performance The critical path latencies for the 7 major blocks in a simple processor are given below. IMem Add Mux ALU Regs DMem Control a 400ps 100ps

More information

Winter 2002 MID-SESSION TEST Friday, March 1 6:30 to 8:00pm

Winter 2002 MID-SESSION TEST Friday, March 1 6:30 to 8:00pm University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Instructors: Dr. S. A. Norman (L01) and Dr. S. Yanushkevich (L02) Winter 2002 MID-SESSION TEST Friday,

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine

More information

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc Other architectures Example. Accumulator-based machines A single register, called the accumulator, stores the operand before the operation, and stores the result after the operation. Load x # into acc

More information

EECS 427 RISC PROCESSOR

EECS 427 RISC PROCESSOR RISC PROCESSOR ISA FOR EECS 427 PROCESSOR ImmHi/ ImmLo/ OP Code Rdest OP Code Ext Rsrc Mnemonic Operands 15-12 11-8 7-4 3-0 Notes (* is Baseline) ADD Rsrc, Rdest 0000 Rdest 0101 Rsrc * ADDI Imm, Rdest

More information

Chapter 2 : Central Processing Unit

Chapter 2 : Central Processing Unit Chapter 2 Central Processing Unit The part of the computer that performs the bulk of data processing operations is called the Central Processing Unit (CPU) and is the central component of a digital computer.

More information

CPU- Internal Structure

CPU- Internal Structure ESD-1 Elettronica dei Sistemi Digitali 1 CPU- Internal Structure Lesson 12 CPU Structure&Function Instruction Sets Addressing Modes Read Stallings s chapters: 11, 9, 10 esd-1-9:10:11-2002 1 esd-1-9:10:11-2002

More information

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX Overview CISC Developments Over Twenty Years Classic CISC design: Digital VAX VAXÕs RISC successor: PRISM/Alpha IntelÕs ubiquitous 80x86 architecture Ð 8086 through the Pentium Pro (P6) RJS 2/3/97 Philosophy

More information

Generating MIF files

Generating MIF files Generating MIF files Introduction In order to load our handwritten (or compiler generated) MIPS assembly problems into our instruction ROM, we need a way to assemble them into machine language and then

More information

MIPS Assembler and Simulator

MIPS Assembler and Simulator MIPS Assembler and Simulator Reference Manual Last Updated, December 1, 2005 Xavier Perséguers (ing. info. dipl. EPF) Swiss Federal Institude of Technology xavier.perseguers@a3.epfl.ch Preface MIPS Assembler

More information

CPU Organization and Assembly Language

CPU Organization and Assembly Language COS 140 Foundations of Computer Science School of Computing and Information Science University of Maine October 2, 2015 Outline 1 2 3 4 5 6 7 8 Homework and announcements Reading: Chapter 12 Homework:

More information

MICROPROCESSOR AND MICROCOMPUTER BASICS

MICROPROCESSOR AND MICROCOMPUTER BASICS Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit

More information

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December 2009 23:59

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December 2009 23:59 COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December 2009 23:59 Overview: In the first projects for COMP 303, you will design and implement a subset of the MIPS32 architecture

More information

Engineering 9859 CoE Fundamentals Computer Architecture

Engineering 9859 CoE Fundamentals Computer Architecture Engineering 9859 CoE Fundamentals Computer Architecture Instruction Set Principles Dennis Peters 1 Fall 2007 1 Based on notes from Dr. R. Venkatesan RISC vs. CISC Complex Instruction Set Computers (CISC)

More information

MIPS Calling Convention

MIPS Calling Convention MIPS Calling Convention This document summarizes the calling conventions that we expect you to use in ECE 314 for homework problems and assembly language programming projects. These are the rules for how

More information