This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full 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
This note was uploaded on 12/02/2009 for the course CDA 3101 taught by Professor Small during the Spring '08 term at University of Florida.
- Spring '08