[問題] 98交大計組第三題

看板Grad-ProbAsk作者 (好恐怖)時間16年前 (2009/03/18 13:44), 編輯推噓1(104)
留言5則, 2人參與, 最新討論串1/1
Atwo-way set associative cache with 2-word blocks and a total size of 16 words. (using LRU replacement) 假設 word address : 16 binary address: 010000 則 他的 block address 為多少? tag 跟 index 又是幾bit呢??? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.211.12.224

03/18 13:48, , 1F
1 bit offset in block,block address = 01000
03/18 13:48, 1F

03/18 13:48, , 2F
16 words → 8 blocks → 4 set,所以index為2 bit
03/18 13:48, 2F

03/18 13:48, , 3F
block offset 1 bit,block address 0100,index 00,tag 01
03/18 13:48, 3F

03/18 13:49, , 4F
5 bit address減掉index 2 bit,所以3 bit tag
03/18 13:49, 4F

03/18 13:49, , 5F
打錯,block address 01000,index 00, tag 010
03/18 13:49, 5F
文章代碼(AID): #19m8f9_8 (Grad-ProbAsk)