WAR: Write After Read

Size: px
Start display at page:

Download "WAR: Write After Read"

Transcription

1 WAR: Write After Read write-after-read (WAR) = artificial (name) dependence add R1, R2, R3 sub R2, R4, R1 or R1, R6, R3 problem: add could use wrong value for R2 can t happen in vanilla pipeline (reads in ID, writes in WB) can happen if: early writes (e.g., auto-increment) + late reads (??) can happen if: out-of-order reads (e.g., out-of-order execution) artificial: using different output register for sub would solve The dependence is on the name R2, but not on actual dataflow 31

2 WAW: Write After Write write-after-write (WAW) = artificial (name) dependence add R1,R2,R3 sub R2,R4,R1 or R1,R6,R3 problem: reordering could leave wrong value in R1 later instruction that reads R1 would get wrong value can t happen in vanilla pipeline (register writes are in order) another reason for making ALU ops go through MEM stage can happen: multi-cycle operations (e.g., FP ops, cache misses) artificial: using different output register for or would solve Also a dependence on a name: R1 32

3 read-after-read (RAR) RAR: Read After Read add R1, R2, R3 sub R2, R4, R1 or R1, R6, R3 no problem: R3 is correct even with reordering 33

4 Memory Data Hazards have seen register hazards, can also have memory hazards RAW WAR WAW store R1,0(SP) load R4,0(SP) load R4,0(SP) store R1,0(SP) store R1,0(SP) store R4,0(SP) store R1,0(SP) F D X M W load R1,0(SP) F D X M W in simple pipeline, memory hazards are easy in-order one at a time read & write in same stage in general, though, more difficult than register hazards 34

5 Hazards vs. Dependences dependence: fixed property of instruction stream (i.e., program) hazard: property of program and processor organization implies potential for executing things in wrong order potential only exists if instructions can be simultaneously in-flight property of dynamic distance between instrs vs. pipeline depth For example, can have RAW dependence with or without hazard depends on pipeline 35

6 Control Hazards when an instruction affects which instruction executes next store R4,0(R5) bne R2,R3,loop sub R1,R6,R3 naive solution: stall until outcome is available (end of EX) + simple low performance (2 cycles here, longer in general) e.g. 15% branches * 2 cycle stall 30% CPI increase! store R4,0(R5) F D X M W bne R2,R3,loop F D X M W?? c* c* F D X M W 36

7 Control Hazards: Fast Branches fast branches: can be evaluated in ID (rather than EX) + reduce stall from 2 cycles to sw R4,0(R5) F D X M W bne R2,R3,loop F D X M W?? c* F D X M W requires more hardware dedicated ID adder for (PC + immediate) targets requires simple branch instructions no time to compare two registers (would need full ALU) comparisons with 0 are fast (beqz, bnez) 37

8 Control Hazards: Delayed Branches delayed branch: execute next instruction whether taken or not instruction after branch said to be in delay slot old microcode trick stolen by RISC (MIPS) store R4,0(R5) bne R2,R3,loop sub R1,R6,R6 bned R2,R3,loop store R4,0(R5) sub R1,R6,R bned R2,R3,loop F D X M W store R4,0(R5) F D X M W sub R1,R6,R6 c* F D X M W 38

9 What To Put In Delay Slot? instruction from before branch when? if branch and instruction are independent helps? always instruction from target (taken) path when? if safe to execute, but may have to duplicate code helps? on taken branch, but may increase code size instruction from fall-through (not-taken) path when? if safe to execute helps? on not-taken branch upshot: short-sighted ISA feature not a big win for today s machines (why? consider pipeline depth) complicates interrupt handling (later) 39

10 Control Hazards: Speculative Execution idea: doing anything is often better than doing nothing speculative execution guess branch target start executing at guessed position execute branch verify (check) guess + minimize penalty if guess is right (to zero?) wrong guess could be worse than not guessing branch prediction: guessing the branch one of the important problems in computer architecture very heavily researched area in last 15 years static: prediction by compiler dynamic: prediction by hardware hybrid: compiler hints to hardware predictor 40

