INSTRUCTION LEVEL PARALLELISM

Size: px
Start display at page:

Download "INSTRUCTION LEVEL PARALLELISM"

Transcription

1 INSTRUCTION LEVEL PARALLELISM Slides by: Pedro Tomás Additional reading: Computer Architecture: A Quantitative Approach, 5th edition, Chapter 2 and Appendix H, John L. Hennessy and David A. Patterson, Morgan Kaufmann, 2011 ADVANCED COMPUTER ARCHITECTURES ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC)

2 Outline 2 Increasing processing speedup: Speedup from pipelining Speedup from instruction scheduling and loop unrolling Instruction Level Parallelism Static (compiler) vs Dynamic (processor) instruction scheduling approaches VLIW processors

3 Review of pipelining architectures 3 5 stage pipeline: IF, ID, EX, MEM, WB Data hazards solved by: WB stages uses half cycle (writes on falling edge) Forwarding from MEM and WB stages to EX Control hazards: Stall until dependency is solved (i.e., next PC is known) Delayed branch Static Branch Prediction What is the speedup from pipelining?

4 4 Evaluating pipelining architectures Speedups Speedup = T No Pipeline T Pipeline = #Cycles T CLK No Pipeline #Cycles T CLK Pipeline = CPI No Pipeline CPI Pipeline CPI No Pipeline = #Cycles T CLK No Pipeline #Cycles T CLK Pipeline T CLK No Pipeline T CLK Pipeline = #Stalls CPI Ideal + #Instructions #Stages = #Stalls 1 + #Instructions #Instructions #Instructions T CLK No Pipeline T CLK Pipeline CPI No Pipeline = 1 CPI Ideal = 1 Considering that pipelining is performed by evenly balancing the critical path of all stages: #Stages = T CLK No Pipeline T CLK Pipeline Objective: Maximize the number of pipeline stages while minimizing the average number of stalls per instruction Notice: keep the critical path of all pipeline stages balanced

5 Evaluating pipelining architectures Speedups 5 Ganho energético: E No Pipeline E Pipeline = T No Pipeline P No Pipeline T Pipeline P Pipeline = Speedup (P din + P static ) No Pipeline = (P din + P static ) Pipeline N 1 + SPI α C V2 f + V 2 /R α C V 2 N f + V 2 /R Static Power Consumption P static = V I = V 2 /R Where R is the effective resistance for the leakage currents Dynamic Power Consumption P din = α C V 2 f Where α is a switching factor and C is the effective capacitance of the IC N Number of pipeline stages SPI Average number of stalls per instruction

6 Evaluating pipelining architectures Influence of control instructions 6 Consider a typical 5-stage pipelining architecture with: Around 15% of instructions are conditional or unconditional jumps In 60% of cases, the sequence of instructions is broken All data dependencies are resolved by forwarding Resolution of control hazards Penalty cycles Stalls per instruction Speedup Pipeline Stall (BR EX stage) penalty cycles times 15% of instructions, resulting in an average of 0.45 stalls per instruction Number of Stages Speedup = 1 + stalls per instruction

7 Evaluating pipelining architectures Influence of control instructions 7 Consider a typical 5-stage pipelining architecture with: Around 15% of instructions are conditional or unconditional jumps In 60% of cases, the sequence of instructions is broken All data dependencies are resolved by forwarding Resolution of control hazards Penalty cycles Stalls per instruction Speedup Pipeline Stall (BR EX stage) Branch Predict Taken A static branch predict taken strategy has no performance benefit since the jump address is known only in later pipeline stages. Thus, 1 penalty cycles times 15% of instructions, results in an average of 0.15 stalls per instruction Speedup = Number of Stages 1 + stalls per instruction

8 Evaluating pipelining architectures Influence of control instructions 8 Consider a typical 5-stage pipelining architecture with: Around 15% of instructions are conditional or unconditional jumps In 60% of cases, the sequence of instructions is broken All data dependencies are resolved by forwarding Resolution of control hazards Penalty cycles Stalls per instruction Speedup Pipeline Stall (BR EX stage) Branch Predict Taken Branch Predict Not Taken A static not taken branch prediction strategy has no performance loss when the jump is not taken since the instructions are already on the pipeline. Thus, we only have a penalty when the jump is taken. Thus, 1 penalty cycles times 15% of instructions times 60% of the cases where the jump is taken, results in an average of 0.09 stalls per instruction Number of Stages Speedup = 1 + stalls per instruction

9 Evaluating pipelining architectures Influence of control instructions 9 Consider a typical 5-stage pipelining architecture with: Around 15% of instructions are conditional or unconditional jumps In 60% of cases, the sequence of instructions is broken All data dependencies are resolved by forwarding Resolution of control hazards Penalty cycles Stalls per instruction Speedup Pipeline Stall (BR EX stage) Branch Predict Taken Branch Predict Not Taken Delayed Branch 0.5 (50%) A delayed branch strategy has no performance loss if the delay slots can be filled with useful instructions. However in 50% of times the delay slot remains empty (i.e., a NOP instruction is used to fill the slot). Thus, 1 penalty cycles times 50% of cases times 15% of instructions, results in an average of 0.08 stalls per instruction Number of Stages Speedup = 1 + stalls per instruction

10 Evaluating pipelining architectures Influence of control instructions 10 Consider a typical 5-stage pipelining architecture with: Around 15% of instructions are conditional or unconditional jumps In 60% of cases, the instruction sequence is broken (the branch is taken) All data dependencies are resolved by forwarding Resolution of control hazards Penalty cycles Stalls per instruction Speedup Pipeline Stall (BR EX stage) Branch Predict Taken Branch Predict Not Taken Delayed Branch 0.5 (50%) Delayed Branch + Branch Predict Not Taken 0.5 (50%) Number of Stages Speedup = 1 + stalls per instruction

11 11 Static instruction scheduling Can we improve processor performance just by wisely re-ordering the instructions?

12 Static instruction scheduling Example architecture 12 IF ID EX MEM WB MIPS architecture: 1 delayed branch slot Forwarding Producing instruction Consuming instruction INT ALU Store FP ALU INT ALU Load FP ALU Instruction Latency Number of wait cycles from generating the result and consuming it, e.g.,: Latency INT ALUINT ALU is zero, which means that the instructions can be consecutive Latency LoadINT ALU is one; if the instructions appear consecutive, one stall cycle will be generated

13 Static instruction scheduling Example assembly code 13 double X[100]; for (i=100; i >0; i--) X[i] = X[i] + k; ; R2 contains the address of X[99] ; F1 contains the value of K Cont: L.D F0,0(R2) ; F0 M[0+R2] (load double) ADD.D F2,F0,F1 ; F2 F0 + F1 (add double) S.D 0(R2),F2 ; M[0+R2] F2 (store double) DSUBI R2,R2,#8 ; R2 R2 8 BNE R2,R1,Cont ; PC Cont if R2 R1 Note: Registers F0,F1,F2, are used to store double precision floating point numbers

