|
|
|
|
|
|
Figure 5.39
Write assembly cache with line size l bytes, n lines, and
transfer unit (physical word size) t bytes. |
|
|
|
|
|
|
|
|
1. Number of L2 sets ³ number of L1 sets. |
|
|
|
 |
|
|
|
|
L2 size/(L2 assoc * L2 line size) ³ L1 size/(L1 assoc * L1 line size). |
|
|
|
 |
|
|
|
|
L2 size/L2 assoc ³ L1 size/L1 assoc * (L2 line size/L1 line size). |
|
|
|
|
|
|
|
|
2. L2 assoc ³ L1 assoc. (L1 assoc is the sum of I and D assoc.) |
|
|
|
|
|
|
|
|
We have assumed that all L1 references are passed to L2 so that it can update its LRU. If this were not true, we could never have logical inclusion. For example, say L1 and L2 have the same associativity (2) and number of sets. Let L2 currently include L1, with E1-2 being the last referenced, implying that E1-1 is the next to be replaced in L2. The CPU can reference E1-1 in L1, making E1-2 the next to be replaced. A reference to E1-3 would replace E1-2 in L1 and E1-1 in L2, and ruin inclusion. Alternatively, other replacements such as a FIFO scheme offer simpler consistency. Even RAND might be consistent if L1 and L2 use a similar algorithm. |
|
|
|
|
|
|
|
|
5.13 Write Assembly Cache |
|
|
|
|
|
|
|
|
Certain types of "write only" caches can be very valuable to the designer in reducing traffic to the memory system [43, 96]. |
|
|
|
|
|
|
|
|
Suppose we have a processor with a write-through cache. From our earlier discussions on memory traffic in copyback and write-through caches, beyond a certain cache size write-through traffic is dominated by writes, and this residual write traffic defines a lower limit to the memory traffic required for write-through cache. Write-through caches have advantages over copyback caches by generally requiring less software management to support memory consistency as used in multiprocessor configurations. The write assembly cache (WAC) offers an intermediate strategy, centralizing pending memory writes in a single buffer, which reduces resulting bus traffic, but accomplishing this at some sacrifice in consistency (since writes can now be delayed). |
|
|
|
|
|
|
|
|
Consider Figure 5.39. A buffer of n entries consists of a number of transfer units that compose a line of l bytes. The transfer unit or physical word size |
|
|
|
|
|