11 The Speculation Game speculation: engagement in risky business transactions on the chance of quick or considerable profit speculative execution (control speculation) execute before all parameters known with certainty + correct speculation + avoid stall/get result early, performance improves incorrect speculation (mis-speculation) must abort/squash incorrect instructions must undo incorrect changes (recover pre-speculation state) the speculation game: profit > penalty profit = speculation accuracy * correct-speculation gain penalty = (1 speculation accuracy) * mis-speculation penalty 41

12 Speculative Execution Scenarios inst0/b F D X M W inst8 F D X M inst9 F D X inst10 F D correct speculation cycle1: fetch branch, predict next (inst8) c2, c3: fetch inst8, inst9 c3: execute/verify branch correct nothing needs to be fixed or changed inst0/b F D X M W inst1 F D inst2 F inst8 verify/flush F D incorrect speculation: mis-speculation c1: fetch branch, predict next (inst1) c2, c3: fetch inst1, inst2 c3: execute/verify branch wrong c3: send correct target to IF (inst8) c3: squash (abort) inst1, inst2 (flush F/D) c4: fetch inst8 42

13 Static (Compiler) Branch Prediction Some static prediction options predict always not-taken + very simple, since we already know the target (PC+4) majority of branches (~65%) are taken (why?) predict always taken + better performance more difficult, must know target before branch is decoded predict backward taken most backward branches are taken predict specific opcodes taken use profiles to predict on per-static branch basis pretty good 43

14 Comparison of Some Static Schemes CPI-penalty = % branch * [(% T * penalty T ) + (% NT * penalty NT )] simple branch statistics 14% PC-changing instructions ( branches ) 65% of PC-changing instructions are taken scheme penalty T penalty NT CPI penalty stall fast branch delayed branch not-taken taken

15 Dynamic Branch Prediction PC regfile F/D D/X X/M M/W BP I$ I$ F D X M W hardware (BP) guesses whether and where a branch will go 0x64 bnez r1,#10 0x74 add r3,r2,r1 start with branch PC (0x64) and produce direction (Taken) direction + target PC (0x74) direction + target PC + target instruction (add r3, r2,r1) D$ 45

16 Branch History Table (BHT) branch PC prediction (T, NT) need decoder/adder to compute target if taken branch history table (BHT) read prediction with least significant bits (LSBs) of branch PC change bit on misprediction + simple multiple PCs may map to same bit (aliasing) BHT major improvements two-bit counters [Smith] correlating/two-level predictors [Patt] hybrid predictors [McFarling] branch PC T/N 46

17 Improvement: Two-bit Counters example: 4-iteration inner loop branch state/prediction N T T T N T T T N T T T branch outcome T T T N T T T N T T T N mis-prediction? * * * * * * problem: two mis-predictions per loop solution: 2-bit saturating counter to implement hysteresis 4 states: strong/weak not-taken (N/n), strong/weak taken (T/t) transitions: N n t T state/prediction n t T T t T T T t T T T branch outcome T T T N T T T N T T T N mis-prediction? * * * * + only one mis-prediction per iteration 47

Branch Prediction Techniques

Branch Prediction Techniques Course on: Advanced Computer Architectures Branch Prediction Techniques Prof. Cristina Silvano Politecnico di Milano email: cristina.silvano@polimi.it Outline Dealing with Branches in the Processor Pipeline

More information

Solution: start more than one instruction in the same clock cycle CPI < 1 (or IPC > 1, Instructions per Cycle) Two approaches:

Solution: start more than one instruction in the same clock cycle CPI < 1 (or IPC > 1, Instructions per Cycle) Two approaches: Multiple-Issue Processors Pipelining can achieve CPI close to 1 Mechanisms for handling hazards Static or dynamic scheduling Static or dynamic branch handling Increase in transistor counts (Moore s Law):

