[理工] 計組 MIPS、Extime 的問題

看板Grad-ProbAsk作者 (小李子)時間10年前 (2014/02/10 21:06), 編輯推噓5(5012)
留言17則, 5人參與, 最新討論串1/1
題目: Two implementations of a machine are one with and one without special floating-point hardware. Both machine have a clock rate of 1000 M HZ. Promgram mix of operations in following. floating-point multiply 10% floating-point add 20% floating-point divide 5% integer instructions 65% Machine with floating-point called A requires the following number of clock cycles for each instruction. floating-point multiply 7 floating-point add 5 floating-point divide 20 integer instructions 2 Machine without floating-point called B must the emulate the floating-point operations using integer instructions. The integer instructions all take 2 clock cycles. Other floating-point operations require the following number of integer instructions. floating-point multiply 40 floating-point add 20 floating-point divide 50 Q:If machine A needs 300 million instructions for this program , MIPS A is 250, MIPS B is 500, what is the execution time for this program run on machine A and B ? 不好意思題目有點長,可以請板上大大替我求解嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 112.104.88.196

02/10 21:41, , 1F
不確定我的想法對不對 我直接拿300 /250 ,300/500
02/10 21:41, 1F

02/10 21:44, , 2F
阿 machineA上的300百萬條instr可能在machineB上不一樣
02/10 21:44, 2F

02/10 21:51, , 3F
我算A花1.2 B花6.69 不太確定 等高手解@@
02/10 21:51, 3F

02/10 22:30, , 4F
題目有點一堆廢話 公式套一套就好了 都給MIPS了
02/10 22:30, 4F

02/10 22:36, , 5F
我只會算A的執行時間,能幫幫我嗎? 謝謝
02/10 22:36, 5F

02/10 22:48, , 6F
題目沒講MB的IC是多少 不失一般性應該是跟A跑一樣 所以
02/10 22:48, 6F

02/10 22:48, , 7F
是0.6題目給的資訊 可以算出CPIA=4 CPIB=2應該沒怎差別
02/10 22:48, 7F

02/10 22:53, , 8F
可是MB不是用模擬的指令下去跑,正常來說時間不是應該
02/10 22:53, 8F

02/10 22:54, , 9F
比較久嗎? MA花1.2s,MB不是要比1.2s還大嘛?@@
02/10 22:54, 9F

02/11 00:09, , 10F
覺得題目長給混淆 用MIPS 算 CPIA 跟 CPIB 跟 KI大一樣
02/11 00:09, 10F

02/11 00:10, , 11F
所以 MA 1.2 MB 0.6
02/11 00:10, 11F

02/11 00:27, , 12F
為什麼Machine B 的IC數 和 Machine A 一樣呢?
02/11 00:27, 12F

02/11 00:34, , 13F
想知道bz大 MB花6.69是怎麼算的@@
02/11 00:34, 13F

02/11 00:50, , 14F
300million 各有10% 20% 30%是float的乘加除 放到B上
02/11 00:50, 14F

02/11 00:51, , 15F
在用int模擬的40 20 50去乘加上65%的原本int得B之IC
02/11 00:51, 15F

02/11 00:52, , 16F
在推exetime 不太確定
02/11 00:52, 16F

02/11 01:11, , 17F
了解,我覺得你的答案好像比較合理
02/11 01:11, 17F
文章代碼(AID): #1I-Cx2Q- (Grad-ProbAsk)