Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider an 8MB direct-mapped data cache that uses a 32-bit address and 32 bytes

ID: 3811716 • Letter: C

Question

Consider an 8MB direct-mapped data cache that uses a 32-bit address and 32 bytes per block. As usual assume 32-bit words. (a) How many bits are used for the block offset? For word offset? (b) How many bits are used for the index? (c) How many bits are used for the tag? (d) Provide the design of this cache similar as on Slides H36 or H37, including gates, multiplexers and comparators where needed. (e) Assuming that CPU generates address 0 times ABCDE678 and it is a hit, what is the cache entry accessed? indicate as much as possible of contents for that entry.

Explanation / Answer

consider an 8MB direct-mapped data cache that uses a 32-bit address and 32 bytes per block.As usual assume 32-bit words

How many bits are used for the block offset? for word offset?
The address can be divided into the following parts:
[ tag | index | block or line offset | byte offset ]
4-0

How many bits are used for the indx?
9-5
How many bits are used for the tag?
31-10