The size of the physical address space of a processor is $2^P$ bytes. The word length is $2^W$ bytes. The capacity of cache memory is $2^N$ bytes. The size of each cache block is $2^M$ words. For a $K$-way set-associative cache memory, the length (in number of bits) of the tag field is
The block size is $2^{M+W}$ bytes and the number of sets is $\frac{2^N}{2^{M+W}K}$. The index has $N-M-W-\log_2K$ bits and the offset has $M+W$ bits, so the tag is $P-(N-M-W-\log_2K)-(M+W)=P-N+\log_2K$ bits.
More Memory Interfacing and Hierarchy questions
GATE 2016 CS (CS1) Q19– A processor can support a maximum memory of 4 GB, where the memory is word-addressable (a…
GATE 2017 CS (CS1) Q35– Consider a two-level cache hierarchy with L1 and L2 caches. An application incurs 1.4…
GATE 2017 CS (CS1) Q61– Consider a 2-way set associative cache with 256 blocks and uses LRU replacement. Initially…
GATE 2017 CS (CS1) Q64– A cache memory unit with capacity of N words and block size of B words is to be designed.…
GATE 2014 CS (CS1) Q54– A length-N cache-block access sequence contains n unique addresses. Distinct block…
GATE 2014 CS (CS2) Q19– A 4-way set-associative cache has capacity 16 KB and blocks of 8 words. Words are 32 bits…