We have a 4-way set-associative cache for memory with 32-bit address. The cache
ID: 3533609 • Letter: W
Question
We have a 4-way set-associative cache for memory with 32-bit address. The cache has 128 entries. Each block can hold 16 bytes of data. In the following table, fill in the bits of the memory address that are used for Tag and Index.
Tag Index byte offset
3-0
What is the size of the cache, i.e., how many data in the number of bytes can be hold in the cache?
Explanation / Answer
Size of cache =128*16=2048 bytes =2KB
No of sets = 128/4=32 sets
For 32 sets, 5 bits as index bits
Tag bits = 32-4-5=23 bits
So answer is tag bits -> 31:9
Index bits -> 8:4
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.