The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

in CO and Architecture by (23 points) | 45 views

1 Answer

0 votes
The total number of blocks is 8192.

Since it is a 4-way set associative cache, each set can contain 4 blocks.

Therefore, total number of sets is $\frac{8192}{4} = 2048 = 2^{11}$.

Hence, number of bits required will be $log_2(2^{11}) = 11$

Also, size of one block = $32 \, \text{words} \Rightarrow 32 \times 64 \, \text{bits} = 2^{11} \, \text{bits}$

Now since the addresses are word addressable, the number of words is $\frac{2^{11}}{2^6} = 2^5$
Therefore, word offset is $log_2(2^{5}) = 5 \, \text{bits} $

Now we know that $$\text{Number of bits in physical address = Tag + Set + Word Offset}$$

Plugging in the values, we get the value of Tag as $48$ bits.

If this is not the correct answer, do let me know. I tried to answer it to the best of my knowledge.
by Loyal (6.3k points)
edited by
given that it is word addressable.. therefore word offset is 5 bits only,

if given that it is word addressable.. therefore word offset is 8 bits only,

if given that it is bit addressable.. therefore word offset is 11 bits only,

You are right, it is word addressable. Therefore, word offset should be $\frac{2^{11}}{2^6} = 2^5$.

I'll edit my answer.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,093 questions
55,333 answers
86,257 users