More information

INSTRUCTION LEVEL PARALLELISM PART VII: REORDER BUFFER

INSTRUCTION LEVEL PARALLELISM PART VII: REORDER BUFFER Course on: Advanced Computer Architectures INSTRUCTION LEVEL PARALLELISM PART VII: REORDER BUFFER Prof. Cristina Silvano Politecnico di Milano cristina.silvano@polimi.it Prof. Silvano, Politecnico di Milano

More information

More on Pipelining and Pipelines in Real Machines CS 333 Fall 2006 Main Ideas Data Hazards RAW WAR WAW More pipeline stall reduction techniques Branch prediction» static» dynamic bimodal branch prediction

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

Advanced Pipelining Techniques

Advanced Pipelining Techniques Advanced Pipelining Techniques 1. Dynamic Scheduling 2. Loop Unrolling 3. Software Pipelining 4. Dynamic Branch Prediction Units 5. Register Renaming 6. Superscalar Processors 7. VLIW (Very Large Instruction

More information

CS352H: Computer Systems Architecture

CS352H: Computer Systems Architecture CS352H: Computer Systems Architecture Topic 9: MIPS Pipeline - Hazards October 1, 2009 University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell Data Hazards in ALU Instructions

More information

Lecture: Pipelining Extensions. Topics: control hazards, multi-cycle instructions, pipelining equations

Lecture: Pipelining Extensions. Topics: control hazards, multi-cycle instructions, pipelining equations Lecture: Pipelining Extensions Topics: control hazards, multi-cycle instructions, pipelining equations 1 Problem 6 Show the instruction occupying each stage in each cycle (with bypassing) if I1 is R1+R2

More information

Solutions for the Sample of Midterm Test

Solutions for the Sample of Midterm Test s for the Sample of Midterm Test 1 Section: Simple pipeline for integer operations For all following questions we assume that: a) Pipeline contains 5 stages: IF, ID, EX, M and W; b) Each stage requires

More information

EE282 Computer Architecture and Organization Midterm Exam February 13, 2001. (Total Time = 120 minutes, Total Points = 100)

EE282 Computer Architecture and Organization Midterm Exam February 13, 2001. (Total Time = 120 minutes, Total Points = 100) EE282 Computer Architecture and Organization Midterm Exam February 13, 2001 (Total Time = 120 minutes, Total Points = 100) Name: (please print) Wolfe - Solution In recognition of and in the spirit of the

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

CS 152 Computer Architecture and Engineering. Lecture 10 - Complex Pipelines, Out-of-Order Issue, Register Renaming

CS 152 Computer Architecture and Engineering. Lecture 10 - Complex Pipelines, Out-of-Order Issue, Register Renaming CS 152 Computer Architecture and Engineering Lecture 10 - Complex Pipelines, Out-of-Order Issue, Register Renaming Krste Asanovic Electrical Engineering and Computer Sciences University of California at

More information

CISC 360. Computer Architecture. Seth Morecraft Course Web Site:

CISC 360. Computer Architecture. Seth Morecraft Course Web Site: CISC 360 Computer Architecture Seth Morecraft (morecraf@udel.edu) Course Web Site: http://www.eecis.udel.edu/~morecraf/cisc360 Static & Dynamic Scheduling Scheduling: act of finding independent instructions

More information

Pipelining: Its Natural!

Pipelining: Its Natural! Pipelining: Its Natural! Laundry Example Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 minutes, Dryer takes 40 minutes, Folder takes 20 minutes T a s k O

More information

Instruction Level Parallelism I: Pipelining

Instruction Level Parallelism I: Pipelining Instruction Level Parallelism I: Pipelining Readings: H&P Appendix A Instruction Level Parallelism I: Pipelining 1 This Unit: Pipelining Application OS Compiler Firmware CPU I/O Memory Digital Circuits

