作者jim055006 (jim)
看板Grad-ProbAsk
標題[理工] [計組] 管線前饋
時間Tue Oct 4 21:13:39 2011
問題如下:
If we have a program of 10^4 instructions in the sequence of "lw, add,
lw, add, .." The add instruction depends (and only depends) on the lw
instruction right before it. The lw instruction also depends (and only
depends) on the add instruction right before it. If the program is
executed on the above 5-stage pipelined datapath:
(1)With forwarding, what would be the actual CPI?
(2)Without forwarding, what would be the actual CPI?
With forwarding:
我知道lw跟add之間要用1個stall+Forward解決
add跟lw之間只要用Forward解決
但是只知道這樣要如何計算CPI呢?
請各位大大指點一下.....鋼溫!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 223.143.226.251
推 mqazz1:(1)1.5 (2)3 10/04 21:55
→ jim055006:請問M大是要如何去算呢?? 10/05 22:10
推 Edmundpu:(1)10000+5000/10000 10/05 23:05
→ Edmundpu:(2)因為沒有forwarding lw 2 add 2 lw 2 add .... 10/05 23:06
→ Edmundpu:2 是插入 NOP 個數 10/05 23:07
→ jim055006:喔喔~~~太清楚了....感謝E大.... 10/06 20:41