Direct Cache Structure

Slides:



Advertisements
Similar presentations
Cache Memory Exercises. Questions I Given: –memory is little-endian and byte addressable; memory size; –number of cache blocks, size of cache block –An.
Advertisements

Instruction Set Design
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Practical Caches COMP25212 cache 3. Learning Objectives To understand: –Additional Control Bits in Cache Lines –Cache Line Size Tradeoffs –Separate I&D.
EECS 470 Virtual Memory Lecture 15. Why Use Virtual Memory? Decouples size of physical memory from programmer visible virtual memory Provides a convenient.
The Lord of the Cache Project 3. Caches Three common cache designs: Direct-Mapped store in exactly one cache line Fully Associative store in any cache.
How caches take advantage of Temporal locality
Memory Hierarchies Exercises [ ] Describe the general characteristics of a program that would exhibit very little spatial or temporal locality with.
Virtual Memory. Why do we need VM? Program address space: 0 – 2^32 bytes –4GB of space Physical memory available –256MB or so Multiprogramming systems.
Caches The principle that states that if data is used, its neighbor will likely be used soon.
EENG449b/Savvides Lec /13/04 April 13, 2004 Prof. Andreas Savvides Spring EENG 449bG/CPSC 439bG Computer.
Direct Map Cache Tracing Exercise. Exercise #1: Setup Information CS2100 Cache I 2 Memory 4GB Memory Address 310N-1N Block Number Offset 1 Block = 8 bytes.
CDA 3103 Computer Organization Review Instructor: Hao Zheng Dept. Comp. Sci & Eng. USF.
An Intelligent Cache System with Hardware Prefetching for High Performance Jung-Hoon Lee; Seh-woong Jeong; Shin-Dug Kim; Weems, C.C. IEEE Transactions.
CSCE 212 Quiz 11 – 4/13/11 Given a direct-mapped cache with 8 one-word blocks and the following 32-bit memory address references: 1 2, ,
Caches – basic idea Small, fast memory Stores frequently-accessed blocks of memory. When it fills up, discard some blocks and replace them with others.
Caches – basic idea Small, fast memory Stores frequently-accessed blocks of memory. When it fills up, discard some blocks and replace them with others.
 Higher associativity means more complex hardware  But a highly-associative cache will also exhibit a lower miss rate —Each set has more blocks, so there’s.
