看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《lovefo (lovefo)》之銘言: : Give a MIPS machine with 2-way set associative cache that 2-word blocks : and a total size of 32 words.Assume that the cache is initially empty, : and that it uses an LRU replacement policy.Given the following memory : accesses in swquence: : 0ff00f70 : 0ff00f60 : 0fe0012c : 0ff00f5c : 0fe0012c : 0fe001e8 : 0f000f64 : 0f000144 : 0fe00204 : 0ff00f74 : 0f000f64 : 0f000128 : (a)Please label whether they will be hits or misses. : (b)please calculate the hit rate. : 這題是96年台科大電子考古題 : 平常考題都是給十進制的 word address : 這題是給 十六進制的 難道除了..把他轉成十進制 的方法外 : 沒有其他比較快速的方法嗎? 有沒有人會這一題 ... 剛剛有算到這一題 但不知從何下手 麻煩大大解題 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.46.170.33
assassin88:這題其實很簡單 你把題目資訊給的資料求出後 01/21 23:00
assassin88:依照 tag index 的 bit 數分割,你就會做了。 01/21 23:01
MilkerMdot:基本上算出index offset的數量 其他就是tag用來比較 01/22 00:08
MilkerMdot:資料是不是你所要的 所以這題只需要把後面兩個16進位 01/22 00:09
MilkerMdot:換成2進位 其他的就比較tag看看有沒有hit or miss 01/22 00:10