Cache line “formulae”

Geography
# cache lines
size of cache memory / (words per block * bytes per word)
# index bits
lg(# of lines) / set associativity
# word offset bits
lg(words per block)
# byte offset bits
lg(bytes per word)
Associativity affects (a) pages, (b) lines, (c) both
(a) lines
# cache lookup bits
# bits total = lg(memory size)
# index bits
# cache line bits – # management bits
# cache line bits
1 (V) + 1 (D) + # tag bits + # data bits
# tag bits
# cache lookup bits
# data bits
bits per word * words per block
# management bits
1 (V) + 1 (D) + # tag bits

Leave a Reply

Your email address will not be published. Required fields are marked *