作者Aa841018 (andrew)
看板Grad-ProbAsk
標題[理工] 計組 byte offset定義!
時間Thu Dec 27 17:44:05 2018
https://i.imgur.com/sE3N47J.jpg
感覺好矛盾,出現(每個區塊X word)時,就沒問題,當出現per block就會有錯,像這
張圖,32 byte per block 32=2^5,offset應該是5吧?結果是2
https://i.imgur.com/LyrP28W.jpg
然後這張標準又變,offset=4
2^4 byte*8=128 bits來算完全沒問題………
明明offset要表達的是一個block有幾個byte,而byte per.block就是這個意思,為何有
時就是會錯啊??
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 39.9.108.81
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1545903847.A.A67.html
※ 編輯: Aa841018 (39.9.108.81), 12/27/2018 17:44:56
推 w199381: Byte offset 固定是2 offset 是包含word byte數加上byte 12/27 18:30
→ w199381: offset 12/27 18:30
→ gama79530: addressing-length-of-index-block-offset-byte-offset 12/27 18:33
→ gama79530: -tag 12/27 18:33
推 w199381: 所以你第二張圖中 a的offset數為4 = 2 + 2 意即 這cache 12/27 18:33
→ w199381: 的一個block 大小為 2^2的 words 而 4words 又等於2^4 b 12/27 18:33
→ w199381: ytes 也就是16 bytes 12/27 18:33
→ Aa841018: 哦!謝謝解釋,我還以為byte offset=offset..... 12/27 19:08