GATE / CS ARCHIVE

GATE CSE 2001 / QUESTION 9(c)

Parallel tag comparators

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2001 paper

GATE 2001, Q9(c) Descriptive
Report issue

Cache Memory

Question 9(c), GATE 2001: 32-bit byte addresses; cache data capacity 256 KB=2^18 bytes; 4-way set associative; 16-byte blocks.

Task: Find the number and size of comparators for tag matching.
Question 9(c), GATE 2001: 32-bit byte addresses; cache data capacity 256 KB=2^18 bytes; 4-way set associative; 16-byte blocks.

Task: Find the number and size of comparators for tag matching.
Tap to enlarge
Shared context

32-bit byte addresses; cache data capacity 256 KB=2^18 bytes; 4-way set associative; 16-byte blocks.

Answer & solution

Answer: Four 16-bit equality comparators for a parallel four-way lookup. (no official key was published)

1. The 12 index bits select one set containing four candidate cache blocks. The requested block may occupy any of those four ways.

2. The incoming 16-bit tag must be compared with each of the four stored 16-bit tags. A standard parallel lookup therefore uses four comparators, each comparing two 16-bit quantities.

3. Each comparator produces one match bit, normally qualified by the corresponding valid bit. The hit way selects its data.

4. Comparators for every cache block are unnecessary because the index has already selected one set. A serial implementation could reuse hardware with additional latency, but the conventional associative lookup requested here is parallel.

Original paper, page 8