CMPUT429 Midterm: CMPUT 429 UofA Exams CMPUT429 04Mmmacgr

54 views3 pages

Document Summary

Suppose you wanted to include a new instruction, addm, to the simple five-stage. This instruction is similar to add except that it accesses memory directly. Explain how you would modify the pipeline to allow this instruction. You may add one or more stages if you feel it is necessary: assume the instruction cycle times in the table below. Also, suppose that for the benchmark of interest each instruction type makes up 10% of the total instruction count. It is fine to leave your answer in the form of a fraction (e. g. 5 / 2. 5) 5: when run on a given system, a program takes 1,000,000 cycles. If the system achieves a cpi of 40, how many instructions were executed when running the program: rewrite the following program fragment to take advantage of register plus immediate. Assume that no register values are used outside of the program fragment and that the code fragment will execute on a load-store processor.