作者fmtshk (fmtshk)
看板Grad-ProbAsk
标题[理工] 计组_关於cache计算
时间Wed Oct 9 00:46:00 2019
https://i.imgur.com/CHurZm1.jpg
请问这题cache的tag跟index的计算
https://i.imgur.com/oj2rqZL.jpg
对照前面的练习,这题的32KB(2^13words)是可存资料量? 32byte(4words)是block size?
所以拿2^13除以2^2得到index是11bits? 以上是我随便了算的
那个cacheable address space 的 4GB 要怎麽使用?
不是很了解cacheable address space是影响哪部份?
对memory的观念极差,求大佬解释
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 39.12.101.82 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Grad-ProbAsk/M.1570553162.A.F29.html
※ 编辑: fmtshk (39.12.101.82 台湾), 10/09/2019 01:11:54
1F:→ DLHZ: 没看过line size这说法但我猜应该是指block 10/09 01:16
2F:→ DLHZ: cache共2^15 byte 且每个有2^5 byte 大 可知共2^10个 cache 10/09 01:20
3F:→ DLHZ: 所以index需要10bit 10/09 01:20
5F:→ DLHZ: 我不太清楚你说的使用是什麽意思 10/09 01:23
6F:→ fmtshk: 就是cacheable address space 4GB时Tag是17bit, 而1GB时T 10/09 01:33
7F:→ fmtshk: ag是10bit,这部份不太懂 10/09 01:33
8F:→ DLHZ: 是15喔 10/09 01:44
9F:→ DLHZ: 你再看一下选项 10/09 01:45
10F:→ fmtshk: 喔对,看错个>< 10/09 01:51
11F:→ fmtshk: 刚有听别人说cacheable address space 4GB 指的就是记忆 10/09 01:56
12F:→ fmtshk: 体位址为32位元 10/09 01:56
13F:→ fmtshk: 那麽就是说,(1)的tag17是(32-10-5)算来的? 请问5的部份 10/09 01:59
14F:→ fmtshk: 要怎麽看? 10/09 01:59
15F:→ ekids1234: 1G = 30位元 -> 30-10-5 = 15 10/09 02:01
16F:推 zuchang: 5就是lg(一个data block的bytes数) 所以5=lg(32) 10/09 11:43
17F:→ fmtshk: 懂了,感谢各位大佬教学 10/09 12:00