Caching
1
Caching 1 Key Point What are Cache lines Tags Index offset - - PowerPoint PPT Presentation
Caching 1 Key Point What are Cache lines Tags Index offset How do we find data in the cache? How do we tell if its the right data? What decisions do we need to make in designing a cache? What are possible
1
2
in our pipeline diagrams
“instruction memory” block in our pipeline diagrams.
3
4
EX Decode Fetch/ L1 Icache 16KB Mem L1 Dcache 16KB Write back Unified L2 8MB Unified L3 32MB DRAM Many GBs
5
accesses.
branches are predictable
cache has collected.
pipeline
that they can be prohibited (i.e., self modifying code)
6
the big-A architecture.
7
8
9
what is in main memory
meaningful data
address
lines possible location
(low-order bits)
Address tag Index line offset
dirty valid tag data
10
not explicitly asked for.
space and bandwidth.
11
12
long long int array[10][10]; int sum(int x, int count) { int s = 0; long long int i; for(i = 0; i < count; i++) { s+= array[x][i]; } return s; }
array + x*80 array + (x+10)*80
13
nestLoop2.c
long long int array[5][5]; int sum(int x, int count) { int s = 0; long long int i; for(i = 0; i < count; i++) { s+= array[i][x]; } return s; }
14
15
15
15
15
16
16
16
16
hierarchy.
17
hierarchy.
17
18
19
hierarchy (why?)
hierarchy
20
hierarchy (why?)
hierarchy
20
hierarchy (why?)
hierarchy
20
hierarchy (why?)
hierarchy
20
21
21
21
Fewer writes farther down the hierarchy. Less bandwidth. Faster writes
22
22