1 CMPE 421 Advanced Computer Architecture Accessing a Cache PART1.
CSIE30300 Computer Architecture Unit 08: Cache Hsin-Chou Chi [Adapted from material by and
Multiprocessor cache coherence. Caching: terms and definitions cache line, line size, cache size degree of associativity –direct-mapped, set and fully.
B. Ramamurthy.  12 stage pipeline  At peak speed, the processor can request both an instruction and a data word on every clock.  We cannot afford pipeline.
Microprocessor Microprocessor (cont..) It is a 16 bit μp has a 20 bit address bus can access upto 220 memory locations ( 1 MB). It can support.
The Goal: illusion of large, fast, cheap memory Fact: Large memories are slow, fast memories are small How do we create a memory that is large, cheap and.
1 Chapter Seven. 2 Users want large and fast memories! SRAM access times are ns at cost of $100 to $250 per Mbyte. DRAM access times are ns.
DECStation 3100 Block Instruction Data Effective Program Size Miss Rate Miss Rate Miss Rate 1 6.1% 2.1% 5.4% 4 2.0% 1.7% 1.9% 1 1.2% 1.3% 1.2% 4 0.3%
1 Chapter Seven. 2 Users want large and fast memories! SRAM access times are ns at cost of $100 to $250 per Mbyte. DRAM access times are ns.
Additional Slides By Professor Mary Jane Irwin Pennsylvania State University Group 1.
COMP SYSTEM ARCHITECTURE PRACTICAL CACHES Sergio Davies Feb/Mar 2014COMP25212 – Lecture 3.
Memory Hierarchy and Cache Design (4). Reducing Hit Time 1. Small and Simple Caches 2. Avoiding Address Translation During Indexing of the Cache –Using.
Memory Hierarchy and Cache Design (3). Reducing Cache Miss Penalty 1. Giving priority to read misses over writes 2. Sub-block placement for reduced miss.
Non Contiguous Memory Allocation
Improving Memory Access The Cache and Virtual Memory
Address – 32 bits WRITE Write Cache Write Main Byte Offset Tag Index Valid Tag Data 16K entries 16.
Cache Organization of Pentium
CSE 351 Section 9 3/1/12.
Tutorial Nine Cache CompSci Semester One 2016.
CS2100 Computer Organization
Outline Paging Swapping and demand paging Virtual memory.
CAM Content Addressable Memory
Replacement Policy Replacement policy:
Lecture: Cache Hierarchies
Cache Memory Presentation I
Consider a Direct Mapped Cache with 4 word blocks
8051 Addressing Modes The way, using which the data source or destination addresses are specified in the instruction mnemonic for moving the data, is.
Lecture: Cache Hierarchies
Assignment 4 – (a) Consider a symmetric MP with two processors and a cache invalidate write-back cache. Each block corresponds to two words in memory.
Exploiting Memory Hierarchy Chapter 7
Lecture 21: Memory Hierarchy
The TMS320C6x Family of DSPs
Lecture 21: Memory Hierarchy
Directory-based Protocol
Lecture 23: Cache, Memory, Virtual Memory
FIGURE 12-1 Memory Hierarchy
Lecture 17: Case Studies Topics: case studies for virtual memory and cache hierarchies (Sections )
Module IV Memory Organization.
Interconnect with Cache Coherency Manager
Lecture 22: Cache Hierarchies, Memory
ADDRESSING MODES AND INSTRUCTION SET
Help! How does cache work?
Direct Mapping.
CSCI 6307 Foundation of Systems – Exercise (3)
Caches III CSE 351 Autumn 2018 Instructor: Justin Hsia
Lecture 22: Cache Hierarchies, Memory
CS 3410, Spring 2014 Computer Science Cornell University
Lecture 21: Memory Hierarchy
Cache - Optimization.
Lecture 13: Cache Basics Topics: terminology, cache organization (Sections )
Caches III CSE 351 Spring 2019 Instructor: Ruth Anderson
Overview Problem Solution CPU vs Memory performance imbalance
Presentation transcript:

Direct Cache Structure

Direct Cache Structure Assume cache line 256 bytes (8 bits), block size 256 (8 bits) and tag 16 bits Address 81230000 index 0, tag 8123 Address 87650100 Index 1 tag 8765 Address 891a00bc Index 0 tag 891a – Overwrite (trash) the first value (even though the cache is almost empty)

Two Ways Association Assume cache line 256 bytes (8 bits), block size 256 (8 bits) and tag 16 bits Address 81230000 index 0, tag 8123 Address 87650100 Index 1 tag 8765 Address 891a00bc Index 0 tag 891a – second block

FOUR Ways Association

Maximum Cache Sizes and More Maximum Size Line Size Ways Coherency Memory Banks L1p 32K Bytes 32Bytes One No hardware coherency NA L1D 64Bytes Two Coherent with L2 8 banks, each 32 bit L2 512K Bytes 128Bytes Four User must maintain coherency with external world invalidate write-back write-back invalidate 2 banks, 128 bit

Cache Optimization: L1 P Avoid conflict misses by ensuring that parent/child functions don’t share cache lines

Cache Optimization: L1 D Similar to L1P, avoid conflict misses by ensuring that functions with three pointers … i.e., addVector (*p1_in, *p2_in, *P3_out) … don’t step on each other. Keep cache size in mind when designing your code:

C66x L1 D Memory Banks

Two Loads Instruction in a Cycle