看板 Grad-ProbAsk 關於我們 聯絡資訊
題目如下 Cache1:direct-mapped with one word block Cache2:direct-mapped with four word block Cache3:two-way set associated with two block and use LRU assuming that each cache has a total data size of 16 32-bit words and all of them are initially empty. 20 bit word address used. a.以上三個cache的TAG大小 張凡答案給 cache 1: 16 bits (20-4 = 16) 為什麼不用考慮 Byte Offset? 我的算法是 因為Direct mapped 所以 在cache1的情況下 有 16個block 每個block 有4 byte 所以 offset = 2 bit (Word Offset =0 , Byte Offset=2) 又因為cache只有16 block 且是Direct Mapped方法 所以index = 4 bit 所以 Tag = 20 - 4 - 2 = 14 bits 我和朋友 都卡在這 是題目看錯?  請大神CARRY  QQ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.186.247 ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1453094161.A.B1D.html
f1256421: 因為是用word為單位 01/18 13:25
a37805: word address喔 看清楚 01/19 00:13