[理工] 計組 cache size
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
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
01/12 01:48, 2F
推
01/12 01:50, , 3F
01/12 01:50, 3F
推
01/12 01:59, , 4F
01/12 01:59, 4F
→
01/12 02:47, , 5F
01/12 02:47, 5F