67.0k views
1 vote
Consider a byte addressing architecture with 64-bit memory addresses.

which bits of the address would be used in the tag, index and offset in a direct-mapped cache with 512 1-word blocks

User Vmanjz
by
7.7k points

1 Answer

5 votes

Final answer:

In a 64-bit memory address byte addressing architecture with 512 1-word blocks in a direct-mapped cache, typically 9 bits are used for the index, 2 bits for the offset (assuming 4-byte words), leaving 53 bits for the tag.

Step-by-step explanation:

In a byte addressing architecture with 64-bit memory addresses and a direct-mapped cache with 512 1-word blocks, the memory address would be divided into three parts: the tag, the index, and the offset (or block offset). First, determine the size of the offset. If we assume a 'word' is the same as a 'byte', which is common in many architectures, there would be no offset required since each block contains just 1 byte.

However, if a 'word' refers to a standard 4-byte word, you need 2 bits for the offset, since 2^2 bytes = 4 bytes per block.

Next, calculate the index size.

There are 512 blocks in the cache, which requires 9 bits to index (since 2^9 = 512).

Therefore, the last 9 bits of the address could be used for the index.

The remaining bits are used for the tag. In this case, a 64-bit address with two bits for the block offset and nine bits for the index leaves 53 bits for the tag (64 - 9 - 2 = 53).

User Rudder
by
9.1k points