[問題] 97中正電機計組

看板Grad-ProbAsk作者 (darvishyu)時間17年前 (2009/03/24 12:04), 編輯推噓3(301)
留言4則, 2人參與, 最新討論串1/1
2.Consider a program with the fpllowing instruction mix: instruction type frequency Load 25% Store 15% Branch 20% ALU 40% suppose any miss will cause a stall, please compute the CPI of this program running on a pipelined machine with no instruction cache misses, no hazards, a 98% data cache hit rate, and a miss penalty of 50 clock cycles. no instruction cache misses,no hazards 這樣CPI是多少?1嗎? data cache miss rate=2% CPI=1+0.02*(0.25+0.15)*50=1.4 有錯請指正 4.Suppose a machine uses 32-bit physical address If we consider a 2 way set-associative cache with 10 bit cache index and 32-byte cache blocks. please calculate: (a)The number of blocks in the cache. (b)The size of the block offset. (c)The size of the tag. 我的答案是 tag=17 bit index=10 bit block offset=5 bit (a)2048 (b)2048* 5 bit=10240 bit (c)2048*17 bit=34816 bit 有錯請指正 謝謝 另外 有第五題的答案嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.175.169.105 ※ 編輯: darvishyu56 來自: 218.175.169.105 (03/24 12:08)

03/24 22:41, , 1F
我寫block offset=3bit tag=17bit index=10bit
03/24 22:41, 1F

03/24 22:41, , 2F
不知對不對...
03/24 22:41, 2F

03/24 22:47, , 3F
abstraction layer 那題是什麼?
03/24 22:47, 3F

03/26 23:12, , 4F
totalCPI = baseCPI + memory-stall cycle per inst.
03/26 23:12, 4F
文章代碼(AID): #19o5l0Se (Grad-ProbAsk)