Machine-translated by Google. Questions are authored in English.
Top

Discussion

A 4-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 size of the physical address space is 4 GB. The number of bits in the TAG field is :

  • A.5
  • B.15
  • C.20
  • D.25

Answer: C

The TAG field has 20 bits.

\[ \begin{aligned} \text{block} &= 8 \times 4 = 32 \text{ bytes} \Rightarrow 5 \text{ offset bits} \\ \text{blocks} &= 16\text{ KB} / 32 = 512 \\ \text{sets} &= 512 / 4 = 128 \Rightarrow 7 \text{ index bits} \\ \text{address} &= 4\text{ GB} = 2^{32} \Rightarrow 32 \text{ bits} \\ \text{tag} &= 32 - 7 - 5 = 20 \end{aligned} \]

The physical address splits into tag, set index and byte offset. 5 is only the width of the offset, and 15 and 25 do not come from a correct split of the 32-bit address.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.