An Edge AI accelerator utilizes a 2-way set-associative L1 cache. The total cache data size is 16 KB, and the block (cache line) size is 64 bytes. The processor uses a 32-bit physical memory address. How many bits make up the Tag field in the physical address?
First, calculate the number of sets. Total cache size = 16 KB = 16,384 bytes. Total blocks = 16,384 / 64 = 256 blocks. Since it is 2-way set-associative, Number of Sets = 256 / 2 = 128 sets. The Index field requires log2(128) = 7 bits. The Block Offset field requires log2(64) = 6 bits. The remaining bits are the Tag: 32 - 7 - 6 = 19 bits.