I have two questions:
An 8-kB (8192 bytes) direct-mapped cache has 16-byte lines.
The system has 64-bit addresses numbered from 0 on the right to 63 on the left.
Which bits are associated with the offset, index, and tag?
A 16-kB (16384 bytes) 4-way set associative cache has 8-byte lines.
The system has 64-bit addresses numbered from 0 on the right to 63 on the left.
Which bits are associated with the offset, index, and tag?
For offset, it's: tag bits = address bit length - exponent of index - exponent of offset, correct?
Then the Index for a direct mapped cache is the number of blocks in the cache, and the Tag bits are everything else, right?
How would I calculate these? Because I'm a little confused on an associated cache vs a direct-map cache.