Re: [理工] [計組]-效能

看板Grad-ProbAsk作者 (123)時間14年前 (2009/09/19 23:33), 編輯推噓1(1010)
留言11則, 3人參與, 最新討論串2/9 (看更多)
※ 引述《gn00618777 (123)》之銘言: : A certain machine with a 10ns(10*10^9s) clock period can : perform jump(1 cycle),branches(3 cycles),arithmetic intruction(2 cycles) : multiply intructions(5 cycles),and memory intruction(4 cycles). : A certain program has 10% jumps, 10% branches,50% arithmetic,10% : multiply. and 20% memory intructions. : What is the CPI of this program on this machine? : Q: A 5-cycle multiply-add instruction is implemented that combines an arithmetic and multiply instruction. 50% of the multiplies can be turned into multiply-adds. what is the new CPI? 感覺解答是錯的,想請教各位 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.168.60.249

09/19 23:56, , 1F
combine比率是一樣,拿multiply的一半去組成新的multiply-add
09/19 23:56, 1F

09/20 00:21, , 2F
我是把multiply 5%*原來的10%所以 multiply剩下5
09/20 00:21, 2F

09/20 00:22, , 3F
打錯 是50%*原來的10% multiply剩下5
09/20 00:22, 3F

09/20 00:22, , 4F
可是另一個arithmetic要抽多少和到 multiply-adds呢?
09/20 00:22, 4F

09/20 00:30, , 5F
multiplier 0.1-0.1*0.5=0.05
09/20 00:30, 5F

09/20 00:31, , 6F
arithmatic 0.5-0.1*0.5=0.45
09/20 00:31, 6F

09/20 00:31, , 7F
multiply-adds 就是0.1*0.5=0.05了
09/20 00:31, 7F

09/20 00:47, , 8F
可是解答multiply add 佔有率怎麼才5% 都已經各取5了
09/20 00:47, 8F

09/20 00:47, , 9F
應該為10%阿
09/20 00:47, 9F

09/20 01:41, , 10F
因為題目也沒說,所以你這的想法(mix)跟推文一種全新的指令
09/20 01:41, 10F

09/20 01:41, , 11F
其實都是可以的
09/20 01:41, 11F
文章代碼(AID): #1AjFcvrd (Grad-ProbAsk)
討論串 (同標題文章)
文章代碼(AID): #1AjFcvrd (Grad-ProbAsk)