recategorized by
2,311 views
7 votes
7 votes

A two-way set associative cache memory unit with a capacity of $16\, KB$ is built using a block size of
$8\, words.$ The word length is $32-bits.$ The physical address space is $4\, GB.$
The number of bits in the TAG, SET fields are

  1. $20,7$
  2. $19,8$
  3. $20,8$
  4. $21,9$
recategorized by

1 Answer

Best answer
9 votes
9 votes

Given, 

Total cache size = 16 KB = $2^{14}$ bytes

word length = 32 bits, i.e. 4 bytes or $2^2$ bytes.

Since, the word length is given, I am assuming memory to be word-addressable, and not byte-addressable.

So, we have $2^{12}$ words cache size.

1 block is 8 words, so block offset = $\log 8 = 3$ bits.

cache size(in terms of blocks) = $2^{12} / 8$ = $2^9$ blocks.

Given the cache is 2-way set associative. So, 

2 blocks - 1 set

$2^9$ blocks - $2^8$ sets. 

so, we need 8 bits to identify the set.

The physical address space is 4GB,i.e. $2^{32}$ bytes, or in terms of words, $2^{30}$ words.

So, the physical address will be of 30 bits.

Out of 30, 3 bits are used for offset, and 8 bits for the set field. 

Therefore, tag bits are 30 - 3 - 8 

= 19 bits.

Option (B) 19, 8

selected by
Answer:

Related questions

39 votes
39 votes
5 answers
1
Kathleen asked Sep 22, 2014
43,291 views
What is the maximum height of any AVL-tree with $7$ nodes? Assume that the height of a tree with a single node is $0$.$2$$3$$4$$5$