More information

VLIW Processors. VLIW Processors

VLIW Processors. VLIW Processors 1 VLIW Processors VLIW ( very long instruction word ) processors instructions are scheduled by the compiler a fixed number of operations are formatted as one big instruction (called a bundle) usually LIW

More information

Computer Organization and Architecture

Computer Organization and Architecture Computer Organization and Architecture Chapter 14 Instruction Level Parallelism and Superscalar Processors What does Superscalar mean? Common instructions (arithmetic, load/store, conditional branch) can

More information

Q. Consider a dynamic instruction execution (an execution trace, in other words) that consists of repeats of code in this pattern:

Q. Consider a dynamic instruction execution (an execution trace, in other words) that consists of repeats of code in this pattern: Pipelining HW Q. Can a MIPS SW instruction executing in a simple 5-stage pipelined implementation have a data dependency hazard of any type resulting in a nop bubble? If so, show an example; if not, prove

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

PROBLEMS #20,R0,R1 #$3A,R2,R4

PROBLEMS #20,R0,R1 #$3A,R2,R4 506 CHAPTER 8 PIPELINING (Corrisponde al cap. 11 - Introduzione al pipelining) PROBLEMS 8.1 Consider the following sequence of instructions Mul And #20,R0,R1 #3,R2,R3 #$3A,R2,R4 R0,R2,R5 In all instructions,

More information

Static Scheduling. option #1: dynamic scheduling (by the hardware) option #2: static scheduling (by the compiler) ECE 252 / CPS 220 Lecture Notes

Static Scheduling. option #1: dynamic scheduling (by the hardware) option #2: static scheduling (by the compiler) ECE 252 / CPS 220 Lecture Notes basic pipeline: single, in-order issue first extension: multiple issue (superscalar) second extension: scheduling instructions for more ILP option #1: dynamic scheduling (by the hardware) option #2: static

More information

CPU Performance Equation

CPU Performance Equation CPU Performance Equation C T I T ime for task = C T I =Average # Cycles per instruction =Time per cycle =Instructions per task Pipelining e.g. 3-5 pipeline steps (ARM, SA, R3000) Attempt to get C down

More information

CSE 141 Midterm Exam

CSE 141 Midterm Exam CSE 141 Midterm Exam 2011 Winter Professor Steven Swanson 1. Please write your name at the top of each page 2. This is a close book, closed notes exam. No outside material may be used. 3. You may use a

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

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

Execution Cycle. Pipelining. IF and ID Stages. Simple MIPS Instruction Formats

Execution Cycle. Pipelining. IF and ID Stages. Simple MIPS Instruction Formats Execution Cycle Pipelining CSE 410, Spring 2005 Computer Systems http://www.cs.washington.edu/410 1. Instruction Fetch 2. Instruction Decode 3. Execute 4. Memory 5. Write Back IF and ID Stages 1. Instruction

More information

PIPELINING CHAPTER OBJECTIVES

PIPELINING CHAPTER OBJECTIVES CHAPTER 8 PIPELINING CHAPTER OBJECTIVES In this chapter you will learn about: Pipelining as a means for executing machine instructions concurrently Various hazards that cause performance degradation in

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

This Unit: Code Scheduling. CIS 371 Computer Organization and Design. Pipelining Review. Readings. ! Pipelining and superscalar review

This Unit: Code Scheduling. CIS 371 Computer Organization and Design. Pipelining Review. Readings. ! Pipelining and superscalar review This Unit: Code Scheduling CIS 371 Computer Organization and Design App App App System software Mem CPU I/O! Pipelining and superscalar review! Code scheduling! To reduce pipeline stalls! To increase ILP

More information

Computer Architecture

Computer Architecture Wider instruction pipelines 2016. május 13. Budapest Gábor Horváth associate professor BUTE Dept. Of Networked Systems and Services ghorvath@hit.bme.hu How to make the CPU faster Option 1: Make the pipeline