14 Static instruction scheduling Program execution 14 Cont: L.D F0,0(R2) Stall ADD.D F2,F0,F1 Stall Stall Producing instruction Consuming instruction INT ALU Store FP ALU INT ALU Load FP ALU S.D DSUBI BNE Stall 0(R2),F2 R2,R2,#8 R2,R1,Cont Cont: L.D F0,0(R2) ADD.D F2,F0,F1 9 cycles per iteration S.D DSUBI BNE 0(R2),F2 R2,R2,#8 R2,R1,Cont

15 Static instruction scheduling Instruction re-ordering 15 Producing instruction Consuming instruction INT ALU Store FP ALU INT ALU Load FP ALU Cont: L.D F0,0(R2) Cont: L.D F0,0(R2) ADD.D F2,F0,F1 ADD.D F2,F0,F1 DSUBI R2,R2,#8 S.D 0(R2),F2 BNED R2,R1,Cont DSUBI R2,R2,#8 S.D 8(R2),F2 BNE R2,R1,Cont

16 Static instruction scheduling Speedup from instruction re-ordering 16 Cont: L.D F0,0(R2) Stall ADD.D F2,F0,F1 DSUBI R2,R2,#8 BNED R2,R1,Cont Producing instruction Consuming instruction INT ALU Store FP ALU INT ALU Load FP ALU S.D -8(R2),F2 6 cycles per iteration Cont: L.D F0,0(R2) ADD.D F2,F0,F1 Re scheduling speedup = 9 6 = 1.5 DSUBI BNED S.D R2,R2,#8 R2,R1,Cont 8(R2),F2 50% faster

17 Static instruction scheduling Speedup from loop unrolling 17 Cont: L.D F0,0(R2) L.D F2,-8(R2) L.D F3,-16(R2) L.D F4,-24(R2) ADD.D F0,F0,F1 ADD.D F2,F2,F1 ADD.D F3,F3,F1 ADD.D F4,F4,F1 SD 0(R2),F0 SD -8(R2),F2 SD -16(R2),F3 SUB R2,R2,#32 BNED R2,R1,Cont S.D 8(R2),F4 14 cycles per 4 iterations = 3.5 cycles per iteration Cont: L.D F0,0(R2) L.D F2,-8(R2) L.D F3,-16(R2) L.D F4,-24(R2) ADD.D F0,F0,F1 ADD.D F2,F2,F1 ADD.D F3,F3,F1 ADD.D F4,F4,F1 SD 0(R2),F0 SD -8(R2),F2 SD -16(R2),F3 SUB R2,R2,#32 BNED R2,R1,Cont Re scheduling speedup = = 2.57 S.D 8(R2),F4

18 18 Instruction Level Parallelism Additional speedups can be obtained by issuing multiple instructions in a single clock cycle: Explores instruction-level parallelism (ILP) The simultaneous execution of up to N instructions per clock cycle allows decreasing the ideal CPI from 1 to 1/N

19 Exploring Instruction Level Parallelism (ILP) Static vs Dynamic Approaches 19 Very Long Instruction Word (VLIW) processors (e.g., Itanium): Static instruction re-scheduling HAZARDS: Solved by the compiler by statically analysing the dependencies Allows more complex analysis Superscalar processors (e.g., Intel, ARM): Dynamic instruction re-scheduling HAZARDS: Solved in real-time using dedicated hardware structures Simpler analysis but can take into account conflicts that are only visible during execution Requires: Multiple functional units Simultaneous fetch and decode of multiple instructions Leads to additional conflicts

20 Exploring Instruction Level Parallelism (ILP) Static vs Dynamic Approaches 20 Very Long Instruction Word (VLIW) processors (e.g., Itanium): static instruction re-scheduling INSTRUCTION SCHEDULING: The compiler analyses the dependencies and identifies instruction level parallelism (ILP) Using the collected information, the compiler generates groups of instructions (packets) that can be executed in parallel Allows reducing the hardware resources for controlling the processor, but cannot extract parallelism only visible during execution Superscalar processors (e.g., Intel, ARM): Dynamic instruction re-scheduling INSTRUCTION SCHEDULING: Dynamic resolution of conflicts that takes into account information only known during execution; typical algorithms: Scoreboard (centralized) and Tomasulo (distributed) Uses out-of-order instruction execution and register renaming to solve the dependencies and extract ILP Leads to more complex control mechanisms and requires additional hardware resources

21 Exploring Instruction Level Parallelism (ILP) Static vs Dynamic Approaches 21 Very Long Instruction Word (VLIW) processors (e.g., Itanium): static instruction re-scheduling INSTRUCTION SCHEDULING: Example case where parallelism cannot be extracted Superscalar processors (e.g., Intel, ARM): Dynamic instruction re-scheduling INSTRUCTION SCHEDULING: Example case where parallelism is only known during instruction execution S.D L.D 100(R1),R2 R3,20(R4) 100+R1 = 20+R4?

22 Exploring Instruction Level Parallelism (ILP) VLIW processors 22 The compiler formats the instructions in a shape of packets Each packet consists on a set of independent instructions If there are dependencies, they must be explicitly marked The need for conflict identification is substantially reduced In each clock cycle: The Instruction Fetch (IF) stage fetches a packet from memory The Instruction Decode (ID) stage decodes the complete packet and issues it to execution

23 23 Very Long Instruction Word (VLIW) Processors MIPS extension to VLIW MIPS-VLIW extension includes 5 different execution units, which translates into packets of 5 instructions, maximum # Memory 1 Memory 2 FP 1 FP 2 Integer 1 L.D F0,0(R0) L.D F2,-8(R0) 2 L.D F3,-16(R0) L.D F4,-24(R0) 3 L.D F5,-32(R0) L.D F6,-40(R0) ADD.D F0,F0,F1 ADD.D F2,F2,F1 4 L.D F7,-48(R0) L.D F8,-56(R0) ADD.D F3,F3,F1 ADD.D F4,F4,F1 5 L.D F9,-64(R0) L.D F10,-72(R0) ADD.D F5,F5,F1 ADD.D F6,F6,F1 6 ADD.D F7,F7,F1 ADD.D F8,F8,F1 7 S.D 0(R0),F0 S.D -8(R0),F2 ADD.D F9,F9,F1 ADD.D F10,F10,F1 8 S.D -16(R0),F3 S.D -24(R0),F4 9 S.D -32(R0),F5 S.D -40(R0),F6 DSUBI R0,R0, S.D 32(R0),F5 S.D 24(R0),F6 BNED R0,R1,Cont 11 S.D 16(R0),F5 S.D 8(R0),F6 Takes 11 cycles to execute 10 iterations of the loop Average of 1.1 cycles per iteration Speedup vs orignal case = = 8.18 Speedup vs reordered = = 3.18

