[我要考试]计算机体系结构_威斯康星_博士资格考试_Spring1988_Q2_Cache地址
2013-01-17 17:35
309 查看
这道题目是有关cache地址访问问题,在文章《学习笔记——Cache访问地址问题》中有技术说明。
2
The memory system for a processor has the following characteristics:
(a) A single 4G-bytevirtual address space of aligned four-byte words, addressed with 32-bitbyte-addresses. The memory system, therefore, accepts the 32-bit addresses, discardsthe two low-order bits,
and uses the upper 30 bits to select one of 230words.
(b) Pages and page frames are 4K bytes large.
(c) Physical memory will not exceed 226 bytes.
(d) The cache size is 16K bytes, associativity is four-way, block size is32 bytes, and blocks are tagged with physical addresses.
(e) The Translation Lookaside Buffer (TLB) holds 128 entries and is directmapped.
Draw a block diagram of the important datapath components and connectionsfor data read or instruction fetch that hits in a cache accessed in parallelwith the TLB. Be sure to indicate the width of connections
(e.g., how many bitsare used to select the set of a reference?). Explicitly state any assumptionsyou make. Discuss the advantages and disadvantages of reducing cacheassociativity to two way.
Answer:
这个系统有4G的虚拟地址空间,即VA是32位;
有64M的物理地址空间,即PA是26位;
页大小是4K,即页内偏移时12位;
Cache是16K,4路组相连,cache行大小是32位,cache的entry有128个,cache寻址是7位地址比较,并且重要的是cache是物理地址映射方式,这样在进行cache访问的时候,需要先把虚拟地址通过TLB进行物理地址的转换。
系统完整的寻址模式如下:
注意,这儿由于cache是16K,而页大小是4K,并且是4-way组相连,因此相当于cache一下子可以覆盖4个页空间,从而使得可以同时用页内偏移进行cache寻址。寻址图如下:
o 首先在第一个周期,同时发出VA的TLB查找以及利用VA的低7位进行Cache查找;
o 在第二个周期可以得到物理地址PA的高14位以及Cache中的Tag值和数据,并能进行比较;
o 第三个周期就可以得到所需要的数据
如果现在cache变为2路组相连,则在第一个周期无法利用VA的低7位进行cache查找,这个时候的查找流程变为:
2
The memory system for a processor has the following characteristics:
(a) A single 4G-bytevirtual address space of aligned four-byte words, addressed with 32-bitbyte-addresses. The memory system, therefore, accepts the 32-bit addresses, discardsthe two low-order bits,
and uses the upper 30 bits to select one of 230words.
(b) Pages and page frames are 4K bytes large.
(c) Physical memory will not exceed 226 bytes.
(d) The cache size is 16K bytes, associativity is four-way, block size is32 bytes, and blocks are tagged with physical addresses.
(e) The Translation Lookaside Buffer (TLB) holds 128 entries and is directmapped.
Draw a block diagram of the important datapath components and connectionsfor data read or instruction fetch that hits in a cache accessed in parallelwith the TLB. Be sure to indicate the width of connections
(e.g., how many bitsare used to select the set of a reference?). Explicitly state any assumptionsyou make. Discuss the advantages and disadvantages of reducing cacheassociativity to two way.
Answer:
这个系统有4G的虚拟地址空间,即VA是32位;
有64M的物理地址空间,即PA是26位;
页大小是4K,即页内偏移时12位;
Cache是16K,4路组相连,cache行大小是32位,cache的entry有128个,cache寻址是7位地址比较,并且重要的是cache是物理地址映射方式,这样在进行cache访问的时候,需要先把虚拟地址通过TLB进行物理地址的转换。
系统完整的寻址模式如下:
注意,这儿由于cache是16K,而页大小是4K,并且是4-way组相连,因此相当于cache一下子可以覆盖4个页空间,从而使得可以同时用页内偏移进行cache寻址。寻址图如下:
o 首先在第一个周期,同时发出VA的TLB查找以及利用VA的低7位进行Cache查找;
o 在第二个周期可以得到物理地址PA的高14位以及Cache中的Tag值和数据,并能进行比较;
o 第三个周期就可以得到所需要的数据
如果现在cache变为2路组相连,则在第一个周期无法利用VA的低7位进行cache查找,这个时候的查找流程变为:
相关文章推荐
- [我要考试]计算机体系结构_威斯康星_博士资格考试_Spring1988_Q1_栈结构
- [我要考试]计算机体系结构_威斯康星_博士资格考试_Fall2000_Q2_分支预测
- [我要考试]计算机体系结构_威斯康星_博士资格考试_Fall2006_Q2_Trace Cache和SMT
- [我要考试]体系结构_国外某大学_体系结构 PhD Qualifier Exam(Spring 2012)
- 回过头再看 计算机体系结构2----缓存cache
- 计算机软件专业技术资格和水平考试各省联系地址
- 计算机体系结构——地址
- 中国计算机软件专业技术资格和水平考试各地咨询地址和报名时间
- 计算机软件技术资格和水平考试各省联系地址
- 计算机软件专业技术资格和水平考试各地咨询地址
- 计算机体系结构--Cache
- 计算机网络体系结构
- spring核心框架体系结构(各个jar包作用)
- spring核心框架体系结构(各个jar包作用)
- 计算机网络体系结构
- 计算机体系结构(一)——进制
- 计算机体系结构实验——流水线及流水线中的冲突
- 计算机体系结构(学习)-概念了解
- 再谈“颠覆”冯.诺依曼计算机体系结构 ―― 计算机的未来发展方向:去内存化
- 计算机软件资格考试