Cache
Cache
Cache
Computer Architecture
TN = TA + (N/R)
where
– TN = Average time to read or write N bits
– TA = Average access time
– N = Number of bits
– R = Transfer rate in bits per second
int values[8] =
{9, 34, 23, 67, 23, 7, 3, 65};
int count;
int sum = 0;
for (count = 0; count < 8; count++)
sum += values[count];
C-1
Block length
(K words)
Block
2n-1
Word length
a.) 9ABCDEF16
b.) 123456716
CSCI 4717 – Computer Architecture Cache Memory – Page 45 of 81
More Direct Mapping Examples
Assume that a portion of the tags in the cache in our example
looks like the table below. Which of the following addresses are
contained in the cache?
• Note that there is one more bit in the tag than for
this same example using direct mapping.
• Therefore, it is 2-way set associative
• Use set field to determine cache set to look in
• Compare tag field to see if we have a hit