Skip to content

Direct Mapped Cache#

The entire address space consisting of \(2^n\) addresses is split into \(2^k\) blocks and each \(n\)-bit memory address is logically divided into three parts: an \(f\)-bit index, a \(b\)-bit offset and a \(k\)-bit tag.

Direct Mapped Cache Address

The index and the offset map the memory address to a cache address. Specifically, the index maps the memory address to a specific cache line and the offset maps the memory addresses to a specific byte within the cache line.

When a b

The tag of the address address determines the memory block to which this address belongs.

When reading data from a memory address, the