24 24 Very Long Instruction Word (VLIW) Processors MIPS extension to VLIW MIPS-VLIW extension includes 5 different execution unit, which translates into packets of 5 instructions, maximum # Memory 1 Memory 2 FP 1 FP 2 Integer 1 L.D F0,0(R0) L.D F2,-8(R0) 2 L.D F3,-16(R0) L.D F4,-24(R0) 3 L.D F5,-32(R0) L.D F6,-40(R0) ADD.D F0,F0,F1 ADD.D F2,F2,F1 4 L.D F7,-48(R0) L.D F8,-56(R0) ADD.D F3,F3,F1 ADD.D F4,F4,F1 5 L.D F9,-64(R0) L.D F10,-72(R0) ADD.D F5,F5,F1 ADD.D F6,F6,F1 6 ADD.D F7,F7,F1 ADD.D F8,F8,F1 7 S.D 0(R0),F0 S.D -8(R0),F2 ADD.D F9,F9,F1 ADD.D F10,F10,F1 8 S.D -16(R0),F3 S.D -24(R0),F4 9 S.D -32(R0),F5 S.D -40(R0),F6 DSUBI R0,R0, S.D 32(R0),F5 S.D 24(R0),F6 BNE R0,R1,Cont 11 S.D 16(R0),F5 S.D 8(R0),F6 Which of the two speedups should be used to compare the architectures? What is the maximum achievable speedup? Speedup vs orignal case = = 8.18 Speedup vs reordered = = 3.18

25 Very Long Instruction Word (VLIW) Processors Drawbacks 25 Requires a great amount of floating point registers to enable exposing the parallelism To fully expose the parallelism and maximise the use of the available functional units it is necessary to deeply apply loop unrolling Even in such cases, the functional unit utilization is low E.g., for the previous case we achieve an average functional unit utilization of 58% Actual speedup is lower than ideal In the previous case, the ideal speedup is 5x, whereas the real value (considering that the critical path remains the same) is 3.18x VLIW processors require a large bandwidth to the register file The previous case requires reading from 4 FP and 4 integer registers and writing to 4 FP and 3 integer registers Code incompatibility is a large drawback

26 Moving beyond VLIW processors Explicitly Parallel Instruction Computing (EPIC) 26 VLIW ISAs are not backward compatible between implementations: I.e., different packet width sizes and/or the availability of a different set of functional units The variability of the memory access times (due to CPU caches and RAM) introduces difficulties to the compiler Explicitly Parallel Instruction Computing (EPIC) Instead of grouping instructions in packets, group them in bundles and use a stop bit to indicate dependencies between bundles New load instructions to decrease memory access time variability E.g., software prefetching and speculative loading New branch instructions that combine multiple branch conditions in a single bundle Predicative execution modes that allow a bundle to be executed only upon a condition

27 Static scheduling architectures Intel IA-64 Architecture 27 EPIC (Explicit Parallel Instruction Computer) The compiler identifies the parallelism and schedule the instruction execution indicating which instructions can be performed in parallel Includes hardware support for instruction scheduling Instructions are organized in: Groups of instructions that can be executed in parallel Coded in 128-bit bundles of 3 instructions Registers: 128 x 64-bit registers with 1 poison bit/register (32GPR+96Stack) 128 x 82-bit registers for FP (using IEEE 80-bit format) 64 x 1-bit predication register 8 x 64-bit register for indirect branches

28 Static scheduling architectures Intel IA-64 Architecture 28 Execution Unit Unit-I Unit-M Instruction Type Integer ALU (A) Non-Integer ALU (I) Integer ALU (A) Memory Access (M) Example Addition, subtraction,... bit test, move,... Addition, subtraction,... Integer/FP load/store Unit-F FP (F) Floating point operations Unit-B Saltos (B) Jumps/Calls 24 possible bundle patterns (» indicates new parallel section, i.e., end of parallelism) Pattern 0: M I I Pattern 1: M I I» Pattern 2: M I» I Pattern 10: M» M I Pattern 29: M F B» L+X Extendidas L+X Extended immediate Each instruction is coded in 41-bits The bundle 5 most significant bits state the bundle pattern The 6 least significant bits specify predication

29 Static scheduling architectures Intel IA-64 Architecture 29 Itanium Itanium2 Pipeline Stages 10 8 Issued instructions per clock cycle 6 6 Functional Units - Integer (Type I) Load/Store (Type M) Floating Point (Type B) Branch (Type L+X) 3 3 Latencies - Floating Point Branch Miss prediction Up to 9 Up to 6

30 Architectures comparison Intel IA-64 (Itanium2) vs IA32e (Pentium 4) xalancbmk 473.astar 471.omnetpp 464.h264ref 462.libquantum 458.sjeng 456.hmmer 445.gobmk 429.mcf 403.gcc 401.bzip2 400.pearlbench SPEC CPU INT2006 Pentium Time [s]

31 Architectures comparison Intel IA-64 vs IA32e 31 Core GHz (ICC 9) (2007) Pentium 3.07GHz (ICC 7) Pentium 1.3GHz (ICC 5) (2002) CFP2000 CINT2000 Itanium 1.6GHz, 6M L3 (ICC 8) Itanium 1GHz, 3M L3 (ICC 7) (2002) 0.8GHz (ICC 5) (2001)

32 32 Next lesson Compiler techniques to extract parallelism Local techniques Global techniques

33 Very Long Instruction Word (VLIW) Processors Extracting ILP and scheduling 33 Local techniques Parallelism is simpler to explore if loop unrolling leads to a large number of sequential instructions Software Pipelining is an effective technique for extracting parallelism and to schedule instructions through symbolic loop unrolling Global techniques Identification and exploration of parallelism requires instruction shifting to resolve control dependencies; complex algorithms must be used and these achieve sub-optimal solutions Techniques that use hardware support to extract parallelism can also be used

34 Parallelizing loops 34 To extract parallelism from loops, each iteration must be independent from the previous Parallelizable loop: for (i=0;i<=;i++) A[i] = A[i] + K; Iteration i is independent of iteration j Iterations can be performed in any order since they are independent Non-parallelizable loop: for (i=1;i<=;i++) A[i] = A[i-1] + K; Iteration i is dependent of iteration j Iterations i must be performed before iteration i+1

DYNAMIC INSTRUCTION SCHEDULING WITH SCOREBOARD

DYNAMIC INSTRUCTION SCHEDULING WITH SCOREBOARD DYNAMIC INSTRUCTION SCHEDULING WITH SCOREBOARD Slides by: Pedro Tomás Additional reading: Computer Architecture: A Quantitative Approach, 5th edition, Chapter 3, John L. Hennessy and David A. Patterson,

More information

DYNAMIC AND SPECULATIVE INSTRUCTION SCHEDULING

DYNAMIC AND SPECULATIVE INSTRUCTION SCHEDULING DYNAMIC AND SPECULATIVE INSTRUCTION SCHEDULING Slides by: Pedro Tomás Additional reading: Computer Architecture: A Quantitative Approach, 5th edition, Chapter 3, John L. Hennessy and David A. Patterson,

More information

CISC 662 Graduate Computer Architecture Lecture 13 - CPI < 1

CISC 662 Graduate Computer Architecture Lecture 13 - CPI < 1 CISC 662 Graduate Computer Architecture Lecture 13 - CPI < 1 Michela Taufer http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer

More information

DYNAMIC SPECULATIVE EXECUTION

DYNAMIC SPECULATIVE EXECUTION DYNAMIC SPECULATIVE EXECUTION Slides by: Pedro Tomás Additional reading: Computer Architecture: A Quantitative Approach, 5th edition, Chapter 3, John L. Hennessy and David A. Patterson, Morgan Kaufmann,

More information

EECC551 - Shaaban. 1 GHz? to???? GHz CPI > (?)

