Main / CoursesAASampleMidterm
Engr 851 - Sample Midterm Questions
- List three pros and cons for VLIW and three pros and cons for Superscalar architectures and briefly explain your reasoning.
- List three use cases where VLIW would be more suitable than Superscalar.
- List three use cases where Superscalar would be more suitable than VLIW.
- Consider the set of instructions below to be executed on our standard 5 stage pipeline (F, D, E, M, W):
R1 = M[1000]; // LOAD R1 from memory location 1000.
R2 = M[1001];
R3 = R1 + R2;
R2 = R5 / 2;
R4 = R3 + R2;
R6 = M[2000];
R6 = R6 + R4;
M[2000] = R6; // Store R6 to memory location 2000.- Assuming no fancy processor abilities (no data forwarding within the pipeline, out of order execution, etc), how many clock cycles does this code take? Assume every instruction takes 5 clock cycles while LOAD and STORE operations take an additional 4 clock cycles in the memory state (9 cycles total).
- Assuming still a single pipeline but with superscalar, out-of-order execution, rewrite the code above that would result in the fastest execution on this processor. How many clock cycles does it take?
- Rewrite the code assuming your processor can handle VLIW with up to 3 parallel instruction issues.
- How many clock cycles does the new processor take to execute the VLIW code?
- Will register renaming help to speed things up here (for the basic case)? Explain your answer.
- Will register renaming help to speed things up in the superscalar case? Explain.
- Using a simple example, illustrate how branch prediction can improve performance. Note that you must first describe what your branch predictor is doing.
- Can you come up with an example where your branch predictor will hurt performance? Explain.