Q3: Consider the following short program executing on a simple 5-stage pipeline
ID: 3596397 • Letter: Q
Question
Q3: Consider the following short program executing on a simple 5-stage pipeline (Fetch, Decode, Execute, Memory, Writeback) add St3, Sto, $t2 sw t2, 12(Sti) move St4, $t3 sub t4, $t3, St2 sll t5, $t2, 2 sw St5, 16(St1) Assume the registers are already initialized with some value. Identify all the data dependencies in the code given above. Ans St3 in instruction3 and instruction1 $t3 in instruction4 and instruction1 St4 in instruction4 and instruction3 St5 in instruction6 and instruction5 Only write the dependencies related to RAW, WAW and WAR.Explanation / Answer
RAW: t3 in instruction 4 and instruction 1
WAW: t5 in instruction 6 and instruction 5
t4 in instruction 4 and instruction 3
WAR: t3 in instruction 3 and instruction 1
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.