EECC551 - Shaaban. 1 GHz? to???? GHz CPI > (?) Evolution of Processor Performance So far we examined static & dynamic techniques to improve the performance of single-issue (scalar) pipelined CPU designs including: static & dynamic scheduling, static

More information

CS425 Computer Systems Architecture

CS425 Computer Systems Architecture CS425 Computer Systems Architecture Fall 2017 Multiple Issue: Superscalar and VLIW CS425 - Vassilis Papaefstathiou 1 Example: Dynamic Scheduling in PowerPC 604 and Pentium Pro In-order Issue, Out-of-order

More information

Multi-cycle Instructions in the Pipeline (Floating Point)

Multi-cycle Instructions in the Pipeline (Floating Point) Lecture 6 Multi-cycle Instructions in the Pipeline (Floating Point) Introduction to instruction level parallelism Recap: Support of multi-cycle instructions in a pipeline (App A.5) Recap: Superpipelining

More information

Hardware-based Speculation

Hardware-based Speculation Hardware-based Speculation Hardware-based Speculation To exploit instruction-level parallelism, maintaining control dependences becomes an increasing burden. For a processor executing multiple instructions

More information

CPI IPC. 1 - One At Best 1 - One At best. Multiple issue processors: VLIW (Very Long Instruction Word) Speculative Tomasulo Processor

