作者Lautreamont (Maldoror is dead)
看板Grad-ProbAsk
標題[理工] [計組]管線危障的偵測
時間Sat Feb 6 21:59:14 2010
97年交大資工計組的選擇題
A code sequence is
/ add $4, $1, $3 / or $12, $5, $4 / and $13, $4, $6 /
The data hazard of /or/ can be checked by
(a) EX/MEM.RegisterRd = ID/EX.RegisterRs
(b) EX/MEM.RegisterRd = ID/EX.RegisterRt
(c) MEM/WB.RegisterRd = ID/EX.RegisterRs
(d) MEM/WB.RegisterRd = ID/EX.RegisterRt
我選(b),答案是(c)。
我的想法如下:
題目問/or/的hazard detection,因為/or/與前面的/add/有data hazard($4)
/add/指令在EXE stage時,ALUOut輸出為$4
/or/在ID stage時,Rt為$4
所以應該是從EX/MEM的Rd比較ID/EX的Rt
答案是從MEM/WB比較令我不解
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.160.184.117
→ ianwuzack:是b對呀 02/06 22:17
推 opcan:b吧 02/06 22:26
推 allenbody:ANS:(B),下一題and才是(C) 02/06 22:28
→ Lautreamont:thanx 去Y拍買的解答果然很多錯 02/06 23:42