[理工] 計組 判斷hazard

看板Grad-ProbAsk作者 (古月小楓)時間14年前 (2011/11/03 12:11), 編輯推噓1(105)
留言6則, 5人參與, 最新討論串1/1
Given a MIPS instruction sequence shown below. Assume the code is executed on a five-stage (IF,ID,EXE,MEM,WB) pipelined MIPS CPU with the capability to finish the register write in the first half cycle and the register reads in the second half cycle 1.sll $t1, $s1,2 2.add $t1, $s2,$t1 3.lw $s3, 100($t1) 4.addi $s3, $s3,1 5.add $zero, $s4,$s3 6.slt $t2 $s3,$zero 7.bne $t2, $zero,L2 ---------------------------------- 我想問 (1.2)有data hazard , 為什麼(1,3)沒有? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.223.252.31

11/03 12:24, , 1F
因為有(2,3)
11/03 12:24, 1F

11/03 13:18, , 2F
推樓上
11/03 13:18, 2F

11/03 14:49, , 3F
一樓的意思是 只要後面的有hazard 以靠近最近指令的hazard
11/03 14:49, 3F

11/03 14:49, , 4F
為主嗎?
11/03 14:49, 4F

11/03 17:51, , 5F
YES
11/03 17:51, 5F

11/03 22:04, , 6F
感謝^^~
11/03 22:04, 6F
文章代碼(AID): #1EiXH_db (Grad-ProbAsk)