More information

How to improve (decrease) CPI

How to improve (decrease) CPI How to improve (decrease) CPI Recall: CPI = Ideal CPI + CPI contributed by stalls Ideal CPI =1 for single issue machine even with multiple execution units Ideal CPI will be less than 1 if we have several

More information

A Brief Review of Processor Architecture. Why are Modern Processors so Complicated? Basic Structure

A Brief Review of Processor Architecture. Why are Modern Processors so Complicated? Basic Structure A Brief Review of Processor Architecture Why are Modern Processors so Complicated? Basic Structure CPU PC IR Regs ALU Memory Fetch PC -> Mem addr [addr] > IR PC ++ Decode Select regs Execute Perform op

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

Multicore and Parallel Processing

Multicore and Parallel Processing Multicore and Parallel Processing Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University P & H Chapter 4.10 11, 7.1 6 Administrivia FlameWar Games Night Next Friday, April 27 th 5pm

More information

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995 UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering EEC180B Lab 7: MISP Processor Design Spring 1995 Objective: In this lab, you will complete the design of the MISP processor,

More information

Data Dependences. A data dependence occurs whenever one instruction needs a value produced by another.

Data Dependences. A data dependence occurs whenever one instruction needs a value produced by another. Data Hazards 1 Hazards: Key Points Hazards cause imperfect pipelining They prevent us from achieving CPI = 1 They are generally causes by counter flow data pennces in the pipeline Three kinds Structural

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

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

Module: Software Instruction Scheduling Part I

Module: Software Instruction Scheduling Part I Module: Software Instruction Scheduling Part I Sudhakar Yalamanchili, Georgia Institute of Technology Reading for this Module Loop Unrolling and Instruction Scheduling Section 2.2 Dependence Analysis Section

More information

The Microarchitecture of Superscalar Processors

The Microarchitecture of Superscalar Processors The Microarchitecture of Superscalar Processors James E. Smith Department of Electrical and Computer Engineering 1415 Johnson Drive Madison, WI 53706 ph: (608)-265-5737 fax:(608)-262-1267 email: jes@ece.wisc.edu

More information

Exercises for EITF20 Computer Architecture HT1 2010

Exercises for EITF20 Computer Architecture HT1 2010 Exercises for EITF20 Computer Architecture HT1 2010 Anders Ardö Department of Electrical and Information Technology, EIT Lund University December 4, 2013 1 Contents 1 Performance 3 2 ISA 7 3 Pipelining

More information

Reduced Instruction Set Computer vs Complex Instruction Set Computers

Reduced Instruction Set Computer vs Complex Instruction Set Computers RISC vs CISC Reduced Instruction Set Computer vs Complex Instruction Set Computers for a given benchmark the performance of a particular computer: P = 1 I C 1 S where P = time to execute I = number of

More information

Introduction to Cloud Computing

Introduction to Cloud Computing Introduction to Cloud Computing Parallel Processing I 15 319, spring 2010 7 th Lecture, Feb 2 nd Majd F. Sakr Lecture Motivation Concurrency and why? Different flavors of parallel computing Get the basic

More information

Pipelining Review and Its Limitations

Pipelining Review and Its Limitations Pipelining Review and Its Limitations Yuri Baida yuri.baida@gmail.com yuriy.v.baida@intel.com October 16, 2010 Moscow Institute of Physics and Technology Agenda Review Instruction set architecture Basic

More information

CS521 CSE IITG 11/23/2012

CS521 CSE IITG 11/23/2012 CS521 CSE TG 11/23/2012 A Sahu 1 Degree of overlap Serial, Overlapped, d, Super pipelined/superscalar Depth Shallow, Deep Structure Linear, Non linear Scheduling of operations Static, Dynamic A Sahu slide

More information

Spring 2011 Prof. Hyesoon Kim

