{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Assn9Soln

# Assn9Soln - forwarding The data dependency between the load...

This preview shows pages 1–3. Sign up to view the full content.

CDA 3101 Assignment 9 Due in class on Thursday, Dec. 7, 11:00 am Turn hardcopy, stapled, with your name and “CDA 3101 Assignment 9” clearly written on it to the TA (Fei Xu) in CSE E309 between 10:00 and 11:00 am on Dec. 7. You can submit it earlier (either in class on Dec. 5 or slip it under my office door (CSE E508) if you like. 1. Problem 6.1 from the textbook a. Shortening the ALU operation will not affect the speedup obtained from pipelining. It would not affect the clock cycle. b. If the ALU operation takes 25% more time, it becomes the bottleneck in the pipeline. The clock cycle needs to be 250 ps. The speedup would be 20% less. 2. Problem 6.3 from the textbook See the following figure: 3. Problem 6.4 from the textbook There is a data dependency through \$3 between the first instruction and each subsequent instruction. There is a data dependency through \$6 between the lw instruction and the last instruction. For a five-stage pipeline, the data dependencies between the first instruction and each subsequent instruction can be resolved by using

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: forwarding. The data dependency between the load and the last add instruction cannot be resolved by using forwarding and we need a stall. 4. Problem 6.21 from the textbook a. There will be a bubble of 1 cycle between a lw and the dependent add since the load value is available after the MEM stage. There is no bubble between an add and the dependent lw since the add result is available after the EX stage and it can be forwarded to the EX stage for the dependent lw. Therefore, CPI = cycle/instruction = 1.5. b. Without forwarding, the value being written into a register can only be read in the next cycle. As a result, there will be a bubble of 2 cycles between an lw and the dependent add since the load value is written to the register after the MEM stage. Similarly, there will be a bubble of 2 cycles between an add and the dependent lw . Therefore, CPI=3. 5. Problem 6.22 from the textbook It will take 8 cycles to execute this code, including a bubble of 1 cycle due to the dependency between the lw and sub instructions....
View Full Document

{[ snackBarMessage ]}

### Page1 / 3

Assn9Soln - forwarding The data dependency between the load...

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

View Full Document
Ask a homework question - tutors are online