计算机体系结构6_缓存结构
来源:互联网 发布:ppt图表如何显示数据 编辑:程序博客网 时间:2024/05/01 15:04
一,缓存结构
下图为一个n-way set-associative cache 结构图:
缓存组织为cache line数组的形式,每一个cache line由三部分组成,内存数据,tag,其他信息。
多个cache line一行,组成一个set,一列cache line为way,在n-way set-associative cache中,每个set由n个cache line
组成,例如一个4-way set-associative cache,每个set由4个cache line组成,每个way一个cache line。
二,缓存索引
通过物理地址获取数据或指令在缓存中的位置(set, way, byte),每个物理地址被分为三部分:
Index,选择缓存的行(set),同一行中的所有cache line通过index域选择。
tag,选择一行(set)中特定的cache line,物理地址的tag域与每个cache line的tag域进行比较,如果匹配,则发出cache hit信号
,选择此cache line,否则发出cache miss信号。
offset,物理地址在cache line中的第一个byte,数据或指令从此byte的位置读取。
三,fully associative cache、direct-mapped scheme和set-associative scheme
direct mapped, if each entry in main memory can go in just one place in the cache, the cache is .
fully associative, If the replacement policy is free to choose any entry in the cache to hold the copy.
N-way set associative, Many caches implement a compromise in which each entry in main memory can go to any one of N places in the cache.
因此2-way set associative意味着,主存中的任意一个entry在缓存中有两个可以保存的位置。
参考:
AMD64 Architecture Programmer’s Manual Volume 2: System Programming
- 计算机体系结构6_缓存结构
- 计算机体系结构4_分级缓存
- 计算机体系结构5_缓存一致性协议
- 计算机体系结构7_缓存控制机制
- 016_计算机体系结构一
- [我要考试]计算机体系结构_威斯康星_博士资格考试_Spring1988_Q1_栈结构
- 计算机体系结构1_内存类型
- 数字集成电路设计-6-计算机体系结构
- 计算机体系结构
- 计算机体系结构
- 计算机体系结构
- 计算机体系结构
- 计算机体系结构
- 计算机体系结构
- 计算机体系结构
- 计算机体系结构
- 计算机体系结构
- 计算机体系结构
- light oj 1147 背包dp+状态压缩 好题
- 写给那些在技术路上奔跑的人们!!!!!
- (一)main函数的argc、argv实现本质
- 武冈西宁岑溪枣阳晋中许昌1383828871123
- 临江铜陵河池铁岭1383829005812
- 计算机体系结构6_缓存结构
- 即墨东营衢州抚州辛集临海1383828884863
- 淮安日照沁阳侯马福鼎通辽1383828883931
- 沧州上虞白银兴宁定西丹阳1383828884873
- mex at 222 Unable to complete successfully.
- 宣威什邡阜阳天水1383829020359
- 三河四平德州韩城新密宣城1383828898633
- 清镇遵义淮安枝江高平瑞安1383828907515
- 商洛定西瑞金高安辛集聊城1383828907736