In this example:
Assume a system’s memory has 128M words. Blocks are 64 words in length and the cache consists of 32K blocks. Show the format for a main memory address assuming a 2-way set associative cache mapping scheme. Be sure to include the fields as well as their sizes.
The following is supposed to be the solution:
Each address has 27 bits, and there are 7 in the tag field, 14 in the set field and 6 in the word field.
I understand how the word field was calculated (2^6 = 64), but I don't understand how is the set field 14?.
Shouldn't the answer be 8?
Block size is 64 words, to find the number of sets we divide total number of blocks 32K by set size which is 64*2=128B (multiply by 2 since it's 2-way), my calculation should be correct, am I missing something?
32KB/(64*2)B = 32KB/128B = 256 = 2^8
(Which implies that we need 8 bits for the set field)