【发布时间】:2021-09-17 00:51:54
【问题描述】:
我正在为明天到期的计算机体系结构考试而学习,并且一直在练习有关标记大小和缓存位总数的练习。问题来了:
Question 8:
This question deals with main and cache memory only.
Address size: 32 bits
Block size: 128 items
Item size: 8 bits
Cache Layout: 6 way set associative
Cache Size: 192 KB (data only)
Write Policy: Write Back
Answer: The tag size is 17 bits. The total number of cache bits is 1602048.
我知道这是一个失败的直接练习,但我似乎缺乏正确的公式。我也知道N组关联的结构是|TAG 25 bits|SET 2 bits|OFFSET 5 bits|。并且该标签大小 = AddrSize - Set - Offset(- 项目大小,如果有的话)从而给出 17 位标签大小的答案。
但是,请问如何计算缓存的总位数?
【问题讨论】:
标签: caching cpu-architecture cpu-cache