Access over 35 million academic & study documents

3 Suppose a computer using set associative cache has 228 words of m

Content type
User Generated
Showing Page:
1/2
3. Suppose a computer using set associative cache has
228 words of main memory and a cache of 64 blocks, and
each cache block contains 8 words.
a. If this cache is 2-way set associative, what is the format
of a memory address as seen by the cache, that is, what
are the sizes of the tag, set, and word fields?
b. If this cache is 4-way set associative, what is the format
of a memory address as seen by the cache?
Solution
No. of sets = no of block in cache /no of way set
associative = 64/2 = 32 sets
To address one of the set = 32 = 2^5 we need 5 bits, so
the set field is 5 bits
The offset 4 = 2^2 =so it will be 2 bits and the memory
address it contain 28 bits,
and the tag field will be = 28 - (5+2) = 21 bits.
64/4 = 16 sets.so the sets is 16 = 2^4 we need 4 sets field
so the tag will be (28-(4+2) )= 22 bits.

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/2

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
3. Suppose a computer using set associative cache has 228 words of main memory and a cache of 64 blocks, and each cache block contains 8 words. a. If this cache is 2-way set associative, what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, set, and word fields? b. If this cache is 4-way set associative, what is the format of a memory address as seen by the cache? Solution No. of sets = no of block in cache /no of way set associative = 64/2 = 32 sets To address one of the set = 32 = 2^5 we need 5 bits, so the set field is 5 bits The offset 4 = 2 ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Documents