The Cool Kids' CPU Cache Calculator
Recall, direct mapped means A = 1, fully associative means S = 1, and set associative means everything else. The notation we use is $(A, B, C).
A (associativity)
B (bytes per block or line)
C (capacity)
S (# sets) = C / (A * B)
M (address width in bits)
b (# block offset bits) = log(B)
s (# set index bits) = log(S)
t (# tag bits) = m - b - s
Address (hex)
0x
Block Offset
0x
Set Index
0x
Tag
0x
Set Index
0x
Tag
0x
Recreated Block Address
0x
Recreated Memory Addresses (inclusive)
0x
-
0x