[理工] [計組] Data hazard
LD AX,M[100] ;AX←M[100]
ADD AX,BX ;AX←AX+BX => AX發生RAW, WAW
MOV CX, 1 ;CX←1
ST M[100], AX ;M[100] ← AX => AX發生RAW; M[100]發生WAR
ST M[200], BX ;M[200] ← BX
ADD CX,M[200] ;CX←CX+M[200] => CX發生RAW, WAW;M[200]發生RAW
Suppose the code segment is executed on a pipeline with five
stages: instruction fetch, operand fetch, memory read (assuming no
need to calculate the effective address), ALU operation, and write
back. Hardware will detect any hazard and stall the affected
instruction. Draw a space time diagram to show how the code
segment is executed through this pipeline.
答案在上面 但看不太懂WAW以及WAR的狀況.. 有高手可以解釋一下嗎..
BTW,我知道WAW和WAR的解釋 但在這題上我完全看不懂 = =
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.70.89.179
→
11/09 21:37, , 1F
11/09 21:37, 1F
→
11/09 21:39, , 2F
11/09 21:39, 2F
→
11/10 00:19, , 3F
11/10 00:19, 3F
→
11/10 00:19, , 4F
11/10 00:19, 4F
→
11/10 00:21, , 5F
11/10 00:21, 5F
→
11/10 00:22, , 6F
11/10 00:22, 6F
→
11/10 02:31, , 7F
11/10 02:31, 7F
→
11/10 02:31, , 8F
11/10 02:31, 8F
推
11/10 02:33, , 9F
11/10 02:33, 9F
→
11/10 02:35, , 10F
11/10 02:35, 10F
→
11/10 02:35, , 11F
11/10 02:35, 11F
推
11/10 02:36, , 12F
11/10 02:36, 12F
→
11/10 02:38, , 13F
11/10 02:38, 13F
→
11/10 02:40, , 14F
11/10 02:40, 14F
推
11/10 02:41, , 15F
11/10 02:41, 15F
→
11/10 02:44, , 16F
11/10 02:44, 16F
→
11/10 02:47, , 17F
11/10 02:47, 17F
→
11/10 02:49, , 18F
11/10 02:49, 18F
→
11/10 02:49, , 19F
11/10 02:49, 19F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):