ETH, Design of Digital Circuits, SS17 Review Session Questions I - SOLUTIONS
|
|
- Sibyl Day
- 5 years ago
- Views:
Transcription
1 ETH, Design of Digital Circuits, SS17 Review Session Questions I - SOLUTIONS Instructors: Prof. Onur Mutlu, Prof. Srdjan Capkun TAs: Jeremie Kim, Minesh Patel, Hasan Hassan, Arash Tavakkol, Der-Yeuan Yu, Francois Serre, Victoria Caparros Cabezas, David Sommer, Mridula Singh, Sinisa Matetic, Aritra Dhar, Marco Guarnieri 1 Potpourri (a) Full Pipeline Keeping a processor pipeline full with useful instructions is critical for achieving high performance. What are the three fundamental reasons why a processor pipeline cannot always be kept full? Reason 1. Data/Control Flow dependences Reason 2. Multi-cycle Operations Reason 3. Resource contention (b) Out-of-Order vs. Dataflow When does an instruction execute in a dataflow processor? When all inputs to the instruction are ready. When does the fetch of an instruction happen in an out-of-order execution processor? When the program counter points to that instruction. What structure holds the instructions until they are ready to execute in an out-of-order processor? Reservation stations. (c) Tomasulo s Algorithm Here is the state of the reservation stations in a processor during a particular cycle ( denotes an unknown value): 1/16
2 ADD Reservation Station Tag V Tag Data V Tag Data A 0 D 1 27 B E C 0 B 0 A What is wrong with this picture? MUL Reservation Station Tag V Tag Data V Tag Data D 0 B 0 C E B Cyclical dependences between instructions, which leads to deadlock. (Between tags B and E, and also between tags A, D, and C.) 2/16
3 2 Out-of-Order Execution In this problem, we will give you the state of the Register Alias Table (RAT) and Reservation Stations (RS) for a Tomasulo-like out-of-order execution engine. Your job is to determine the original sequence of five instructions in program order. The out-of-order machine in this problem behaves as follows: The frontend of the machine has a one-cycle fetch stage and a one-cycle decode stage. The machine can fetch one instruction per cycle, and can decode one instruction per cycle. The machine dispatches one instruction per cycle into the reservation stations, in program order. Dispatch occurs during the decode stage. An instruction always allocates the first reservation station that is available (in top-to-bottom order) at the required functional unit. When a value is captured (at a reservation station) or written back (to a register) in this machine, the old tag that was previously at that location is not cleared; only the valid bit is set. When an instruction in a reservation station finishes executing, the reservation station is cleared. Both the adder and multiplier are fully pipelined. Add instructions take 2 cycles. Multiply instructions take 4 cycles. When an instruction completes execution, it broadcasts its result, and dependent instructions can begin execution in the next cycle if they have all operands available. When multiple instructions are ready to execute at a functional unit, the oldest ready instruction is chosen. Initially, the machine is empty. Five instructions then are fetched, decoded, and dispatched into reservation stations, before any instruction executes. Then, one instruction completes execution. Here is the state of the machine at this point, after the single instruction completes: 3/16
4 (a) Give the five instructions that have been dispatched into the machine, in program order. The source registers for the first instruction can be specified in either order. Give instructions in the following format: opcode destination source1, source2. MUL R3 R1, R7 MUL ADD ADD R4 R1, R2 R2 R3, R4 R6 R0, R5 MUL R6 R2, R6 (b) Now assume that the machine flushes all instructions out of the pipeline and restarts execution from the first instruction in the sequence above. Show the full pipeline timing diagram below for the sequence of five instructions that you determined above, from the fetch of the first instruction to the writeback of the last instruction. Assume that the machine stops fetching instructions after the fifth instruction. As we saw in class, use F for fetch, D for decode, E1, E2, E3, and E4 to signify the first, second, third and fourth cycles of execution for an instruction (as required by the type of instruction), and W to signify writeback. You may or may not need all columns shown. Cycle: MUL R3 R1, R7 F D E1 E2 E3 E4 W MUL R4 R1, R2 F D E1 E2 E3 E4 W ADD R2 R3, R4 F D E1 E2 W ADD R6 R0, R5 F D E1 E2 W MUL R6 R2, R6 F D E1 E2 E3 E4 W Finally, show the state of the RAT and reservation stations after 8 cycles in the blank figures below. 4/16
5 3 The GPU Strikes Back! We define the SIMD utilization of a program run on a GPU as the fraction of SIMD lanes that are kept busy with active threads during the run of a program. The following code segment is run on a GPU. Each thread executes a single iteration of the shown loop. Assume that the data values of the arrays A, B, and C are already in vector registers so there are no loads and stores in this program. (Hint: Notice that there are 5 instructions in each thread.) A warp in the GPU consists of 32 threads, and there are 32 SIMD lanes in the GPU. for (i = 0; i < (512*1024); i++) { if (B[i] < 0) { A[i] = A[i] * C[i]; B[i] = A[i] + B[i]; C[i] = C[i] + 1; B[i] = B[i] + 1; } } (a) How many warps does it take to execute this program? Warps = (Number of threads) / (Number of threads per warp) Number of threads = 2 19 (i.e., one thread per loop iteration). Number of threads per warp = 32 = 2 5 (given). Warps = 2 19 /2 5 = 2 14 (b) When we measure the SIMD utilization for this program with one input set, we find that it is 9/40. What can you say about arrays A, B, and C? Be precise. A: Nothing. B: 1 in every 32 of B s elements are negative. C: Nothing. (c) Is it possible for this program to yield a SIMD utilization of 20% (circle one)? YES NO 5/16
6 If YES, what should be true about arrays A, B, and C for the SIMD utilization to be 20%? Be precise. A: B: C: If NO, explain why not. The smallest SIMD utilization possible is the same as part (b), 36/160, but this is greater than 20%. (d) Is it possible for this program to yield a SIMD utilization of 100% (circle one)? YES NO If YES, what should be true about arrays A, B, C for the SIMD utilization to be 100%? Be precise. A: Nothing. B: Either: (1) All of B s elements are less than 0, or (2) All of B s elements are greater than or equal to 0. C: Nothing. If NO, explain why not. 6/16
7 4 Microcoded Machines Microcoding is a powerful technique to perform complex computations on a simple datapath. In this problem, you will sketch out a microcode-controlled single-bus implementation of the MIPS R2000 ISA. In a single-bus processor, the primary interconnect between state elements and functional units is a shared bus. In each cycle, only one unit can drive data on the bus, while all other units may listen and selectively latch the data. Below is the starting point of a single-bus microarchitecture. Assume that there is a microcode control ROM that can drive all of the control signals shown based on a current state and specify a next state. As an example, below is a possible microcode sequence for the three-register ADD instruction. Assume that other states which are not shown handle instruction fetch and PC update. Thus, at the initial state shown here, the instruction register already contains the instruction. State nextstate lepc enpc leir enir lea leb ALU OP enalu select field leidx RF R RF W enrf lemar MEM R MEM WenMemComment ADD 0 ADD No Op 0 21 (rs) Latch rs into IDX ADD 1 ADD No Op Read RF[rs] into A ADD 2 ADD No Op 0 16 (rt) Latch rt into IDX ADD 3 ADD No Op Read RF[rt] into B ADD 4 ADD No Op 0 11 (rd) Latch rd into IDX ADD 5 Fetch ADD A+B into RF[rd] For this homework problem, you will implement a new instruction, ADDM, in microcode. ADDM performs an addition where one operand is loaded from memory and the other operand comes from a register, and the result is stored back into a register. It is an R-type instruction with the following semantics: RF[rd] = M[RF[rs]] + RF[rt] In other words, the instruction loads the word in memory at the address specified by register rs, then adds the loaded value to the value in register rt, and stores the result in register rd. Write out a microcode sequence like the one in the table above for the ADDM instruction. You can assume that when accessing memory (with the MEM R signal asserted), the microcode sequencer will stall until the memory provides the data. Microcode for ADDM instruction State nextstate lepc enpc leir enir lea leb ALU OP enalu select field leidx RF R RF W enrf lemar MEM R MEM WenMemComment ADDM 0 ADDM No Op 0 21 (rs) Latch rs into IDX ADDM 1 ADDM No Op Read RF[rs] into MAR ADDM 2 ADDM No Op Latch M[RF[rs]] into A ADDM 3 ADDM No Op 0 16 (rt) Latch rt into IDX ADDM 4 ADDM No Op Latch RF[rt] into B ADDM 5 ADDM No Op 0 11 (rd) Latch rd into IDX ADDM 6 Fetch ADD A+B into RF[rd] 7/16
8 5 Out-of-Order Execution Out-of-order processors make efficient use of their functional units by executing instructions according to the flow of data between them. (a) In class, we learned about a graphical way of showing the data dependencies (edges) of instructions (vertices) using a data flow graph. For the instruction stream below, draw the corresponding data flow graph. ADD r3 <- r1, r2 MUL r4 <- r1, r3 ADD r5 <- r8, r9 DIV r6 <- r1, r3 ADD r7 <- r6, r5 Solution: r1 r2 r3 r8 r9 r4 r6 r5 (b) Of course, while a data flow graph is a helpful way of visualizing what goes on in an out-of-order processor, real machines execute instructions using multiple pipeline stages. Take the code from above and find the number of cycles it would take to execute on a processor with in-order fetch and out-of-order dispatch. Assume the following: It takes one cycle to decode an instruction and another cycle to issue the decoded instruction into a reservation station. These two stages can be pipelined. There are separate functional units for ADD, MUL and DIV, and each functional unit has its own reservation station. Tags are broadcast in the same cycle their corresponding operation finishes executing. A single tag broadcast bus exists and if more than one reservation station entry to the same execution unit is ready to be dispatched, the older reservation station entry will use the bus and the younger ones will have to stall. Similarly, if more than one instruction contends for writing to the ROB or architectural register file during a single cycle, the oldest one receives access and the younger ones must stall. ADDs take 3 cycles and are pipelined, MULs take 5 cycles and are pipelined, and DIVs take 7 cycles and are pipelined. How many cycles will the program take to execute on an in-order fetch and out-of-order dispatch machine, under the assumptions above? 8/16
9 18 cycles: ADD F D S E E E R W MUL F D S - - E E E E E R W ADD F D S E E E R W DIV F D S E E E E E E E R W ADD F D S E E E R W (c) How many cycles will the program take to execute on an in-order fetch and in-order dispatch machine, under the same assumptions as above? 20 cycles: ADD F D S E E E R W MUL F D S - - E E E E E R W ADD F D - - S E E E R - - W DIV F - - D S E E E E E E E R W ADD F D S E E E R W 9/16
10 6 Vector Processing You are studying a program that runs on a vector computer with the following latencies for various instructions: VLD and VST: 50 cycles for each vector element; fully interleaved and pipelined. VADD: 4 cycles for each vector element (fully pipelined). VMUL: 16 cycles for each vector element (fully pipelined). VDIV: 32 cycles for each vector element (fully pipelined). VRSHF (right shift): 1 cycle for each vector element (fully pipelined). Assume that: The machine has an in-order pipeline. The machine supports chaining between vector functional units. In order to support 1-cycle memory access after the first element in a vector, the machine interleaves vector elements across memory banks. All vectors are stored in memory with the first element mapped to bank 0, the second element mapped to bank 1, etc. Each memory bank has an 8KB row buffer. Vector elements are 64 bits in size. Each memory bank has two ports (so that two loads/stores can be active simultaneously), and there are two load/store functional units available. (a) What is the minimum power-of-two number of banks required in order for memory accesses to never stall? (Assume a vector stride of 1.) 64 banks, because memory latency is 50 cycles and the next power of two is 64. There is another solution if one interprets never stall to mean that a single load will never stall rather than the memory accesses in the program below: in that case, 32 banks suffices since each bank has two ports. For those who answered this way on the test, we gave full credit. (b) The machine (with as many banks as you found in part (a)) executes the following program (assume that the vector stride is set to 1): VLD V1 <- A VLD V2 <- B VADD V3 <- V1, V2 VMUL V4 <- V3, V1 VRSHF V5 <- V4, 2 It takes 111 cycles to execute this program. What is the vector length? 40 elements VLD (VLEN-1)---- VLD VADD -4- VMUL -16- VRSHF (VLEN-1) (VLEN-1) = 71 + VLEN = 111 -> VLEN = 40 If the machine did not support chaining (but could still pipeline independent operations), how many cycles would be required to execute the same program? Show your work. 10/16
11 228 cycles VLD (VLEN-1)--- VLD (VLEN-1)--- VADD (VLEN-1)--- VMUL (VLEN-1)--- VRSHF 1 --(VLEN-1) *(VLEN-1) = *VLEN = 228 (c) The architect of this machine decides that she needs to cut costs in the machine s memory system. She reduces the number of banks by a factor of 2 from the number of banks you found in part (a) above. Because loads and stores might stall due to bank contention, an arbiter is added to each bank so that pending loads from the oldest instruction are serviced first. How many cycles does the program take to execute on the machine with this reduced-cost memory system (but with chaining)? 129 cycles VLD [0] bank 0 (takes port 0) [31] bank 31 [32] bank 0 (takes port 0) [39] bank 7 VLD [0] bank 0 (takes port 1) [31] bank 31 [32] bank 0 (takes port 1) [39] bank 7 VADD (tracking last elements) VMUL VRSHF 1 (B[39]: ) = 129 cyc Now, the architect reduces cost further by reducing the number of memory banks (to a lower power of 2). The program executes in 279 cycles. How many banks are in the system? 8 banks VLD [0] [8] [16] [24] [32] [39] VLD [39] 1 11/16
12 VADD VMUL VRSHF 1 5* = 279 cyc 12/16
13 7 Tracing the Cache Assume you have three toy CPUs: 6808-D, 6808-T, and 6808-F. All three CPUs feature one level of cache. The cache size is 128 bytes, the cache block size is 32 bytes, and the cache uses LRU replacement. The only difference between the three CPUs is the associativity of the cache: 6808-D uses a direct mapped cache T uses a two-way associative cache F uses a fully associative cache. You run the SPECMem3000 program to evaluate the CPUs. This benchmark program tests only memory read performance by issuing read requests to the cache. Assume that the cache is empty before you run the benchmark. The cache accesses generated by the program are as follows, in order of access from left to right: A, B, A, H, B, G, H, H, A, E, H, D, H, G, C, C, G, C, A, B, H, D, E, C, C, B, A, D, E, F Each letter represents a unique cache block. All 8 cache blocks are contiguous in memory. However, the ordering of the letters does not necessarily correspond to the ordering of the cache blocks in memory. For 6808-D, you observe the following cache misses in order of generation: A, B, A, H, B, G, A, E, D, H, C, G, C, B, D, A, F (a) By using the above trace, please identify which cache blocks are in the same set for the 6808-D processor. Please be clear. A and B C and G H and D E and F (b) Please write down the sequence of cache misses for the 6808-F processor in their order of generation. (Hint: You might want to write down the cache state after each request). By simulating the cache and using the requests Req: A B A H B G H H A E H D H G C C G C A B H D E C C B A D E F M? : x x x x x x x x x x x x x x x x x x x MRU: A B A H B G H H A E H D H G C C G C A B H D E C C B A D E F : - A B A H B G G H A E H D H G G C G C A B H D E E C B A D E : B A H B B G H A E E D H H H H G C A B H D D E C B A D LRU: A A A B G G A A E D D D D H G C A B H H D E C B A (c) For 6808-T, you observed the following five cache misses in order of generation: A, B, H, G, E But, unfortunately, your evaluation setup broke before you could observe all cache misses for the 6808-T. Using the given information, which cache blocks are in the same set for the 6808-T processor? 13/16
14 We first simulate the cache up to the point it breaks. By simulating the cache and using the requests Req : A B A H B G H H A E M? : x x x x x MRU0: A B A A B B B B A E LRU0: - A B B A A A A B A MRU1: H H G H H H H LRU1: H G G G G If H was in the same set as A and B, then the B right after H would have missed. Similarly if G was in the same set as A and B, the A right before E would have missed. Using this information and the sets calculated in part (a), the sets are respectively A, B, E, and F H, G, C, and D (d) Please write down the sequence of cache misses for the 6808-T processor in their order of generation. Req : A B A H B G H H A E H D H G C C G C A B H D E C C B A D E F M? : x x x x x x x x x x x x x x x x MRU0: A B A A B B B B A E E E E E E E E E A B B B E E E B A A E F LRU0: - A B B A A A A B A A A A A A A A A E A A A B B B E B B A E MRU1: H H G H H H H H D H G C C G C C C H D D C C C C D D D LRU1: H G G G G G H D H G G C G G G C H H D D D D C C C (e) What is the cache miss rate for each processor? 6808-D: 17/ T: 16/ F: 19/30 14/16
15 8 Programming a Systolic Array Figure 1 shows a systolic array processing element. Each processing element takes in two inputs, M and N, and outputs P and Q. Each processing element also contains an accumulator R that can be read from and written to. The initial value of the accumulator is 0. Figure 2 shows a systolic array composed of 9 processing elements. The smaller boxes are the inputs to the systolic array and the larger boxes are the processing elements. You will program this systolic array to perform the following calculation: c 00 c 01 c 02 a 00 a 01 a 02 b 00 b 01 b 02 c 10 c 11 c 12 = a 10 a 11 a 12 b 10 b 11 b 12 c 20 c 21 c 22 a 20 a 21 a 22 b 20 b 21 b 22 In each time cycle, each processing element will take in its two inputs, perform any necessary actions, and write on its outputs. The time cycle labels on the input boxes determine which time cycle the inputs will be fed into their corresponding processing elements. Any processing element input that is not driven will default to 0, and any processing element that has no output arrow will have its output ignored. After all the calculations finish, each processing element s accumulator will hold one element of the final result matrix, arranged in the correct order. (a) Please describe the operations that each individual processing element performs, using mathematical equations and the variables M, N, P, Q and R. N M R P Q Figure 1: A systolic array processing element P = M Q = N R = R + M N (b) Please fill in all 30 input boxes in Figure 2 so that the systolic array computes the correct matrix multiplication result described on the previous page. (Hint: Use a ij and b ij.) 15/16
16 4 0 0 b b 21 b 12 TIME 2 b 20 b 11 b 02 1 b 10 b b TIME a 02 a 01 a 00 0 a 12 a 11 a 10 0 a 22 a 21 a Figure 2: A systolic array 16/16
ETH, Design of Digital Circuits, SS17 Review Session Questions I
ETH, Design of Digital Circuits, SS17 Review Session Questions I Instructors: Prof. Onur Mutlu, Prof. Srdjan Capkun TAs: Jeremie Kim, Minesh Patel, Hasan Hassan, Arash Tavakkol, Der-Yeuan Yu, Francois
More informationETH, Design of Digital Circuits, SS17 Practice Exercises II - Solutions
ETH, Design of Digital Circuits, SS17 Practice Exercises II - Solutions Instructors: Prof. Onur Mutlu, Prof. Srdjan Capkun TAs: Jeremie Kim, Minesh Patel, Hasan Hassan, Arash Tavakkol, Der-Yeuan Yu, Francois
More informationETH, Design of Digital Circuits, SS17 Practice Exercises III
ETH, Design of Digital Circuits, SS17 Practice Exercises III Instructors: Prof. Onur Mutlu, Prof. Srdjan Capkun TAs: Jeremie Kim, Minesh Patel, Hasan Hassan, Arash Tavakkol, Der-Yeuan Yu, Francois Serre,
More information1 Tomasulo s Algorithm
Design of Digital Circuits (252-0028-00L), Spring 2018 Optional HW 4: Out-of-Order Execution, Dataflow, Branch Prediction, VLIW, and Fine-Grained Multithreading uctor: Prof. Onur Mutlu TAs: Juan Gomez
More informationDesign of Digital Circuits ( L) ETH Zürich, Spring 2017
Name: Student ID: Final Examination Design of Digital Circuits (252-0028-00L) ETH Zürich, Spring 2017 Professors Onur Mutlu and Srdjan Capkun Problem 1 (70 Points): Problem 2 (50 Points): Problem 3 (40
More information1 Tomasulo s Algorithm
Design of Digital Circuits (252-0028-00L), Spring 2018 Optional HW 4: Out-of-Order Execution, Dataflow, Branch Prediction, VLIW, and Fine-Grained Multithreading SOLUTIONS uctor: Prof. Onur Mutlu TAs: Juan
More informationIntro to Computer Architecture, Spring 2012 Midterm Exam II. Name:
18-447 Intro to Computer Architecture, Spring 2012 Midterm Exam II Instructor: Onur Mutlu Teaching Assistants: Chris Fallin, Lavanya Subramanian, Abeer Agrawal Date: April 11, 2012 Name: Instructions:
More informationDesign of Digital Circuits ( L) ETH Zürich, Spring 2018
Name: Student ID: Final Exam Design of Digital Circuits (252-0028-00L) ETH Zürich, Spring 208 Prof. Onur Mutlu Problem (30 Points): Problem 2 (30 Points): Problem 3 (5 Points): Problem 4 (50 Points): Problem
More informationIntro to Computer Architecture, Spring 2012 Midterm Exam II
18-447 Intro to Computer Architecture, Spring 2012 Midterm Exam II Instructor: Onur Mutlu Teaching Assistants: Chris Fallin, Lavanya Subramanian, Abeer Agrawal Date: April 11, 2012 Name: SOLUTIONS Problem
More information15-740/ Computer Architecture, Fall 2011 Midterm Exam II
15-740/18-740 Computer Architecture, Fall 2011 Midterm Exam II Instructor: Onur Mutlu Teaching Assistants: Justin Meza, Yoongu Kim Date: December 2, 2011 Name: Instructions: Problem I (69 points) : Problem
More informationComputer Architecture: SIMD and GPUs (Part I) Prof. Onur Mutlu Carnegie Mellon University
Computer Architecture: SIMD and GPUs (Part I) Prof. Onur Mutlu Carnegie Mellon University A Note on This Lecture These slides are partly from 18-447 Spring 2013, Computer Architecture, Lecture 15: Dataflow
More informationComputer Architecture ( L) ETH Zürich, Fall 2017
Name: SOLUTIONS Student ID: Midterm Exam Computer Architecture (263-221-L) ETH Zürich, Fall 217 Prof. Onur Mutlu Problem 1 (3 Points): Problem 2 (8 Points): Problem 3 (9 Points): Problem 4 (4 Points):
More informationComputer Architecture Lecture 15: Load/Store Handling and Data Flow. Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 2/21/2014
18-447 Computer Architecture Lecture 15: Load/Store Handling and Data Flow Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 2/21/2014 Lab 4 Heads Up Lab 4a out Branch handling and branch predictors
More informationDesign of Digital Circuits Lecture 21: GPUs. Prof. Onur Mutlu ETH Zurich Spring May 2017
Design of Digital Circuits Lecture 21: GPUs Prof. Onur Mutlu ETH Zurich Spring 2017 12 May 2017 Agenda for Today & Next Few Lectures Single-cycle Microarchitectures Multi-cycle and Microprogrammed Microarchitectures
More informationComputer Architecture Lecture 14: Out-of-Order Execution. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 2/18/2013
18-447 Computer Architecture Lecture 14: Out-of-Order Execution Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 2/18/2013 Reminder: Homework 3 Homework 3 Due Feb 25 REP MOVS in Microprogrammed
More informationComputer Architecture Lecture 12: Out-of-Order Execution (Dynamic Instruction Scheduling)
18-447 Computer Architecture Lecture 12: Out-of-Order Execution (Dynamic Instruction Scheduling) Prof. Onur Mutlu Carnegie Mellon University Spring 2015, 2/13/2015 Agenda for Today & Next Few Lectures
More informationCS152 Computer Architecture and Engineering. Complex Pipelines
CS152 Computer Architecture and Engineering Complex Pipelines Assigned March 6 Problem Set #3 Due March 20 http://inst.eecs.berkeley.edu/~cs152/sp12 The problem sets are intended to help you learn the
More informationComputer Architecture: Out-of-Order Execution II. Prof. Onur Mutlu Carnegie Mellon University
Computer Architecture: Out-of-Order Execution II Prof. Onur Mutlu Carnegie Mellon University A Note on This Lecture These slides are partly from 18-447 Spring 2013, Computer Architecture, Lecture 15 Video
More information6.823 Computer System Architecture Datapath for DLX Problem Set #2
6.823 Computer System Architecture Datapath for DLX Problem Set #2 Spring 2002 Students are allowed to collaborate in groups of up to 3 people. A group hands in only one copy of the solution to a problem
More informationCS152 Computer Architecture and Engineering VLIW, Vector, and Multithreaded Machines
CS152 Computer Architecture and Engineering VLIW, Vector, and Multithreaded Machines Assigned April 7 Problem Set #5 Due April 21 http://inst.eecs.berkeley.edu/~cs152/sp09 The problem sets are intended
More information15-740/ Computer Architecture Lecture 10: Out-of-Order Execution. Prof. Onur Mutlu Carnegie Mellon University Fall 2011, 10/3/2011
5-740/8-740 Computer Architecture Lecture 0: Out-of-Order Execution Prof. Onur Mutlu Carnegie Mellon University Fall 20, 0/3/20 Review: Solutions to Enable Precise Exceptions Reorder buffer History buffer
More informationComputer Architecture Lecture 13: State Maintenance and Recovery. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 2/15/2013
18-447 Computer Architecture Lecture 13: State Maintenance and Recovery Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 2/15/2013 Reminder: Homework 3 Homework 3 Due Feb 25 REP MOVS in Microprogrammed
More informationEECC551 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 informationEXAM 1 SOLUTIONS. Midterm Exam. ECE 741 Advanced Computer Architecture, Spring Instructor: Onur Mutlu
Midterm Exam ECE 741 Advanced Computer Architecture, Spring 2009 Instructor: Onur Mutlu TAs: Michael Papamichael, Theodoros Strigkos, Evangelos Vlachos February 25, 2009 EXAM 1 SOLUTIONS Problem Points
More informationCMU Introduction to Computer Architecture, Spring Midterm Exam 1. Date: Wed., 3/6. Legibility & Name (5 Points): Problem 1 (65 Points):
Name: CMU 18-447 Introduction to Computer Architecture, Spring 2013 Midterm Exam 1 Instructions: Date: Wed., 3/6 Legibility & Name (5 Points): Problem 1 (65 Points): Problem 2 (25 Points): Problem 3 (20
More informationChapter. Out of order Execution
Chapter Long EX Instruction stages We have assumed that all stages. There is a problem with the EX stage multiply (MUL) takes more time than ADD MUL ADD We can clearly delay the execution of the ADD until
More informationChapter 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 informationEC 513 Computer Architecture
EC 513 Computer Architecture Complex Pipelining: Superscalar Prof. Michel A. Kinsy Summary Concepts Von Neumann architecture = stored-program computer architecture Self-Modifying Code Princeton architecture
More informationDepartment of Electrical and Computer Engineering The University of Texas at Austin
Department of Electrical and Computer Engineering The University of Texas at Austin EE 460N Fall 2018 Y. N. Patt, Instructor Chirag Sakhuja, John MacKay, Aniket Deshmukh, Mohammad Behnia, TAs Final Exam
More informationProcessor: Superscalars Dynamic Scheduling
Processor: Superscalars Dynamic Scheduling Z. Jerry Shi Assistant Professor of Computer Science and Engineering University of Connecticut * Slides adapted from Blumrich&Gschwind/ELE475 03, Peh/ELE475 (Princeton),
More informationComputer Architecture: SIMD and GPUs (Part II) Prof. Onur Mutlu Carnegie Mellon University
Computer Architecture: SIMD and GPUs (Part II) Prof. Onur Mutlu Carnegie Mellon University A Note on This Lecture These slides are partly from 18-447 Spring 2013, Computer Architecture, Lecture 19: SIMD
More informationComputer Architecture ( L), Fall 2017 HW 3: Branch handling and GPU
Computer Architecture (263-2210-00L), Fall 2017 HW 3: Branch handling and GPU Instructor: Prof. Onur Mutlu TAs: Hasan Hassan, Arash Tavakkol, Mohammad Sadr, Lois Orosa, Juan Gomez Luna Assigned: Wednesday,
More informationCS433 Midterm. Prof Josep Torrellas. October 16, Time: 1 hour + 15 minutes
CS433 Midterm Prof Josep Torrellas October 16, 2014 Time: 1 hour + 15 minutes Name: Alias: Instructions: 1. This is a closed-book, closed-notes examination. 2. The Exam has 4 Questions. Please budget your
More informationComputer Architecture Lecture 16: SIMD Processing (Vector and Array Processors)
18-447 Computer Architecture Lecture 16: SIMD Processing (Vector and Array Processors) Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 2/24/2014 Lab 4 Reminder Lab 4a out Branch handling and branch
More informationCS152 Computer Architecture and Engineering March 13, 2008 Out of Order Execution and Branch Prediction Assigned March 13 Problem Set #4 Due March 25
CS152 Computer Architecture and Engineering March 13, 2008 Out of Order Execution and Branch Prediction Assigned March 13 Problem Set #4 Due March 25 http://inst.eecs.berkeley.edu/~cs152/sp08 The problem
More informationCS152 Computer Architecture and Engineering CS252 Graduate Computer Architecture. VLIW, Vector, and Multithreaded Machines
CS152 Computer Architecture and Engineering CS252 Graduate Computer Architecture VLIW, Vector, and Multithreaded Machines Assigned 3/24/2019 Problem Set #4 Due 4/5/2019 http://inst.eecs.berkeley.edu/~cs152/sp19
More informationUniversity of Toronto Faculty of Applied Science and Engineering
Print: First Name:Solution...................... Last Name:............................. Student Number:............................................... University of Toronto Faculty of Applied Science
More informationHardware-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 informationReorder Buffer Implementation (Pentium Pro) Reorder Buffer Implementation (Pentium Pro)
Reorder Buffer Implementation (Pentium Pro) Hardware data structures retirement register file (RRF) (~ IBM 360/91 physical registers) physical register file that is the same size as the architectural registers
More informationCS 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 John Wawrzynek Electrical Engineering and Computer Sciences University of California at
More informationCMU Introduction to Computer Architecture, Spring Midterm Exam 2. Date: Wed., 4/17. Legibility & Name (5 Points): Problem 1 (90 Points):
Name: CMU 18-447 Introduction to Computer Architecture, Spring 2013 Midterm Exam 2 Instructions: Date: Wed., 4/17 Legibility & Name (5 Points): Problem 1 (90 Points): Problem 2 (35 Points): Problem 3 (35
More informationCOSC4201 Instruction Level Parallelism Dynamic Scheduling
COSC4201 Instruction Level Parallelism Dynamic Scheduling Prof. Mokhtar Aboelaze Parts of these slides are taken from Notes by Prof. David Patterson (UCB) Outline Data dependence and hazards Exposing parallelism
More informationReduction 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 informationPrecise Exceptions and Out-of-Order Execution. Samira Khan
Precise Exceptions and Out-of-Order Execution Samira Khan Multi-Cycle Execution Not all instructions take the same amount of time for execution Idea: Have multiple different functional units that take
More informationDesign of Digital Circuits Lecture 19: Approaches to Concurrency. Prof. Onur Mutlu ETH Zurich Spring May 2017
Design of Digital Circuits Lecture 19: Approaches to Concurrency Prof. Onur Mutlu ETH Zurich Spring 2017 5 May 2017 Agenda for Today & Next Few Lectures! Single-cycle Microarchitectures! Multi-cycle and
More informationNAME: Problem Points Score. 7 (bonus) 15. Total
Midterm Exam ECE 741 Advanced Computer Architecture, Spring 2009 Instructor: Onur Mutlu TAs: Michael Papamichael, Theodoros Strigkos, Evangelos Vlachos February 25, 2009 NAME: Problem Points Score 1 40
More informationChapter 2: Memory Hierarchy Design Part 2
Chapter 2: Memory Hierarchy Design Part 2 Introduction (Section 2.1, Appendix B) Caches Review of basics (Section 2.1, Appendix B) Advanced methods (Section 2.3) Main Memory Virtual Memory Fundamental
More informationSOLUTION. Midterm #1 February 26th, 2018 Professor Krste Asanovic Name:
SOLUTION Notes: CS 152 Computer Architecture and Engineering CS 252 Graduate Computer Architecture Midterm #1 February 26th, 2018 Professor Krste Asanovic Name: I am taking CS152 / CS252 This is a closed
More informationComputer Systems Architecture I. CSE 560M Lecture 10 Prof. Patrick Crowley
Computer Systems Architecture I CSE 560M Lecture 10 Prof. Patrick Crowley Plan for Today Questions Dynamic Execution III discussion Multiple Issue Static multiple issue (+ examples) Dynamic multiple issue
More informationCOMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. 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 informationCOMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. 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 The Processor - Introduction
More informationChapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor The Processor - Introduction
More informationChapter 2: Memory Hierarchy Design Part 2
Chapter 2: Memory Hierarchy Design Part 2 Introduction (Section 2.1, Appendix B) Caches Review of basics (Section 2.1, Appendix B) Advanced methods (Section 2.3) Main Memory Virtual Memory Fundamental
More informationHW1 Solutions. Type Old Mix New Mix Cost CPI
HW1 Solutions Problem 1 TABLE 1 1. Given the parameters of Problem 6 (note that int =35% and shift=5% to fix typo in book problem), consider a strength-reducing optimization that converts multiplies by
More informationComputer Architecture Lecture 15: Dataflow and SIMD. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 2/20/2013
18-447 Computer Architecture Lecture 15: Dataflow and SIMD Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 2/20/2013 Reminder: Homework 3 Homework 3 Due Feb 25 REP MOVS in Microprogrammed LC-3b,
More informationISA Instruction Operation
This exam has 6 problems. Make sure you have a complete exam before you begin. Write your name on every page in case pages become separated during grading. You will have three hours to complete this exam.
More informationDesign of Digital Circuits Lecture 20: SIMD Processors. Prof. Onur Mutlu ETH Zurich Spring May 2017
Design of Digital Circuits Lecture 20: SIMD Processors Prof. Onur Mutlu ETH Zurich Spring 2017 11 May 2017 Agenda for Today & Next Few Lectures! Single-cycle Microarchitectures! Multi-cycle and Microprogrammed
More informationSuperscalar SMIPS Processor
Superscalar SMIPS Processor Group 2 Qian (Vicky) Liu Cliff Frey 1 Introduction Our project is the implementation of a superscalar processor that implements the SMIPS specification. Our primary goal is
More informationChapter 4. The Processor
Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified
More informationLecture notes for CS Chapter 2, part 1 10/23/18
Chapter 2: Memory Hierarchy Design Part 2 Introduction (Section 2.1, Appendix B) Caches Review of basics (Section 2.1, Appendix B) Advanced methods (Section 2.3) Main Memory Virtual Memory Fundamental
More informationCOMPUTER ORGANIZATION AND DESIGN
ARM COMPUTER ORGANIZATION AND DESIGN Edition The Hardware/Software Interface Chapter 4 The Processor Modified and extended by R.J. Leduc - 2016 To understand this chapter, you will need to understand some
More informationCS 352H Computer Systems Architecture Exam #1 - Prof. Keckler October 11, 2007
CS 352H Computer Systems Architecture Exam #1 - Prof. Keckler October 11, 2007 Name: Solutions (please print) 1-3. 11 points 4. 7 points 5. 7 points 6. 20 points 7. 30 points 8. 25 points Total (105 pts):
More informationCMSC22200 Computer Architecture Lecture 8: Out-of-Order Execution. Prof. Yanjing Li University of Chicago
CMSC22200 Computer Architecture Lecture 8: Out-of-Order Execution Prof. Yanjing Li University of Chicago Administrative Stuff! Lab2 due tomorrow " 2 free late days! Lab3 is out " Start early!! My office
More informationEE382N (20): Computer Architecture - Parallelism and Locality Spring 2015 Lecture 09 GPUs (II) Mattan Erez. The University of Texas at Austin
EE382 (20): Computer Architecture - ism and Locality Spring 2015 Lecture 09 GPUs (II) Mattan Erez The University of Texas at Austin 1 Recap 2 Streaming model 1. Use many slimmed down cores to run in parallel
More informationECE 411, Exam 1. Good luck!
This exam has 6 problems. Make sure you have a complete exam before you begin. Write your name on every page in case pages become separated during grading. You will have three hours to complete this exam.
More informationPage 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 informationHandout 2 ILP: Part B
Handout 2 ILP: Part B Review from Last Time #1 Leverage Implicit Parallelism for Performance: Instruction Level Parallelism Loop unrolling by compiler to increase ILP Branch prediction to increase ILP
More informationComputer Architecture and Engineering CS152 Quiz #4 April 11th, 2012 Professor Krste Asanović
Computer Architecture and Engineering CS152 Quiz #4 April 11th, 2012 Professor Krste Asanović Name: ANSWER SOLUTIONS This is a closed book, closed notes exam. 80 Minutes 17 Pages Notes: Not all questions
More informationComputer organization by G. Naveen kumar, Asst Prof, C.S.E Department 1
Pipelining and Vector Processing Parallel Processing: The term parallel processing indicates that the system is able to perform several operations in a single time. Now we will elaborate the scenario,
More informationUniversity of Toronto Faculty of Applied Science and Engineering
Print: First Name:............ Solutions............ Last Name:............................. Student Number:............................................... University of Toronto Faculty of Applied Science
More informationECE 552 / CPS 550 Advanced Computer Architecture I. Lecture 19 Summary
ECE 552 / CPS 550 Advanced Computer Architecture I Lecture 19 Summary Benjamin Lee Electrical and Computer Engineering Duke University www.duke.edu/~bcl15 www.duke.edu/~bcl15/class/class_ece252fall11.html
More informationChapter 4. The Processor
Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified
More informationCS146 Computer Architecture. Fall Midterm Exam
CS146 Computer Architecture Fall 2002 Midterm Exam This exam is worth a total of 100 points. Note the point breakdown below and budget your time wisely. To maximize partial credit, show your work and state
More informationCOMPUTER ORGANIZATION AND DESIGN
COMPUTER ORGANIZATION AND DESIGN 5 Edition th The Hardware/Software Interface Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count CPI and Cycle time Determined
More informationENGN 2910A Homework 03 (140 points) Due Date: Oct 3rd 2013
ENGN 2910A Homework 03 (140 points) Due Date: Oct 3rd 2013 Professor: Sherief Reda School of Engineering, Brown University 1. [from Debois et al. 30 points] Consider the non-pipelined implementation of
More informationDepartment of Electrical and Computer Engineering The University of Texas at Austin
Department of Electrical and Computer Engineering The University of Texas at Austin EE 360N, Spring 2003 Yale Patt, Instructor Hyesoon Kim, Onur Mutlu, Moinuddin Qureshi, Santhosh Srinath, TAs Exam 2,
More informationStatic 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 informationEE382A Lecture 7: Dynamic Scheduling. Department of Electrical Engineering Stanford University
EE382A Lecture 7: Dynamic Scheduling Department of Electrical Engineering Stanford University http://eeclass.stanford.edu/ee382a Lecture 7-1 Announcements Project proposal due on Wed 10/14 2-3 pages submitted
More informationLecture-13 (ROB and Multi-threading) CS422-Spring
Lecture-13 (ROB and Multi-threading) CS422-Spring 2018 Biswa@CSE-IITK Cycle 62 (Scoreboard) vs 57 in Tomasulo Instruction status: Read Exec Write Exec Write Instruction j k Issue Oper Comp Result Issue
More informationRecall 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 information15-740/ Computer Architecture Lecture 8: Issues in Out-of-order Execution. Prof. Onur Mutlu Carnegie Mellon University
15-740/18-740 Computer Architecture Lecture 8: Issues in Out-of-order Execution Prof. Onur Mutlu Carnegie Mellon University Readings General introduction and basic concepts Smith and Sohi, The Microarchitecture
More information15-740/ Computer Architecture Lecture 4: Pipelining. Prof. Onur Mutlu Carnegie Mellon University
15-740/18-740 Computer Architecture Lecture 4: Pipelining Prof. Onur Mutlu Carnegie Mellon University Last Time Addressing modes Other ISA-level tradeoffs Programmer vs. microarchitect Virtual memory Unaligned
More informationDC57 COMPUTER ORGANIZATION JUNE 2013
Q2 (a) How do various factors like Hardware design, Instruction set, Compiler related to the performance of a computer? The most important measure of a computer is how quickly it can execute programs.
More informationLECTURE 3: THE PROCESSOR
LECTURE 3: THE PROCESSOR Abridged version of Patterson & Hennessy (2013):Ch.4 Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU
More informationCS450/650 Notes Winter 2013 A Morton. Superscalar Pipelines
CS450/650 Notes Winter 2013 A Morton Superscalar Pipelines 1 Scalar Pipeline Limitations (Shen + Lipasti 4.1) 1. Bounded Performance P = 1 T = IC CPI 1 cycletime = IPC frequency IC IPC = instructions per
More informationEECS 470 Midterm Exam Winter 2015
EECS 470 Midterm Exam Winter 2015 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Page # Points 2 /20 3 /15 4 /9 5
More informationOutline Review: Basic Pipeline Scheduling and Loop Unrolling Multiple Issue: Superscalar, VLIW. CPE 631 Session 19 Exploiting ILP with SW Approaches
Session xploiting ILP with SW Approaches lectrical and Computer ngineering University of Alabama in Huntsville Outline Review: Basic Pipeline Scheduling and Loop Unrolling Multiple Issue: Superscalar,
More informationTomasulo s Algorithm
Tomasulo s Algorithm Architecture to increase ILP Removes WAR and WAW dependencies during issue WAR and WAW Name Dependencies Artifact of using the same storage location (variable name) Can be avoided
More informationCS Computer Architecture
CS 35101 Computer Architecture Section 600 Dr. Angela Guercio Fall 2010 An Example Implementation In principle, we could describe the control store in binary, 36 bits per word. We will use a simple symbolic
More informationCSE 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 informationCISC 662 Graduate Computer Architecture Lecture 11 - Hardware Speculation Branch Predictions
CISC 662 Graduate Computer Architecture Lecture 11 - Hardware Speculation Branch Predictions Michela Taufer http://www.cis.udel.edu/~taufer/teaching/cis6627 Powerpoint Lecture Notes from John Hennessy
More informationChapter 03. Authors: John Hennessy & David Patterson. Copyright 2011, Elsevier Inc. All rights Reserved. 1
Chapter 03 Authors: John Hennessy & David Patterson Copyright 2011, Elsevier Inc. All rights Reserved. 1 Figure 3.3 Comparison of 2-bit predictors. A noncorrelating predictor for 4096 bits is first, followed
More informationPortland State University ECE 587/687. Superscalar Issue Logic
Portland State University ECE 587/687 Superscalar Issue Logic Copyright by Alaa Alameldeen, Zeshan Chishti and Haitham Akkary 2017 Instruction Issue Logic (Sohi & Vajapeyam, 1987) After instructions are
More informationGood luck and have fun!
Midterm Exam October 13, 2014 Name: Problem 1 2 3 4 total Points Exam rules: Time: 90 minutes. Individual test: No team work! Open book, open notes. No electronic devices, except an unprogrammed calculator.
More informationPIPELINING: HAZARDS. Mahdi Nazm Bojnordi. CS/ECE 6810: Computer Architecture. Assistant Professor School of Computing University of Utah
PIPELINING: HAZARDS Mahdi Nazm Bojnordi Assistant Professor School of Computing University of Utah CS/ECE 6810: Computer Architecture Overview Announcement Homework 1 submission deadline: Jan. 30 th This
More informationCISC, RISC and post-risc architectures
Microprocessor architecture and instruction execution CISC, RISC and Post-RISC architectures Instruction Set Architecture and microarchitecture Instruction encoding and machine instructions Pipelined and
More information4.1.3 [10] < 4.3>Which resources (blocks) produce no output for this instruction? Which resources produce output that is not used?
2.10 [20] < 2.2, 2.5> For each LEGv8 instruction in Exercise 2.9 (copied below), show the value of the opcode (Op), source register (Rn), and target register (Rd or Rt) fields. For the I-type instructions,
More informationAdvanced Computer Architecture
Advanced Computer Architecture 1 L E C T U R E 4: D A T A S T R E A M S I N S T R U C T I O N E X E C U T I O N I N S T R U C T I O N C O M P L E T I O N & R E T I R E M E N T D A T A F L O W & R E G I
More informationCOSC 6385 Computer Architecture. - Memory Hierarchies (II)
COSC 6385 Computer Architecture - Memory Hierarchies (II) Fall 2008 Cache Performance Avg. memory access time = Hit time + Miss rate x Miss penalty with Hit time: time to access a data item which is available
More informationThe Nios II Family of Configurable Soft-core Processors
The Nios II Family of Configurable Soft-core Processors James Ball August 16, 2005 2005 Altera Corporation Agenda Nios II Introduction Configuring your CPU FPGA vs. ASIC CPU Design Instruction Set Architecture
More information