CPI IPC. 1 - One At Best 1 - One At best. Multiple issue processors: VLIW (Very Long Instruction Word) Speculative Tomasulo Processor Single-Issue Processor (AKA Scalar Processor) CPI IPC 1 - One At Best 1 - One At best 1 From Single-Issue to: AKS Scalar Processors CPI < 1? How? Multiple issue processors: VLIW (Very Long Instruction

More information

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Computer Architecture ECE 568 Part 10 Compiler Techniques / VLIW Israel Koren ECE568/Koren Part.10.1 FP Loop Example Add a scalar

More information

Several Common Compiler Strategies. Instruction scheduling Loop unrolling Static Branch Prediction Software Pipelining

Several Common Compiler Strategies. Instruction scheduling Loop unrolling Static Branch Prediction Software Pipelining Several Common Compiler Strategies Instruction scheduling Loop unrolling Static Branch Prediction Software Pipelining Basic Instruction Scheduling Reschedule the order of the instructions to reduce the

More information

CPI < 1? How? What if dynamic branch prediction is wrong? Multiple issue processors: Speculative Tomasulo Processor

CPI < 1? How? What if dynamic branch prediction is wrong? Multiple issue processors: Speculative Tomasulo Processor 1 CPI < 1? How? From Single-Issue to: AKS Scalar Processors Multiple issue processors: VLIW (Very Long Instruction Word) Superscalar processors No ISA Support Needed ISA Support Needed 2 What if dynamic

More information

CSE 820 Graduate Computer Architecture. week 6 Instruction Level Parallelism. Review from Last Time #1

CSE 820 Graduate Computer Architecture. week 6 Instruction Level Parallelism. Review from Last Time #1 CSE 820 Graduate Computer Architecture week 6 Instruction Level Parallelism Based on slides by David Patterson Review from Last Time #1 Leverage Implicit Parallelism for Performance: Instruction Level

More information

Getting CPI under 1: Outline

Getting CPI under 1: Outline CMSC 411 Computer Systems Architecture Lecture 12 Instruction Level Parallelism 5 (Improving CPI) Getting CPI under 1: Outline More ILP VLIW branch target buffer return address predictor superscalar more

More information

Exploitation of instruction level parallelism

Exploitation of instruction level parallelism Exploitation of instruction level parallelism Computer Architecture J. Daniel García Sánchez (coordinator) David Expósito Singh Francisco Javier García Blas ARCOS Group Computer Science and Engineering

More information

NOW Handout Page 1. Review from Last Time #1. CSE 820 Graduate Computer Architecture. Lec 8 Instruction Level Parallelism. Outline

NOW Handout Page 1. Review from Last Time #1. CSE 820 Graduate Computer Architecture. Lec 8 Instruction Level Parallelism. Outline CSE 820 Graduate Computer Architecture Lec 8 Instruction Level Parallelism Based on slides by David Patterson Review Last Time #1 Leverage Implicit Parallelism for Performance: Instruction Level Parallelism

More information

Lecture: Static ILP. Topics: compiler scheduling, loop unrolling, software pipelining (Sections C.5, 3.2)

Lecture: Static ILP. Topics: compiler scheduling, loop unrolling, software pipelining (Sections C.5, 3.2) Lecture: Static ILP Topics: compiler scheduling, loop unrolling, software pipelining (Sections C.5, 3.2) 1 Static vs Dynamic Scheduling Arguments against dynamic scheduling: requires complex structures

More information

EECC551 Exam Review 4 questions out of 6 questions

EECC551 Exam Review 4 questions out of 6 questions EECC551 Exam Review 4 questions out of 6 questions (Must answer first 2 questions and 2 from remaining 4) Instruction Dependencies and graphs In-order Floating Point/Multicycle Pipelining (quiz 2) Improving

More information

Lecture 9: Multiple Issue (Superscalar and VLIW)

Lecture 9: Multiple Issue (Superscalar and VLIW) Lecture 9: Multiple Issue (Superscalar and VLIW) Iakovos Mavroidis Computer Science Department University of Crete Example: Dynamic Scheduling in PowerPC 604 and Pentium Pro In-order Issue, Out-of-order

More information

Pipelining and Exploiting Instruction-Level Parallelism (ILP)

Pipelining and Exploiting Instruction-Level Parallelism (ILP) Pipelining and Exploiting Instruction-Level Parallelism (ILP) Pipelining and Instruction-Level Parallelism (ILP). Definition of basic instruction block Increasing Instruction-Level Parallelism (ILP) &

More information

Donn Morrison Department of Computer Science. TDT4255 ILP and speculation

Donn Morrison Department of Computer Science. TDT4255 ILP and speculation TDT4255 Lecture 9: ILP and speculation Donn Morrison Department of Computer Science 2 Outline Textbook: Computer Architecture: A Quantitative Approach, 4th ed Section 2.6: Speculation Section 2.7: Multiple

More information

Hardware-Based Speculation

Hardware-Based Speculation Hardware-Based Speculation Execute instructions along predicted execution paths but only commit the results if prediction was correct Instruction commit: allowing an instruction to update the register

More information

Four Steps of Speculative Tomasulo cycle 0

Four Steps of Speculative Tomasulo cycle 0 HW support for More ILP Hardware Speculative Execution Speculation: allow an instruction to issue that is dependent on branch, without any consequences (including exceptions) if branch is predicted incorrectly

More information

Exploiting ILP with SW Approaches. Aleksandar Milenković, Electrical and Computer Engineering University of Alabama in Huntsville

Exploiting ILP with SW Approaches. Aleksandar Milenković, Electrical and Computer Engineering University of Alabama in Huntsville Lecture : Exploiting ILP with SW Approaches Aleksandar Milenković, milenka@ece.uah.edu Electrical and Computer Engineering University of Alabama in Huntsville Outline Basic Pipeline Scheduling and Loop

More information

Course on Advanced Computer Architectures

Course on Advanced Computer Architectures Surname (Cognome) Name (Nome) POLIMI ID Number Signature (Firma) SOLUTION Politecnico di Milano, July 9, 2018 Course on Advanced Computer Architectures Prof. D. Sciuto, Prof. C. Silvano EX1 EX2 EX3 Q1

More information

CACHE MEMORIES ADVANCED COMPUTER ARCHITECTURES. Slides by: Pedro Tomás

CACHE MEMORIES ADVANCED COMPUTER ARCHITECTURES. Slides by: Pedro Tomás CACHE MEMORIES Slides by: Pedro Tomás Additional reading: Computer Architecture: A Quantitative Approach, 5th edition, Chapter 2 and Appendix B, John L. Hennessy and David A. Patterson, Morgan Kaufmann,

More information

Processor (IV) - advanced ILP. Hwansoo Han

Processor (IV) - advanced ILP. Hwansoo Han Processor (IV) - advanced ILP Hwansoo Han Instruction-Level Parallelism (ILP) Pipelining: executing multiple instructions in parallel To increase ILP Deeper pipeline Less work per stage shorter clock cycle

More information

Super Scalar. Kalyan Basu March 21,

Super Scalar. Kalyan Basu March 21, Super Scalar Kalyan Basu basu@cse.uta.edu March 21, 2007 1 Super scalar Pipelines A pipeline that can complete more than 1 instruction per cycle is called a super scalar pipeline. We know how to build

More information

Instruction-Level Parallelism and Its Exploitation

Instruction-Level Parallelism and Its Exploitation Chapter 2 Instruction-Level Parallelism and Its Exploitation 1 Overview Instruction level parallelism Dynamic Scheduling Techniques es Scoreboarding Tomasulo s s Algorithm Reducing Branch Cost with Dynamic

More information

Computer Architecture A Quantitative Approach, Fifth Edition. Chapter 3. Instruction-Level Parallelism and Its Exploitation

Computer Architecture A Quantitative Approach, Fifth Edition. Chapter 3. Instruction-Level Parallelism and Its Exploitation Computer Architecture A Quantitative Approach, Fifth Edition Chapter 3 Instruction-Level Parallelism and Its Exploitation Introduction Pipelining become universal technique in 1985 Overlaps execution of

More information

ILP concepts (2.1) Basic compiler techniques (2.2) Reducing branch costs with prediction (2.3) Dynamic scheduling (2.4 and 2.5)

ILP concepts (2.1) Basic compiler techniques (2.2) Reducing branch costs with prediction (2.3) Dynamic scheduling (2.4 and 2.5) Instruction-Level Parallelism and its Exploitation: PART 1 ILP concepts (2.1) Basic compiler techniques (2.2) Reducing branch costs with prediction (2.3) Dynamic scheduling (2.4 and 2.5) Project and Case

More information

TDT 4260 lecture 7 spring semester 2015

TDT 4260 lecture 7 spring semester 2015 1 TDT 4260 lecture 7 spring semester 2015 Lasse Natvig, The CARD group Dept. of computer & information science NTNU 2 Lecture overview Repetition Superscalar processor (out-of-order) Dependencies/forwarding

More information

5008: Computer Architecture

5008: Computer Architecture 5008: Computer Architecture Chapter 2 Instruction-Level Parallelism and Its Exploitation CA Lecture05 - ILP (cwliu@twins.ee.nctu.edu.tw) 05-1 Review from Last Lecture Instruction Level Parallelism Leverage

More information

The Processor: Instruction-Level Parallelism

The Processor: Instruction-Level Parallelism The Processor: Instruction-Level Parallelism Computer Organization Architectures for Embedded Computing Tuesday 21 October 14 Many slides adapted from: Computer Organization and Design, Patterson & Hennessy

More information

IF1/IF2. Dout2[31:0] Data Memory. Addr[31:0] Din[31:0] Zero. Res ALU << 2. CPU Registers. extension. sign. W_add[4:0] Din[31:0] Dout[31:0] PC+4

IF1/IF2. Dout2[31:0] Data Memory. Addr[31:0] Din[31:0] Zero. Res ALU << 2. CPU Registers. extension. sign. W_add[4:0] Din[31:0] Dout[31:0] PC+4 12 1 CMPE110 Fall 2006 A. Di Blas 110 Fall 2006 CMPE pipeline concepts Advanced ffl ILP ffl Deep pipeline ffl Static multiple issue ffl Loop unrolling ffl VLIW ffl Dynamic multiple issue Textbook Edition:

More information

Copyright 2012, Elsevier Inc. All rights reserved.

Copyright 2012, Elsevier Inc. All rights reserved. Computer Architecture A Quantitative Approach, Fifth Edition Chapter 3 Instruction-Level Parallelism and Its Exploitation 1 Branch Prediction Basic 2-bit predictor: For each branch: Predict taken or not

More information

Computer Architecture 计算机体系结构. Lecture 4. Instruction-Level Parallelism II 第四讲 指令级并行 II. Chao Li, PhD. 李超博士

Computer Architecture 计算机体系结构. Lecture 4. Instruction-Level Parallelism II 第四讲 指令级并行 II. Chao Li, PhD. 李超博士 Computer Architecture 计算机体系结构 Lecture 4. Instruction-Level Parallelism II 第四讲 指令级并行 II Chao Li, PhD. 李超博士 SJTU-SE346, Spring 2018 Review Hazards (data/name/control) RAW, WAR, WAW hazards Different types

More information

Instruction Level Parallelism. Appendix C and Chapter 3, HP5e

Instruction Level Parallelism. Appendix C and Chapter 3, HP5e Instruction Level Parallelism Appendix C and Chapter 3, HP5e Outline Pipelining, Hazards Branch prediction Static and Dynamic Scheduling Speculation Compiler techniques, VLIW Limits of ILP. Implementation

More information

Load1 no Load2 no Add1 Y Sub Reg[F2] Reg[F6] Add2 Y Add Reg[F2] Add1 Add3 no Mult1 Y Mul Reg[F2] Reg[F4] Mult2 Y Div Reg[F6] Mult1

Load1 no Load2 no Add1 Y Sub Reg[F2] Reg[F6] Add2 Y Add Reg[F2] Add1 Add3 no Mult1 Y Mul Reg[F2] Reg[F4] Mult2 Y Div Reg[F6] Mult1 Instruction Issue Execute Write result L.D F6, 34(R2) L.D F2, 45(R3) MUL.D F0, F2, F4 SUB.D F8, F2, F6 DIV.D F10, F0, F6 ADD.D F6, F8, F2 Name Busy Op Vj Vk Qj Qk A Load1 no Load2 no Add1 Y Sub Reg[F2]

More information

HY425 Lecture 09: Software to exploit ILP

HY425 Lecture 09: Software to exploit ILP HY425 Lecture 09: Software to exploit ILP Dimitrios S. Nikolopoulos University of Crete and FORTH-ICS November 4, 2010 ILP techniques Hardware Dimitrios S. Nikolopoulos HY425 Lecture 09: Software to exploit

More information

COMPUTER ORGANIZATION AND DESI

COMPUTER ORGANIZATION AND DESI COMPUTER ORGANIZATION AND DESIGN 5 Edition th The Hardware/Software Interface Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count Determined by ISA and compiler

More information

HY425 Lecture 09: Software to exploit ILP

HY425 Lecture 09: Software to exploit ILP HY425 Lecture 09: Software to exploit ILP Dimitrios S. Nikolopoulos University of Crete and FORTH-ICS November 4, 2010 Dimitrios S. Nikolopoulos HY425 Lecture 09: Software to exploit ILP 1 / 44 ILP techniques

More information

Advanced d Instruction Level Parallelism. Computer Systems Laboratory Sungkyunkwan University

Advanced d Instruction Level Parallelism. Computer Systems Laboratory Sungkyunkwan University Advanced d Instruction ti Level Parallelism Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu ILP Instruction-Level Parallelism (ILP) Pipelining:

More information

Lecture 10: Static ILP Basics. Topics: loop unrolling, static branch prediction, VLIW (Sections )

Lecture 10: Static ILP Basics. Topics: loop unrolling, static branch prediction, VLIW (Sections ) Lecture 10: Static ILP Basics Topics: loop unrolling, static branch prediction, VLIW (Sections 4.1 4.4) 1 Static vs Dynamic Scheduling Arguments against dynamic scheduling: requires complex structures

More information

Multiple Instruction Issue. Superscalars

Multiple Instruction Issue. Superscalars Multiple Instruction Issue Multiple instructions issued each cycle better performance increase instruction throughput decrease in CPI (below 1) greater hardware complexity, potentially longer wire lengths

More information

Multiple Issue ILP Processors. Summary of discussions

Multiple Issue ILP Processors. Summary of discussions Summary of discussions Multiple Issue ILP Processors ILP processors - VLIW/EPIC, Superscalar Superscalar has hardware logic for extracting parallelism - Solutions for stalls etc. must be provided in hardware

More information

Page 1. CISC 662 Graduate Computer Architecture. Lecture 8 - ILP 1. Pipeline CPI. Pipeline CPI (I) Pipeline CPI (II) Michela Taufer

Page 1. CISC 662 Graduate Computer Architecture. Lecture 8 - ILP 1. Pipeline CPI. Pipeline CPI (I) Pipeline CPI (II) Michela Taufer CISC 662 Graduate Computer Architecture Lecture 8 - ILP 1 Michela Taufer Pipeline CPI http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson

More information

As the amount of ILP to exploit grows, control dependences rapidly become the limiting factor.

As the amount of ILP to exploit grows, control dependences rapidly become the limiting factor. Hiroaki Kobayashi // As the amount of ILP to exploit grows, control dependences rapidly become the limiting factor. Branches will arrive up to n times faster in an n-issue processor, and providing an instruction

More information

Page # CISC 662 Graduate Computer Architecture. Lecture 8 - ILP 1. Pipeline CPI. Pipeline CPI (I) Michela Taufer

Page # CISC 662 Graduate Computer Architecture. Lecture 8 - ILP 1. Pipeline CPI. Pipeline CPI (I) Michela Taufer CISC 662 Graduate Computer Architecture Lecture 8 - ILP 1 Michela Taufer http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

More information

ECE 552 / CPS 550 Advanced Computer Architecture I. Lecture 15 Very Long Instruction Word Machines

ECE 552 / CPS 550 Advanced Computer Architecture I. Lecture 15 Very Long Instruction Word Machines ECE 552 / CPS 550 Advanced Computer Architecture I Lecture 15 Very Long Instruction Word Machines Benjamin Lee Electrical and Computer Engineering Duke University www.duke.edu/~bcl15 www.duke.edu/~bcl15/class/class_ece252fall11.html

More information

EEC 581 Computer Architecture. Lec 7 Instruction Level Parallelism (2.6 Hardware-based Speculation and 2.7 Static Scheduling/VLIW)

EEC 581 Computer Architecture. Lec 7 Instruction Level Parallelism (2.6 Hardware-based Speculation and 2.7 Static Scheduling/VLIW) EEC 581 Computer Architecture Lec 7 Instruction Level Parallelism (2.6 Hardware-based Speculation and 2.7 Static Scheduling/VLIW) Chansu Yu Electrical and Computer Engineering Cleveland State University

More information

Lecture 6 MIPS R4000 and Instruction Level Parallelism. Computer Architectures S

Lecture 6 MIPS R4000 and Instruction Level Parallelism. Computer Architectures S Lecture 6 MIPS R4000 and Instruction Level Parallelism Computer Architectures 521480S Case Study: MIPS R4000 (200 MHz, 64-bit instructions, MIPS-3 instruction set) 8 Stage Pipeline: first half of fetching

More information

Lecture 8 Dynamic Branch Prediction, Superscalar and VLIW. Computer Architectures S

Lecture 8 Dynamic Branch Prediction, Superscalar and VLIW. Computer Architectures S Lecture 8 Dynamic Branch Prediction, Superscalar and VLIW Computer Architectures 521480S Dynamic Branch Prediction Performance = ƒ(accuracy, cost of misprediction) Branch History Table (BHT) is simplest

More information

ELEC 5200/6200 Computer Architecture and Design Fall 2016 Lecture 9: Instruction Level Parallelism

ELEC 5200/6200 Computer Architecture and Design Fall 2016 Lecture 9: Instruction Level Parallelism ELEC 5200/6200 Computer Architecture and Design Fall 2016 Lecture 9: Instruction Level Parallelism Ujjwal Guin, Assistant Professor Department of Electrical and Computer Engineering Auburn University,

More information

Chapter 3 Instruction-Level Parallelism and its Exploitation (Part 1)

Chapter 3 Instruction-Level Parallelism and its Exploitation (Part 1) Chapter 3 Instruction-Level Parallelism and its Exploitation (Part 1) ILP vs. Parallel Computers Dynamic Scheduling (Section 3.4, 3.5) Dynamic Branch Prediction (Section 3.3) Hardware Speculation and Precise

More information

Lec 25: Parallel Processors. Announcements

Lec 25: Parallel Processors. Announcements Lec 25: Parallel Processors Kavita Bala CS 340, Fall 2008 Computer Science Cornell University PA 3 out Hack n Seek Announcements The goal is to have fun with it Recitations today will talk about it Pizza

More information

Lecture: Pipeline Wrap-Up and Static ILP

Lecture: Pipeline Wrap-Up and Static ILP Lecture: Pipeline Wrap-Up and Static ILP Topics: multi-cycle instructions, precise exceptions, deep pipelines, compiler scheduling, loop unrolling, software pipelining (Sections C.5, 3.2) 1 Multicycle

More information

計算機結構 Chapter 4 Exploiting Instruction-Level Parallelism with Software Approaches

計算機結構 Chapter 4 Exploiting Instruction-Level Parallelism with Software Approaches 4.1 Basic Compiler Techniques for Exposing ILP 計算機結構 Chapter 4 Exploiting Instruction-Level Parallelism with Software Approaches 吳俊興高雄大學資訊工程學系 To avoid a pipeline stall, a dependent instruction must be

More information

EEC 581 Computer Architecture. Instruction Level Parallelism (3.6 Hardware-based Speculation and 3.7 Static Scheduling/VLIW)

EEC 581 Computer Architecture. Instruction Level Parallelism (3.6 Hardware-based Speculation and 3.7 Static Scheduling/VLIW) 1 EEC 581 Computer Architecture Instruction Level Parallelism (3.6 Hardware-based Speculation and 3.7 Static Scheduling/VLIW) Chansu Yu Electrical and Computer Engineering Cleveland State University Overview

More information

Advanced Instruction-Level Parallelism

Advanced Instruction-Level Parallelism Advanced Instruction-Level Parallelism Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu

More information

These slides do not give detailed coverage of the material. See class notes and solved problems (last page) for more information.

These slides do not give detailed coverage of the material. See class notes and solved problems (last page) for more information. 11 1 This Set 11 1 These slides do not give detailed coverage of the material. See class notes and solved problems (last page) for more information. Text covers multiple-issue machines in Chapter 4, but

More information

Chapter 3: Instruction Level Parallelism (ILP) and its exploitation. Types of dependences

Chapter 3: Instruction Level Parallelism (ILP) and its exploitation. Types of dependences Chapter 3: Instruction Level Parallelism (ILP) and its exploitation Pipeline CPI = Ideal pipeline CPI + stalls due to hazards invisible to programmer (unlike process level parallelism) ILP: overlap execution

More information

ECE 252 / CPS 220 Advanced Computer Architecture I. Lecture 14 Very Long Instruction Word Machines

ECE 252 / CPS 220 Advanced Computer Architecture I. Lecture 14 Very Long Instruction Word Machines ECE 252 / CPS 220 Advanced Computer Architecture I Lecture 14 Very Long Instruction Word Machines Benjamin Lee Electrical and Computer Engineering Duke University www.duke.edu/~bcl15 www.duke.edu/~bcl15/class/class_ece252fall11.html

More information

Updated Exercises by Diana Franklin

Updated Exercises by Diana Franklin C-82 Appendix C Pipelining: Basic and Intermediate Concepts Updated Exercises by Diana Franklin C.1 [15/15/15/15/25/10/15] Use the following code fragment: Loop: LD R1,0(R2) ;load R1 from address

More information

LECTURE 10. Pipelining: Advanced ILP

LECTURE 10. Pipelining: Advanced ILP LECTURE 10 Pipelining: Advanced ILP EXCEPTIONS An exception, or interrupt, is an event other than regular transfers of control (branches, jumps, calls, returns) that changes the normal flow of instruction

More information

Computer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining

Computer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining Computer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining Single-Cycle Design Problems Assuming fixed-period clock every instruction datapath uses one

More information

Lecture 9: Case Study MIPS R4000 and Introduction to Advanced Pipelining Professor Randy H. Katz Computer Science 252 Spring 1996

Lecture 9: Case Study MIPS R4000 and Introduction to Advanced Pipelining Professor Randy H. Katz Computer Science 252 Spring 1996 Lecture 9: Case Study MIPS R4000 and Introduction to Advanced Pipelining Professor Randy H. Katz Computer Science 252 Spring 1996 RHK.SP96 1 Review: Evaluating Branch Alternatives Two part solution: Determine

More information

CS377P Programming for Performance Single Thread Performance Out-of-order Superscalar Pipelines

CS377P Programming for Performance Single Thread Performance Out-of-order Superscalar Pipelines CS377P Programming for Performance Single Thread Performance Out-of-order Superscalar Pipelines Sreepathi Pai UTCS September 14, 2015 Outline 1 Introduction 2 Out-of-order Scheduling 3 The Intel Haswell

More information

4. The Processor Computer Architecture COMP SCI 2GA3 / SFWR ENG 2GA3. Emil Sekerinski, McMaster University, Fall Term 2015/16

4. The Processor Computer Architecture COMP SCI 2GA3 / SFWR ENG 2GA3. Emil Sekerinski, McMaster University, Fall Term 2015/16 4. The Processor Computer Architecture COMP SCI 2GA3 / SFWR ENG 2GA3 Emil Sekerinski, McMaster University, Fall Term 2015/16 Instruction Execution Consider simplified MIPS: lw/sw rt, offset(rs) add/sub/and/or/slt

More information

Metodologie di Progettazione Hardware-Software

Metodologie di Progettazione Hardware-Software Metodologie di Progettazione Hardware-Software Advanced Pipelining and Instruction-Level Paralelism Metodologie di Progettazione Hardware/Software LS Ing. Informatica 1 ILP Instruction-level Parallelism

More information

Instruction Level Parallelism

Instruction Level Parallelism Instruction Level Parallelism The potential overlap among instruction execution is called Instruction Level Parallelism (ILP) since instructions can be executed in parallel. There are mainly two approaches

More information

CS425 Computer Systems Architecture

CS425 Computer Systems Architecture CS425 Computer Systems Architecture Fall 2018 Static Instruction Scheduling 1 Techniques to reduce stalls CPI = Ideal CPI + Structural stalls per instruction + RAW stalls per instruction + WAR stalls per

More information

ENGN1640: Design of Computing Systems Topic 06: Advanced Processor Design

ENGN1640: Design of Computing Systems Topic 06: Advanced Processor Design ENGN1640: Design of Computing Systems Topic 06: Advanced Processor Design Professor Sherief Reda http://scale.engin.brown.edu Electrical Sciences and Computer Engineering School of Engineering Brown University

More information

Static vs. Dynamic Scheduling

Static vs. Dynamic Scheduling Static vs. Dynamic Scheduling Dynamic Scheduling Fast Requires complex hardware More power consumption May result in a slower clock Static Scheduling Done in S/W (compiler) Maybe not as fast Simpler processor

More information

Hardware-Based Speculation

Hardware-Based Speculation Hardware-Based Speculation Execute instructions along predicted execution paths but only commit the results if prediction was correct Instruction commit: allowing an instruction to update the register

More information

EE 4683/5683: COMPUTER ARCHITECTURE

EE 4683/5683: COMPUTER ARCHITECTURE EE 4683/5683: COMPUTER ARCHITECTURE Lecture 4A: Instruction Level Parallelism - Static Scheduling Avinash Kodi, kodi@ohio.edu Agenda 2 Dependences RAW, WAR, WAW Static Scheduling Loop-carried Dependence

More information

Instruction Level Parallelism. ILP, Loop level Parallelism Dependences, Hazards Speculation, Branch prediction

Instruction Level Parallelism. ILP, Loop level Parallelism Dependences, Hazards Speculation, Branch prediction Instruction Level Parallelism ILP, Loop level Parallelism Dependences, Hazards Speculation, Branch prediction Basic Block A straight line code sequence with no branches in except to the entry and no branches

More information

Pipelining concepts The DLX architecture A simple DLX pipeline Pipeline Hazards and Solution to overcome

Pipelining concepts The DLX architecture A simple DLX pipeline Pipeline Hazards and Solution to overcome Pipeline Thoai Nam Outline Pipelining concepts The DLX architecture A simple DLX pipeline Pipeline Hazards and Solution to overcome Reference: Computer Architecture: A Quantitative Approach, John L Hennessy

More information

What is ILP? Instruction Level Parallelism. Where do we find ILP? How do we expose ILP?

What is ILP? Instruction Level Parallelism. Where do we find ILP? How do we expose ILP? What is ILP? Instruction Level Parallelism or Declaration of Independence The characteristic of a program that certain instructions are, and can potentially be. Any mechanism that creates, identifies,

More information

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle

More information

Real Processors. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

Real Processors. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Real Processors Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Instruction-Level Parallelism (ILP) Pipelining: executing multiple instructions in parallel

More information

CS433 Homework 2 (Chapter 3)

CS433 Homework 2 (Chapter 3) CS Homework 2 (Chapter ) Assigned on 9/19/2017 Due in class on 10/5/2017 Instructions: 1. Please write your name and NetID clearly on the first page. 2. Refer to the course fact sheet for policies on collaboration..

More information

CS / ECE 6810 Midterm Exam - Oct 21st 2008

CS / ECE 6810 Midterm Exam - Oct 21st 2008 Name and ID: CS / ECE 6810 Midterm Exam - Oct 21st 2008 Notes: This is an open notes and open book exam. If necessary, make reasonable assumptions and clearly state them. The only clarifications you may

More information

Adapted from David Patterson s slides on graduate computer architecture

Adapted from David Patterson s slides on graduate computer architecture Mei Yang Adapted from David Patterson s slides on graduate computer architecture Introduction Basic Compiler Techniques for Exposing ILP Advanced Branch Prediction Dynamic Scheduling Hardware-Based Speculation

More information

Computer Science 246 Computer Architecture

Computer Science 246 Computer Architecture Computer Architecture Spring 2009 Harvard University Instructor: Prof. dbrooks@eecs.harvard.edu Compiler ILP Static ILP Overview Have discussed methods to extract ILP from hardware Why can t some of these

More information

ILP: Instruction Level Parallelism

ILP: Instruction Level Parallelism ILP: Instruction Level Parallelism Tassadaq Hussain Riphah International University Barcelona Supercomputing Center Universitat Politècnica de Catalunya Introduction Introduction Pipelining become universal

More information

Advanced Computer Architecture

Advanced Computer Architecture Advanced Computer Architecture Chapter 1 Introduction into the Sequential and Pipeline Instruction Execution Martin Milata What is a Processors Architecture Instruction Set Architecture (ISA) Describes

More information

Lecture 13 - VLIW Machines and Statically Scheduled ILP

Lecture 13 - VLIW Machines and Statically Scheduled ILP CS 152 Computer Architecture and Engineering Lecture 13 - VLIW Machines and Statically Scheduled ILP John Wawrzynek Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~johnw

More information

MIPS ISA AND PIPELINING OVERVIEW Appendix A and C

MIPS ISA AND PIPELINING OVERVIEW Appendix A and C 1 MIPS ISA AND PIPELINING OVERVIEW Appendix A and C OUTLINE Review of MIPS ISA Review on Pipelining 2 READING ASSIGNMENT ReadAppendixA ReadAppendixC 3 THEMIPS ISA (A.9) First MIPS in 1985 General-purpose

More information

Reduction of Data Hazards Stalls with Dynamic Scheduling So far we have dealt with data hazards in instruction pipelines by:

Reduction of Data Hazards Stalls with Dynamic Scheduling So far we have dealt with data hazards in instruction pipelines by: Reduction of Data Hazards Stalls with Dynamic Scheduling So far we have dealt with data hazards in instruction pipelines by: Result forwarding (register bypassing) to reduce or eliminate stalls needed

More information

Advanced Computer Architecture

Advanced Computer Architecture ECE 563 Advanced Computer Architecture Fall 2010 Lecture 6: VLIW 563 L06.1 Fall 2010 Little s Law Number of Instructions in the pipeline (parallelism) = Throughput * Latency or N T L Throughput per Cycle

More information

TDT 4260 TDT ILP Chap 2, App. C

TDT 4260 TDT ILP Chap 2, App. C TDT 4260 ILP Chap 2, App. C Intro Ian Bratt (ianbra@idi.ntnu.no) ntnu no) Instruction level parallelism (ILP) A program is sequence of instructions typically written to be executed one after the other

