Lec10a - COMP 4300 Computer Architecture Instruction-level...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 COMP 4300 Computer Architecture Instruction-level parallelism: Introduction Dr. Xiao Qin Auburn University http://www.eng.auburn.edu/~xqin xqin@auburn.edu Fall, 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Class Exercise Consider the following code segment 1. LW R1, 0(R4) 2. LW R2, 0(R5) 3. ADD R3, R1, R2 4. BNZ R3, L 5. LW R4, 100(R1) 6. LW R5, 100(R2) 7. SUB R3, R4, R5 8. L: SW R3, 50(R1) Assuming that there is no forwarding, zero testing is being resolved during ID , and registers can be written in the first of the WB cycle and also be read in the send half of the same WB cycle, Question: identify the resources of various hazards in the above code sequence.
Background image of page 2
3 Class Exercise Consider the following code segment 1. LW R1, 0(R4) 2. LW R2, 0(R5) 3. ADD R3, R1, R2 4. BNZ R3, L 5. LW R4, 100(R1) 6. LW R5, 100(R2) 7. SUB R3, R4, R5 8. L: SW R3, 50(R1) Assuming that there is no forwarding, zero testing is being resolved during ID , and registers can be written in the first of the WB cycle and also be read in the send half of the same WB cycle, Question: identify the resources of various hazards in the above code sequence.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Class Exercise Consider the following code segment 1. LW R1, 0(R4) 2. LW R2, 0(R5) 3. ADD R3, R1, R2 4. BNZ R3, L 5. LW R4, 100(R6) 6. LW R5, 200(R6) 7. SUB R3, R4, R5 8. L: SW R3, 50(R1) Use compiler techniques to reshuffle/rewrite the code (without changing the meaning of the program) as to minimize data hazards as far as possible. Assume that no other general purpose registers other than those used in the code, are available.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/07/2011 for the course COMP 3400 taught by Professor Staff during the Fall '10 term at Auburn University.

Page1 / 17

Lec10a - COMP 4300 Computer Architecture Instruction-level...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online