2-way set associative cache of 8K bytes data
The block size is 2 words with 4 bytes in each word. Assume that the total
cacheable physical memory is 16MB bytes.
( 16MB )
請問index bit數 不是 lg(---------) = 10嗎?
( 2 * 8KB )
可是書上說是9 bit 請問這要怎麼算?
張凡下冊283頁 50題(1)
=============================================
(1) a direct-mapped cache with 16 one-word blocks
(2) a dircet-mapped cahce with 4 four-word blocks
(3) a four-way set associative cache with block size of one-word
(1) (2) (3)
Decimal Binary Tag Index Tag Index Tag Index
2 00010 0 0010 0 00 000 10
3 00011 0 0011 0 00 000 11
4 00100 0 0100 0 01 001 00
16 10000 1 0000 1 00 100 00
18 10010 1 0010 1 00 100 10
我大概知道是照binary去切割的
可是不太清楚這三種方法切割的規則
請問這個要怎麼算?
張凡下冊291頁
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.166.118.144