Construct a cache memory subsystem using these specifications: Use following fou
ID: 3568750 • Letter: C
Question
Construct a cache memory subsystem using these specifications:
Use following four steps:
1.Compute the tag field
2.Compute the number of chips / bank
3.Build the physical cache subsystem
4.Determine cache address word format
and
Since the minimum incremental amount of memory you can use is one byte (8 bits), if you were to build the cache memory from problem above, what is the total size (in bytes) required for this cache memory?
What I got for first part:
1. 15 tag bits
2. 18 chips/ bank
3. 2 banks
Explanation / Answer
As a block is having 4 words,number of bits needed to identify a word=2 [As 2^2=4]
Total Cache memory = 128 k bytes
Cache memory size = 64 k bits = 65536 bits = 8192 bytes
So number of words in a cache memory chip = 8192/4 = 2048 words
Number of blocks in a cache memory chip = 2048/4 =512 blocks
Number of bits needed to identify a block = 9 [As 2^9=512]
Number of cache memory chips required for this assembly = (128*8)/64 = 16
Number of banks = 2
Number of bits required to identify a bank = 1 [As 2^1=2]
Number of cache memory chips per bank = 16/2 = 8
Number of bits needed to identify a cache chip in a bank = 3 [As 2^3=8]
1) Tag field = CPU address - ( Number of bits for bank + Number of bits needed to identify a cache chip in a bank + Number of bits for block + Number of bits for word)
= 32 - (1+3+9+2) = 32-15 = 17
2) Number of chips per bank = 8 [From prior calculations]
3) Number of banks=2 [From prior calculations]
4) Cache Tag<---->( Bank Select<----->Chip Select)<---->Block<----->Word
31.....15<-------------->14<--------------..>13......11<--....->10.....2<....->1......0
For the second part:-
Total size in bytes = (64k-bits * 16) [As there are total 16 memory chips]
= (64*1024*16)/8 bytes = 131072 bytes