[理工] [計組]-計憶體管理
題目:A set-assocative has a block size of four 32-bit words and a set size
of 2. The cache can accommodate a total of 128K Bytes from main memory.
The main memory size that is cacheable 4M * 32bits.
(1) Design and draw the block diagram of the cache structure.
高銘書上的解答:
2
1 block = 4 * 32bit = 4 word = 2 word
128k Byte 13
cache block 數 = ---------- = 2 block
4 word
13
2
set 數 = -------- = 4096 set
2
------------------------------
M.M 位址: | TAG | SET | WORD |
------------------------------
\ 8bit / \ 12bit /\ 2bit /
以下省略(圖的部份)
---------------------------------------------------------------------------
問題:
想問一下就是它這題是用word來當block的單位,
那假如我現在用bytes來當block的單位這樣可以嗎??
也就是offset= 4 bit, set仍是12 bit
TAG變成 24 bit (4M*32bit = 2 ^ 24 byte) - 4bit - 12bit
= 8 bit
感謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.134.213.201
推
10/11 02:03, , 1F
10/11 02:03, 1F
→
10/11 14:02, , 2F
10/11 14:02, 2F
→
10/11 14:03, , 3F
10/11 14:03, 3F