written 5.8 years ago by | • modified 3.1 years ago |
How many bits are there in main memory address?
How many bits are there in cache memory address (tags, set and word fields)?
written 5.8 years ago by | • modified 3.1 years ago |
How many bits are there in main memory address?
How many bits are there in cache memory address (tags, set and word fields)?
written 3.1 years ago by |
Given,
Number of blocks in cache memory = 64
Number of blocks in each set of cache = 4
Main memory size = 4096 blocks = $ 2^{12} $
Block size = 128 words = $ 2^7 $ words
Size of main memory = 4096 blocks = $ 2^{12} $
= $ 2^{12} * 2^7 $
= $ 2^{19} $
Hence there will be 19 bits in the main memory
Size of main memory = 4096 blocks = $ 2^{12} $
Hence the tag and set field combine will have 12 bits
TAG + SET = 12 bits
Number of sets = 64/4 = 16
SET = The cache is divided into 16 = $ 2^4 $ sets
SET = 4 bits
TAG = 12 bits - 4 bits = 8 bits
Each block consist of 128 words = $ 2 ^ 7 $ words
Hence the Word Field length will be 7 bits