[理工] 計組 cache size

看板Grad-ProbAsk作者 (古月小楓)時間14年前 (2012/01/12 00:57), 編輯推噓4(401)
留言5則, 4人參與, 最新討論串1/1
For a 32- bit address, determine the total number of bits (including the tag bits ,data , dirty bits ) to implement a 2-way set associative cache with 128 KB of data and 2-word(64bits) <anwser > (張凡) (1 + 1 + 16 + 64) * 2 * 16 K ^^^^^^<--- why? 我算的答案是 (1 + 1 + 16 + 64 ) * 2 * 8 K 算了好久 都不對 = = 麻煩了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.41.132.85

01/12 01:21, , 1F
2-word=8byte=2^3byte 17-3=14 , 2^14=16k
01/12 01:21, 1F
不好意思 我還是不太懂~ 張凡答案如下 Two-word block -> 3 bits of offset field Number of set = 128KB / (8B * 2) = 8K -> Index field has 14 bits ^^^^^ 我是覺得寫錯..我算13 Bits of tag field = 32 - 13 - 3 = 16 Cache bits = (1 + 1 + 16 +64 ) * 2 * 16k ^^^^^^^^ 不是2-way * number of set 嗎? 那為什麼不是2 * 8 K ※ 編輯: SiriusCloud 來自: 114.41.132.85 (01/12 01:41)

01/12 01:48, , 2F
我覺得答案寫錯了 他只有16K個block
01/12 01:48, 2F

01/12 01:50, , 3F
幹我好像錯了 我去撞牆QQ
01/12 01:50, 3F

01/12 01:59, , 4F
這題答案錯 是2 * 8K 才對 張凡上課有改
01/12 01:59, 4F

01/12 02:47, , 5F
原來是答案錯了 我還一直算 一直算><''
01/12 02:47, 5F
文章代碼(AID): #1F3RzpMw (Grad-ProbAsk)