版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、yin yong Principles of Embedded Computing System Design,1,CPUs,Caches. Memory management.,yin yong Principles of Embedded Computing System Design,2,Cache operation,Many main memory locations are mapped onto one cache entry. May have caches for: instructions; data; data + instructions (unified). Memo
2、ry access time is no longer deterministic.,yin yong Principles of Embedded Computing System Design,3,Caches and CPUs (P.84),yin yong Principles of Embedded Computing System Design,4,Terms,Cache hit: required location is in cache. Cache miss: required location is not in cache. Working set: set of loc
3、ations used by program in a time interval.,yin yong Principles of Embedded Computing System Design,5,Types of misses,Compulsory (cold) miss: location has never been accessed. Capacity miss: working set is too large. Conflict miss: multiple locations in working set map to same cache entry.,yin yong P
4、rinciples of Embedded Computing System Design,6,Memory system performance,h = cache hit rate. tcache = cache access time, tmain = main memory access time. Average memory access time: tav = htcache + (1-h)tmain,yin yong Principles of Embedded Computing System Design,7,Multiple levels of cache,Capacit
5、y increment,yin yong Principles of Embedded Computing System Design,8,Multi-level cache access time,h1 = cache hit rate. h2 = rate for miss on L1, hit on L2. Average memory access time: tav = h1tL1 + (h2-h1)tL2 + (1- h2-h1)tmain,yin yong Principles of Embedded Computing System Design,9,Cache perform
6、ance benefits,Keep frequently-accessed locations in fast cache. Cache retrieves more than one word at a time. Sequential accesses are faster after first access.,yin yong Principles of Embedded Computing System Design,10,Replacement policies (P.85),Replacement policy: strategy for choosing which cach
7、e entry to throw out to make room for a new memory location. Two popular strategies: Random. Least-recently used (LRU).,yin yong Principles of Embedded Computing System Design,11,Cache organizations (P.85),Fully-associative: any memory location can be stored anywhere in the cache (almost never imple
8、mented). Direct-mapped: each memory location maps onto exactly one cache entry. N-way set-associative: each memory location can go into one of n sets.,yin yong Principles of Embedded Computing System Design,12,Direct-mapped cache (P.86),yin yong Principles of Embedded Computing System Design,13,Writ
9、e operations,Write-through: immediately copy write to main memory. Write-back: write to main memory only when location is removed from cache.,yin yong Principles of Embedded Computing System Design,14,Direct-mapped cache locations,Many locations map onto the same cache block. Conflict misses are eas
10、y to generate: Array a uses locations 0, 1, 2, Array b uses locations 1024, 1025, 1026, Operation ai + bi generates conflict misses.,yin yong Principles of Embedded Computing System Design,15,Set-associative cache,A set of direct-mapped caches:,yin yong Principles of Embedded Computing System Design
11、,16,Example: direct-mapped vs. set-associative (p.87),yin yong Principles of Embedded Computing System Design,17,Direct-mapped cache behavior,After 001 access: blocktagdata 00- 0101111 10- 11-,After 010 access: blocktagdata 00- 0101111 1000000 11-,yin yong Principles of Embedded Computing System Des
12、ign,18,Direct-mapped cache behavior, contd.,After 011 access: blocktagdata 00- 0101111 1000000 1100110,After 100 access: blocktagdata 0011000 0101111 1000000 1100110,yin yong Principles of Embedded Computing System Design,19,Direct-mapped cache behavior, contd.,After 101 access: blocktagdata 0011000
13、 0110001 1000000 1100110,After 111 access: blocktagdata 0011000 0110001 1000000 1110100,yin yong Principles of Embedded Computing System Design,20,2-way set-associtive cache behavior,Final state of cache (twice as big as direct-mapped): set blk 0 tagblk 0 datablk 1 tagblk 1 data 00 11000- 01 0111110
14、001 10 00000- 11 0011010100,LRU replacement policy,yin yong Principles of Embedded Computing System Design,21,2-way set-associative cache behavior,Final state of cache (same size as direct-mapped): setblk 0 tagblk 0 datablk 1 tagblk 1 data 0010000101000 1100001110100,yin yong Principles of Embedded
15、Computing System Design,22,Example caches (P.88),StrongARM: 16 Kbyte, 32-way, 32-byte block instruction cache. 16 Kbyte, 32-way, 32-byte block data cache (write-back). SHARC: 32-instruction, 2-way instruction cache.,yin yong Principles of Embedded Computing System Design,23,Memory management units (
16、P.89),Memory management unit (MMU) translates addresses:,Memory mapping,yin yong Principles of Embedded Computing System Design,24,Memory management tasks,Allows programs to move in physical memory during execution. Allows virtual memory: memory images kept in secondary storage; images returned to m
17、ain memory on demand during execution. Page fault: request for location not resident in memory.,yin yong Principles of Embedded Computing System Design,25,Address translation,Requires some sort of register/table to allow arbitrary mappings of logical to physical addresses. Two basic schemes: segment
18、ed; paged. Segmentation and paging can be combined (x86).,yin yong Principles of Embedded Computing System Design,26,Segments and pages (P.90),Physical memory,segment register,offset/logical address,yin yong Principles of Embedded Computing System Design,27,Segment address translation,yin yong Principles of Embedded Computing System Design,28,Page address translation,yin yong Principles of Embedded Computing S
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 集美大学诚毅学院《环境与自然资源经济学》2025-2026学年期末试卷
- 福建农林大学金山学院《金融科技》2025-2026学年期末试卷
- 福建农林大学金山学院《工程材料》2025-2026学年期末试卷
- 2026年荆门市东宝区社区工作者招聘考试参考题库及答案解析
- 2026年洛阳市涧西区社区工作者招聘笔试备考试题及答案解析
- 2026年江门市蓬江区社区工作者招聘笔试模拟试题及答案解析
- 2026年沈阳市苏家屯区社区工作者招聘考试备考题库及答案解析
- 2026年威海市环翠区社区工作者招聘笔试参考试题及答案解析
- (新)设计院管理制度规章制度(3篇)
- 2026年四川省成都市社区工作者招聘考试备考试题及答案解析
- 工业机器人职业生涯发展规划
- 《纺织材料生产》课件-项目7:短纤工段
- (正式版)SHT 3046-2024 石油化工立式圆筒形钢制焊接储罐设计规范
- 吸附计算完整
- 红旗H7汽车说明书
- 门静脉高压症讲解
- 《神表》-孙老师收费完全版:职称英语顺利过关的必备利器
- 怒江水电开发的工程伦理案例分析
- 《答司马谏议书》课件(21张PPT)
- GB/T 3906-20203.6 kV~40.5 kV交流金属封闭开关设备和控制设备
- GA 1277.1-2020互联网交互式服务安全管理要求第1部分:基本要求
评论
0/150
提交评论