Division between Block Offset, Index and Tag.

Asked By 30 points N/A Posted on -
qa-featured

If Cache Size is 64 KB, Block size is 32 B and the cache is Two-Way Set Associative. For a 32-bit physical address, then give the division between Block Offset, Index and Tag?

SHARE
Answered By 0 points N/A #116381

Division between Block Offset, Index and Tag.

qa-featured

1. The block size is given as 32 B, therefore we can calculate the block offset as;

2^(block offset) = block size = 32.

Hence, block offset = 5 bits.

2. Cache size is given as 64 KB, therefore we can calculate no of blocks as;

No of blocks = cache size / block size = 64 KB / 32 B = 2048.

Because two way set association is used, 

No of lines = 2000 / 2 = 1024.

So we can calculate the index size as;

2^(index size) = 1024.

Hence, index size = 10 bits.

3. Because the physical address block is 32 bits long,

Offset + index + tag = 32 bits.

Hence, tag = (32 – 5 – 10) bits = 17 bits.

Login/Register to Answer

Related Questions