GATE / CS ARCHIVE

GATE CSE 2007 / QUESTION 10

Cache tag set and word bits

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

GATE 2007, Q10 1 mark · MCQ
Report issue

Cache Memory

Question 10, GATE 2007: A 4-way set-associative cache has 128 lines of 64 words each. Main-memory word addresses are 20 bits. What are the TAG, LINE and WORD field lengths, respectively?
Options:
(A) 9,6,5
(B) 7,7,6
(C) 7,5,8
(D) 9,5,6
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step through it (7 steps)

1. Approach. First divide total lines by associativity to obtain sets. The address chooses a word inside a line, then a set; the remaining high bits form the tag.

2. Derivation and interpretation. There are 128/4=32 sets, needing 5 set-index bits. A 64-word line needs 6 word-offset bits. With 20-bit word addresses the tag uses 20−5−6=9 bits. Thus 9,5,6, option D; the stated LINE field is the set index in this associative organization.

Original paper, page 3