in CO and Architecture
865 views
2 votes
2 votes

Consider a 64 KB cache with 256 sets. Addresses are 32 bits. Tags are 19 bits.

What is associativity (blocks per set) of this cache?

  1. 4
  2. 16
  3. 2
  4. 8
in CO and Architecture
865 views

1 Answer

2 votes
2 votes
Best answer

I think its 8.

address size 32 and tag is 19 bit so 

32 - 19 =13 bit (set bit +  offset) 

and there are 256 sets so set bit = 8 

word off = 13-8=5 bit

in set associative: size of cache = no. of sets * associativity * offset  

216=2* associativity * 25= > associativity =23

1 comment

Another way  to solve

Calculate no of blocks=2^16/2^5=2^11

Now associativity=no of blocks/no of sets=2^11/2^8=2^3=8
0
0