160 likes | 280 Views
Appendix C Practice Problem Set 1. Problem 1. 1. Identify data dependencies in the code segment below. # of dependencies: ____________? i: R2 R0 + R1 j: R3 R0 * R2 k: R5 R2 – R3 l: R2 R6 – R7. i: R2 R0 + R1 j: R3 R0 * R2 k: R5 R2 – R3
E N D
Problem 1 1. Identify data dependencies in the code segment below. # of dependencies: ____________? i:R2 R0 + R1 j: R3 R0 * R2 k: R5 R2 – R3 l: R2 R6 – R7
i: R2 R0 + R1 j: R3 R0 * R2 k: R5 R2 – R3 l: R2 R6 – R7
i: R2 R0 + R1 j: R3 R0 * R2 k: R5 R2 – R3 l: R2 R6 – R7
i: R2 R0 + R1 j: R3 R0 * R2 k: R5 R2 – R3 l: R2 R6 – R7
i: R2 R0 + R1 j: R3 R0 * R2 k: R5 R2 – R3 l: R2 R6 – R7
i: R2 R0 + R1 j: R3 R0 * R2 k: R5 R2 – R3 l: R2 R6 – R7
i: R2 R0 + R1 j: R3 R0 * R2 k: R5 R2 – R3 l: R2 R6 – R7
Problem 2 2. For the given sequence of instructions, fill the table below with the pipeline stages for each instruction. The first row is already filled for you. Assuming no memory latency, how many cycles does it take to execute his piece of code?
Problem 3 2. Repeat problem 2 but with some independent instruction inserted to reduce stalls.