Re: [理工] [計組]90成大電機算CPI
第一個算式
perfect CPI = 2
加上 load指令有一半會發生load-use data hazards
所以要多stall 1個cycle
第二個算式
load指令有一半會遇到hazards所以這些指令需要3個cycle
加上其他的指令(1-0.2*0.5)=0.9需要2cycle
個人認為第一個算法比較容易理解
題目中的"half of the time"當然就是指load有一半會發生hazard囉!
※ 引述《Croast (夢奇奇)》之銘言:
: 題目如下:
: Suppose that 20% of the instruction are loads,
: and half of the time the instruction following a load instruction depends on
: the result of the load, If this hazard creates a single-cycle delay
: CPI without stall是2
: 其中CPI with stall=2 + 20%*50%*1 = 2.1
: 不過我在另一個地方看到的算式
: CPI with stall=0.2*0.5*3 + 0.9*2 = 2.1
: 想請教一下這兩種算法該怎麼分別去解釋?
: 以及題目中的"half of the time"是指所有load指令有一半會發生危障嗎?
: 還是另有所指呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.77.45.92
※ 編輯: TNC 來自: 203.77.45.92 (11/15 19:46)
推
11/16 10:53, , 1F
11/16 10:53, 1F
→
11/16 13:37, , 2F
11/16 13:37, 2F
→
11/16 13:38, , 3F
11/16 13:38, 3F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):