2018年1月11日 星期四

Cache Memory

Cache Memory: 在Harvard CPU 架構分為Data/ instruction Cache 。Cache Memory 就是Fast SRAM+LRU circuit ! LRU是Least Recently Used的縮寫. 其FAST SRAM工作頻率與CPU同步。CPU如何知道Data是否在cache中,並且正確的從cache抓出想要的資料?
目前用的方法由Tag紀錄該cache所紀錄的資料並標示資料有效,當cache fill up時,依序first in & least recently used block就把least recently block 替換。早期在開發CPU也遇到因cache memory access time unsatisfied CPU maximum frequency 造成某些Application 產生exception error。
Intel 也宣佈其最新intel® Nervana™ Neural Network Processor family採用Deep learning 來manage cache 來提升Hit rate。
問一個簡單問題:
一個8位元的系統,其Address mapping 為16bit address,其Cache 採用Direct mapping, 每個block 為8位元,cache index 為4bits,試問實際上會需要多大的cache(e.g., for the data array, tags, etc.)?
Hint: tag bits = address bit length - exponent of index - exponent of offset


沒有留言:

精選文章

Active Cooler/Warner system with thermoelectric cooler

Cooler 系統包括了 DC/DC Converter, 與主機通界面 , 感测線路 , 風量葉片 ,DC Motor 等 , 控制器感测線路的回饋資料供 PID 運算出最佳控制模式。在系統軟件架構上主要包括四種類型的軟體規劃,分別是資料庫系統 (Database) 、 ...