More information

ESE 545 Computer Architecture Instruction-Level Parallelism (ILP): Speculation, Reorder Buffer, Exceptions, Superscalar Processors, VLIW

ESE 545 Computer Architecture Instruction-Level Parallelism (ILP): Speculation, Reorder Buffer, Exceptions, Superscalar Processors, VLIW Computer Architecture ESE 545 Computer Architecture Instruction-Level Parallelism (ILP): Speculation, Reorder Buffer, Exceptions, Superscalar Processors, VLIW 1 Review from Last Lecture Leverage Implicit

More information

CS433 Homework 2 (Chapter 3)

CS433 Homework 2 (Chapter 3) CS433 Homework 2 (Chapter 3) Assigned on 9/19/2017 Due in class on 10/5/2017 Instructions: 1. Please write your name and NetID clearly on the first page. 2. Refer to the course fact sheet for policies

More information

Page 1. Recall from Pipelining Review. Lecture 16: Instruction Level Parallelism and Dynamic Execution #1: Ideas to Reduce Stalls

Page 1. Recall from Pipelining Review. Lecture 16: Instruction Level Parallelism and Dynamic Execution #1: Ideas to Reduce Stalls CS252 Graduate Computer Architecture Recall from Pipelining Review Lecture 16: Instruction Level Parallelism and Dynamic Execution #1: March 16, 2001 Prof. David A. Patterson Computer Science 252 Spring

