retagged by
819 views

2 Answers

Best answer
2 votes
2 votes

Size of physical address, m = 36

$C = S \times E \times B$

where $C$ is cache size,

$S = 2^s$ is the number of sets, 

$E$ is the number of cache lines per set, and

$B = 2^b$ is the block size in bytes.

It is given that, $C = 256\ \rm{KB} = 2^{18}\ \rm{bytes}$ and $E = 16$.

So, $2^{18} = 2^s * 2^4 * 2^b$

or, $s + b = 14$.

Therefore, the number of tag bits will $m - (s+b) = 36 - 14 = 22$.

selected by
1 votes
1 votes

consider block size=cache line size=2x bytes

then #cache line=218/2x=2(18-x)

then #sets=2(18-x)/24  =2(14-x)

physical address bits=36=#tagbits+#setbits+#blockoffsetbits

#tagbits+(14-x)+(x)=36

#tagbits=36-14=22bits

Related questions

0 votes
0 votes
0 answers
2
sushmita asked Dec 12, 2018
258 views
I am unable to understand the memory access time for hierarchical and simultaneous access using write back policy even after reading from go sources. Can someone plz expl...
0 votes
0 votes
0 answers
4
Mk Utkarsh asked Sep 12, 2018
1,010 views
Consider a 4 - way set associative cache with 'L' blocks of 16 words each. Cache block is associated with dirty bit field and valid bit field. Calculate cache capacity wi...