Consider 1MB 4-way set associative cache with 256-byte clock size. CPU…
Consider 1MB 4-way set associative cache with 256-byte clock size. CPU generates a 32-bits physical address. What is the number of comparators and size of each comparator required for tag matching, respectively?
Answer: C. (4 ,14) — Number of blocks = 2²⁰ / 2⁸ = 2¹² = 4096 Number of sets = 4096 / 4 = 1024 = 2¹⁰ → Index bits = 10 Block offset = log₂(256) = 8 bits Tag bits = 32 − 10 − 8 =…
- A.
(2, 56)
- B.
(2, 14)
- C.
(4 ,14)
- D.
(4, 56)
Attempted by 20 students.
Show answer & explanation
Correct answer: C
Number of blocks = 2²⁰ / 2⁸ = 2¹² = 4096
Number of sets = 4096 / 4 = 1024 = 2¹⁰ → Index bits = 10
Block offset = log₂(256) = 8
bits Tag bits = 32 − 10 − 8 = 14 bits
Comparators = 4 (one for each way)
Final Answer:
4 comparators, each comparing 14-bit tags → Option (C)