Let's say a program reads the addresses 0x00 cd 10 54
and0x00 cd 10 50
. The tag size and and index size added are just 4 bits, the cache has 8 blocks to 8 Bytes and thus 4 together make a set. The CPU is 32 bit.
Then above addresses would point to:
0x00 cd 10 50: ca 01 6b 7f ff 00 10 ee ff 41 45 e8 00 a7 56 00
and would want to write ca 01 6b 7f ff 00 10 ee
into set 0
with tag 0x00 cd 10 5
Let's say further say, the cache were empty beforehand. Is the data now written once or two times?