You are on page 1of 19

DIRECT MAPPING

Dr. Anusha N
Cache memory Vs Main memory structure
• Cache is partitioned into lines (also called blocks).
• Each line has 4-64 bytes in it. During data transfer, a whole line is read or
written.
• Cache includes tags to identify which block of main memory is in each cache line.
Formulas to Remember
• Main memory size= 2 power n
n--- Physical address bits
• Tag = Main memory size/ cache memory size

• Cache offset or
Index or
Line number bits = Cache size/ block size
= 2 power n
=n
• Word offset bits = Block size = 2 power n
n is the number of bits in Word offset

You might also like