Spring 2011 Prof. Hyesoon Kim Spring 2011 Prof. Hyesoon Kim MIPS Architecture MIPS (Microprocessor without interlocked pipeline stages) MIPS Computer Systems Inc. Developed from Stanford MIPS architecture usages 1990 s R2000, R3000,

More information

Administration. Instruction scheduling. Modern processors. Examples. Simplified architecture model. CS 412 Introduction to Compilers

Administration. Instruction scheduling. Modern processors. Examples. Simplified architecture model. CS 412 Introduction to Compilers CS 4 Introduction to Compilers ndrew Myers Cornell University dministration Prelim tomorrow evening No class Wednesday P due in days Optional reading: Muchnick 7 Lecture : Instruction scheduling pr 0 Modern

More information

Course on Advanced Computer Architectures

Course on Advanced Computer Architectures Course on Advanced Computer Architectures Surname (Cognome) Name (Nome) POLIMI ID Number Signature (Firma) SOLUTION Politecnico di Milano, September 3rd, 2015 Prof. C. Silvano EX1A ( 2 points) EX1B ( 2

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

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

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

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

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

IA-64 Application Developer s Architecture Guide

IA-64 Application Developer s Architecture Guide IA-64 Application Developer s Architecture Guide The IA-64 architecture was designed to overcome the performance limitations of today s architectures and provide maximum headroom for the future. To achieve

More information

Classifying Load and Store Instructions for Memory Renaming

Classifying Load and Store Instructions for Memory Renaming Classifying Load and Store Instructions for Memory Renaming Glenn Reinman y Brad Calder y Dean Tullsen y Gary Tyson z Todd Austin y Department of Computer Science and Engineering, University of California,

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

ARM Cortex-A8 Processor

ARM Cortex-A8 Processor ARM Cortex-A8 Processor High Performances And Low Power for Portable Applications Architectures for Multimedia Systems Prof. Cristina Silvano Gianfranco Longi Matr. 712351 ARM Partners 1 ARM Powered Products

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

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

An Introduction to the ARM 7 Architecture

An Introduction to the ARM 7 Architecture An Introduction to the ARM 7 Architecture Trevor Martin CEng, MIEE Technical Director This article gives an overview of the ARM 7 architecture and a description of its major features for a developer new

More information

CIS371 Computer Organization and Design Final Exam Solutions Prof. Martin Wednesday, May 2nd, 2012

CIS371 Computer Organization and Design Final Exam Solutions Prof. Martin Wednesday, May 2nd, 2012 1 CIS371 Computer Organization and Design Final Exam Solutions Prof. Martin Wednesday, May 2nd, 2012 1. [ 12 Points ] Datapath & Pipelining. (a) Consider a simple in-order five-stage pipeline with a two-cycle

More information

CSE502: Computer Architecture CSE 502: Computer Architecture

CSE502: Computer Architecture CSE 502: Computer Architecture CSE 502: Computer Architecture Out-of-Order Memory Access Dynamic Scheduling Summary Out-of-order execution: a performance technique Feature I: Dynamic scheduling (io OoO) Performance piece: re-arrange

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

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

Using Graphics and Animation to Visualize Instruction Pipelining and its Hazards

Using Graphics and Animation to Visualize Instruction Pipelining and its Hazards Using Graphics and Animation to Visualize Instruction Pipelining and its Hazards Per Stenström, Håkan Nilsson, and Jonas Skeppstedt Department of Computer Engineering, Lund University P.O. Box 118, S-221

More information

William Stallings Computer Organization and Architecture

William Stallings Computer Organization and Architecture William Stallings Computer Organization and Architecture Chapter 12 CPU Structure and Function Rev. 3.3 (2009-10) by Enrico Nardelli 12-1 CPU Functions CPU must: Fetch instructions Decode instructions

More information

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of CS:APP Chapter 4 Computer Architecture Wrap-Up William J. Taffe Plymouth State University using the slides of Randal E. Bryant Carnegie Mellon University Overview Wrap-Up of PIPE Design Performance analysis

More information

Week 1 out-of-class notes, discussions and sample problems

Week 1 out-of-class notes, discussions and sample problems Week 1 out-of-class notes, discussions and sample problems Although we will primarily concentrate on RISC processors as found in some desktop/laptop computers, here we take a look at the varying types

More information

Computer Architecture TDTS10

Computer Architecture TDTS10 why parallelism? Performance gain from increasing clock frequency is no longer an option. Outline Computer Architecture TDTS10 Superscalar Processors Very Long Instruction Word Processors Parallel computers

More information

Pipelining. The key implementation technique used to make fast CPUs. Multiple instructions are overlapped in execution. Instr. i+6

Pipelining. The key implementation technique used to make fast CPUs. Multiple instructions are overlapped in execution. Instr. i+6 Pipelining The key implementation technique used to make fast CPUs. Multiple instructions are overlapped in execution. Instr. i+6 Pipe Stage Instr. i+5 time/stage All stages must be IF Instr. i+4 60+5

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

NATIONAL UNIVERSITY OF SINGAPORE

NATIONAL UNIVERSITY OF SINGAPORE NATIONAL UNIVERSITY OF SINGAPORE SCHOOL OF COMPUTING EXAMINATION FOR Semester 2 AY212/213 CS21 COMPUTER ORGANISATION April 213 Time allowed: 2 hours INSTRUCTIONS TO CANDIDATES 1. This examination paper

More information

Boosting Beyond Static Scheduling in a Superscalar Processor

Boosting Beyond Static Scheduling in a Superscalar Processor Boosting Beyond Static Scheduling in a Superscalar Processor Michael D. Smith, Monica S. Lam, and Mark A. Horowitz Computer Systems Laboratory Stanford University, Stanford CA 94305-4070 May 1990 1 Introduction

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

Advanced d Processor Architecture. Computer Systems Laboratory Sungkyunkwan University

Advanced d Processor Architecture. Computer Systems Laboratory Sungkyunkwan University Advanced d Processor Architecture Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Modern Microprocessors More than just GHz CPU Clock Speed SPECint2000

More information

Checkpoint Processing and Recovery: Towards Scalable Large Instruction Window Processors

Checkpoint Processing and Recovery: Towards Scalable Large Instruction Window Processors Checkpoint Processing and Recovery: Towards Scalable Large Instruction Window Processors Haitham Akkary Ravi Rajwar Srikanth T. Srinivasan Microprocessor Research Labs, Intel Corporation Hillsboro, Oregon

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

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

EE482: Advanced Computer Organization Lecture #11 Processor Architecture Stanford University Wednesday, 31 May 2000. ILP Execution

EE482: Advanced Computer Organization Lecture #11 Processor Architecture Stanford University Wednesday, 31 May 2000. ILP Execution EE482: Advanced Computer Organization Lecture #11 Processor Architecture Stanford University Wednesday, 31 May 2000 Lecture #11: Wednesday, 3 May 2000 Lecturer: Ben Serebrin Scribe: Dean Liu ILP Execution

More information

Hardware-Software Codesign. 9. Worst Case Execution Time Analysis

Hardware-Software Codesign. 9. Worst Case Execution Time Analysis Hardware-Software Codesign 9. Worst Case Execution Time Analysis Lothar Thiele 9-1 System Design Specification System Synthesis Estimation SW-Compilation Intellectual Prop. Code Instruction Set HW-Synthesis

More information

CSE 30321 Computer Architecture I Fall 2009 Final Exam December 18, 2009

CSE 30321 Computer Architecture I Fall 2009 Final Exam December 18, 2009 CSE 30321 Computer Architecture I Fall 2009 Final Exam December 18, 2009 Test Guidelines: 1. Place your name on EACH page of the test in the space provided. 2. every question in the space provided. If

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

High Performance Processor Architecture. André Seznec IRISA/INRIA ALF project-team

High Performance Processor Architecture. André Seznec IRISA/INRIA ALF project-team High Performance Processor Architecture André Seznec IRISA/INRIA ALF project-team 1 2 Moore s «Law» Nb of transistors on a micro processor chip doubles every 18 months 1972: 2000 transistors (Intel 4004)

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

Giving credit where credit is due

Giving credit where credit is due CSCE 230J Computer Organization Processor Architecture VI: Wrap-Up Dr. Steve Goddard goddard@cse.unl.edu http://cse.unl.edu/~goddard/courses/csce230j Giving credit where credit is due ost of slides for

More information

Streamlining Data Cache Access with Fast Address Calculation

Streamlining Data Cache Access with Fast Address Calculation Streamlining Data Cache Access with Fast Address Calculation Todd M Austin Dionisios N Pnevmatikatos Gurindar S Sohi Computer Sciences Department University of Wisconsin-Madison 2 W Dayton Street Madison,

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

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

Appendix A Solutions (by Rui Ma and Gregory D. Peterson)

Appendix A Solutions (by Rui Ma and Gregory D. Peterson) 2 Solutions to Case Studies and Exercises Appendix A Solutions (by Rui Ma and Gregory D. Peterson) A.1 The first challenge of this exercise is to obtain the instruction mix. The instruction frequencies

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

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

A Flexible Simulator of Pipelined Processors

A Flexible Simulator of Pipelined Processors A Flexible Simulator of Pipelined Processors Ben Juurlink Koen Bertels Bei Li Computer Engineering Laboratory Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology

More information

This Unit: Multithreading (MT) CIS 501 Computer Architecture. Performance And Utilization. Readings

This Unit: Multithreading (MT) CIS 501 Computer Architecture. Performance And Utilization. Readings This Unit: Multithreading (MT) CIS 501 Computer Architecture Unit 10: Hardware Multithreading Application OS Compiler Firmware CU I/O Memory Digital Circuits Gates & Transistors Why multithreading (MT)?

More information

Computer Architecture and Systems

Computer Architecture and Systems PhD Qualifier Exam, Spring 2013 Computer Architecture and Systems 1. (6 points) Consider a virtual memor system. (1) (2 points) Explain the difference between a virtual address and a phgsical address.

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

CARNEGIE MELLON UNIVERSITY

CARNEGIE MELLON UNIVERSITY CARNEGIE MELLON UNIVERSITY VALUE LOCALITY AND SPECULATIVE EXECUTION A DISSERTATION SUBMITTED TO THE GRADUATE SCHOOL IN PARTIAL FULFILLMENT OF THE REQUIREMENTS for the degree of DOCTOR OF PHILOSOPHY in

More information

BEAGLEBONE BLACK ARCHITECTURE MADELEINE DAIGNEAU MICHELLE ADVENA

BEAGLEBONE BLACK ARCHITECTURE MADELEINE DAIGNEAU MICHELLE ADVENA BEAGLEBONE BLACK ARCHITECTURE MADELEINE DAIGNEAU MICHELLE ADVENA AGENDA INTRO TO BEAGLEBONE BLACK HARDWARE & SPECS CORTEX-A8 ARMV7 PROCESSOR PROS & CONS VS RASPBERRY PI WHEN TO USE BEAGLEBONE BLACK Single

More information

Technical Report. Complexity-effective superscalar embedded processors using instruction-level distributed processing. Ian Caulfield.

Technical Report. Complexity-effective superscalar embedded processors using instruction-level distributed processing. Ian Caulfield. Technical Report UCAM-CL-TR-707 ISSN 1476-2986 Number 707 Computer Laboratory Complexity-effective superscalar embedded processors using instruction-level distributed processing Ian Caulfield December

More information