Branch Predictor Animations Bi-modal, Local, Global CS450/650 Andrew Morton.

Slides:



Advertisements
Similar presentations
Compiler RealView Development Suite 4.0 Supported ARM architecture
Advertisements

For(int i = 1; i
Tree Recursion Traditional Approach. Tree Recursion Consider the Fibonacci Number Sequence: Time: , 1, 1, 2, 3, 5, 8, 13, 21,... /
What are these?. What is this? What are these?
CS 101 Introductory Programming - Lecture 7: Loops In C & Good Coding Practices Presenter: Ankur Chattopadhyay.
What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;
Picture It Very Basic Game Picture Pepper. Original Game import java.util.Scanner; public class Game { public static void main() { Scanner scan=new Scanner(System.in);
CS 112 Introduction to Programming
CS 221 Chapter 2 Excel. In Excel: A1 = 95 A2 = 95 A3 = 80 A4 = 0 =IF(A1
Whitebox Testing Fra: CS Fall Whitebox Testing AKA Structural, Basis Path Test Normally used at unit level Assumes errors at unit level are.
Hand Trace and Output for: int digit = 0; int number = 1423; do { digit = number % 10; System.out.println(digit); number = number / 10; } while (number.
Templated Functions. Overloading vs Templating  Overloaded functions allow multiple functions with the same name.
Loop invariant code removal CS 480. Our sample calculation for i := 1 to n for j := 1 to m c [i, j] := 0 for k := 1 to p c[i, j] := c[i, j] + a[i, k]
Chapter 8 Scope, Lifetime and More on Functions. Definitions Scope –The region of program code where it is legal to reference (use) an identifier Three.
Lecture 8. MIPS Instructions #4 – Branch Instructions #2
CS 152 Computer Architecture & Engineering Andrew Waterman University of California, Berkeley Section 8 Spring 2010.
Understanding BubbleSort CS-502 (EMC) Fall Understanding BubbleSort CS-502, Operating Systems Fall 2009 (EMC) (Slides include materials from Modern.
Branch Predictor Animations Bi-modal, Local, Global CS450/650 Winter 2013 Andrew Morton.
Java: Animation Chris North cs3724: HCI. Animation? Changing graphics over time Examples: cartoons Clippy, agents/assistants Hour glass Save dohicky Progress.
Recursion Examples Fundamentals of CS Case 1: Code /* Recursion: Case 1 */ #include void count (int index); main () { count (0); getchar(); } void count.
1 CS 192 Lecture 5 Winter 2003 December 10-11, 2003 Dr. Shafay Shamail.
Creating With Code.
Java: An Eventful Approach An innovative approach to teaching Java in CS1 † Recursion Kim B. Bruce, Andrea Danyluk & Tom Murtagh Williams College † Partially.
science.howstuffworks.com/ animal-camouflage.htm
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Vectors Part II Application of Linear Combination.
CS430 © 2006 Ray S. Babcock LZW Coding Lempel-Ziv-Welch.
Data Structure CS 322. What is an array? Initializing arrays Accessing the values of an array Multidimensional arrays LAB#1 : Arrays.
CS 162 Intro to Programming II Bubble Sort 1. Compare adjacent elements. If the first is greater than the second, swap them. Do this for each pair of.
A: A: double “4” A: “34” 4.
CS 162 Intro to Programming II Insertion Sort 1. Assume the initial sequence a[0] a[1] … a[k] is already sorted k = 0 when the algorithm starts Insert.
C Programming Chapters 11, . . .
2 Branches of Geography 1.Human – study of world, its people and cultures HUMAN ACTIVITIES -examples – globalization, population, immigration 2. Physical.
Physical Simulation of Tree Motion CS 658 BYU. Skip Right to the Branch Dynamics: Wind effect on branches Njoint = moment of the joint (ie torque applied.
BIS 219 Complete Class Check this A+ tutorial guideline at Complete-Class. For more classes visit
BIS 219 Week 4 DQ 2 What are digital dashboards and management cockpits? What are the capabilities of these information tools? How are global information.
BIS 219 Week 5 DQ 4 What are the three fundamental tenets of a code of ethics? What ethical issues might arise with the widespread use of information systems?
BIS 303 Complete Class Check this A+ tutorial guideline at S-303/BIS-303-Complete-Class-Guide For more classes visit.
BIS 318 Complete Class Check this A+ tutorial guideline at Complete-Class-Guide For more classes visit.
BIS 320 Complete Class Check this A+ tutorial guideline at 320/BIS-320-Complete-Class-Guide For more classes visit.
What is a compiler? Compiler Source code (e.g. C++) Target code
Predictive Coding.
Recursion: The Mirrors
مهارتهای آموزشی و پرورشی ( روشها و فنون تدریس) تالیف: دکتر حسن شعبانی.
Summary of learning styles using Felder’s survey
CS 152 Computer Architecture & Engineering
Review Operation Bingo
March 29th Odds & Ends CS 239.
מיחזור במערכת החינוך.
Animation of Bubble Sort
Scope of Variables.
Stack Memory 2 (also called Call Stack)
مفهوم التربية المدنية.
Life Science.
Compilers B V Sai Aravind (11CS10008).
Shift-Reduce Parsing Example 1
CS-401 Computer Architecture & Assembly Language Programming
فلوشیپ اخلاق زیست پزشکی استادیار دانشگاه علوم پزشکی ایران
Code Animation Examples
ECE 103 Engineering Programming Chapter 12 More C Statements
Adapted from the slides of Prof
Name: Muhammad Hassan VU-ID: BC Version: Office 2007
Rothe, K; Tsokos, M; Handrick, W
Branch Predictor Animations
ANIMALS.
CS150 Introduction to Computer Science 1
Consider the following code segment for a loop: int a = 3, b = 4;
1. What animal 2. Male or Female ? 4. Male or Female? Why? Why?
Scope Rules.
Pakistan Government Presentation. By Henry Musoke.
Too much text. This slide has too much text. This slide has too much text. This slide has too much text. This slide has too much text. This slide has too.
Presentation transcript:

Branch Predictor Animations Bi-modal, Local, Global CS450/650 Andrew Morton

Code Example 1 int i=0, j=3; 2 do { 3 j += 3; 4 b1: if(i == 0) 5 j %= 5; 6 b2: if(j < 2) 7 j++; 8 i++; 9 b3: } while(i<2); lineijb1b2b3 103 lineijb1b2b lineijb1b2b NT lineijb1b2b NT 51 lineijb1b2b NT 51 6 lineijb1b2b NT lineijb1b2b NT lineijb1b2b NT T lineijb1b2b NT T 35 lineijb1b2b NT T 35 4T lineijb1b2b NT T 35 4T 6T lineijb1b2b NT T 35 4T 6T 82 lineijb1b2b NT T 35 4T 6T 82 9

Bimodal Predictor (b2) individual 2-bit up/down counter – initial state = 10 lineijb1b2b NT T 35 4T 6T 82 9 xx 10 xx counters PC 0110

Local Predictor (b2) shared 2-bit up/down counters – initial states = 10 individual local histories – initialized to 11 lineijb1b2b NT T 35 4T 6T 82 9 counters PC10 local histories 11 xx

Global Predictor (b1,b2,b3) shared 2-bit up/down counters – initial states = 10 one global history – initialized to 11 lineijb1b2b NT T 35 4T 6T 82 9 counters PC10 global history