More information

Advanced Parallel Architecture Lessons 5 and 6. Annalisa Massini /2017

Advanced Parallel Architecture Lessons 5 and 6. Annalisa Massini /2017 Advanced Parallel Architecture Lessons 5 and 6 Annalisa Massini - Pipelining Hennessy, Patterson Computer architecture A quantitive approach Appendix C Sections C.1, C.2 Pipelining Pipelining is an implementation

More information

UNIT 8 1. Explain in detail the hardware support for preserving exception behavior during Speculation.

UNIT 8 1. Explain in detail the hardware support for preserving exception behavior during Speculation. UNIT 8 1. Explain in detail the hardware support for preserving exception behavior during Speculation. July 14) (June 2013) (June 2015)(Jan 2016)(June 2016) H/W Support : Conditional Execution Also known

More information

Chapter 4 The Processor 1. Chapter 4D. The Processor

Chapter 4 The Processor 1. Chapter 4D. The Processor Chapter 4 The Processor 1 Chapter 4D The Processor Chapter 4 The Processor 2 Instruction-Level Parallelism (ILP) Pipelining: executing multiple instructions in parallel To increase ILP Deeper pipeline

More information

UG4 Honours project selection: Talk to Vijay or Boris if interested in computer architecture projects

UG4 Honours project selection: Talk to Vijay or Boris if interested in computer architecture projects Announcements UG4 Honours project selection: Talk to Vijay or Boris if interested in computer architecture projects Inf3 Computer Architecture - 2017-2018 1 Last time: Tomasulo s Algorithm Inf3 Computer

More information

Pipelining concepts The DLX architecture A simple DLX pipeline Pipeline Hazards and Solution to overcome

Pipelining concepts The DLX architecture A simple DLX pipeline Pipeline Hazards and Solution to overcome Thoai Nam Pipelining concepts The DLX architecture A simple DLX pipeline Pipeline Hazards and Solution to overcome Reference: Computer Architecture: A Quantitative Approach, John L Hennessy & David a Patterson,

More information