- #1
MaxR2018
- 5
- 0
- Homework Statement
- System with main memory of 32 MB and a cache of 256 KB with blocks of 32 bytes (1 word = 2 Bytes), determine the bits of the physical address used for words, lines of blocks or sets and labels if the cache memory has associative mapping by sets of 8 ways.
- Relevant Equations
- Not required
I'm triying to do thiS way, but I'm not sure.
First: I have 32Mb of so 32Mb=2^25, so the memory adress has 25 bits.
Second: with blocks of 32 bytes =2^5 bytes so the word has 5 bits.
Third: If cache has 256kb and each block has 32 bytes, so 256kb/32bytes=8000, that means i have 8000 ways. If a set has with 8 ways each one, so 8000/8=1000 sets =2^10. So set has 10 bits in the adress.
At last if the adress has 25 bits, so tag has:
25 bits - 5 bits - 10 bits = 10 bits.
End result:
Adress memory=32 bits
Tag=10bits
Set=10bits
Word=5bits
Is this well resolved?
First: I have 32Mb of so 32Mb=2^25, so the memory adress has 25 bits.
Second: with blocks of 32 bytes =2^5 bytes so the word has 5 bits.
Third: If cache has 256kb and each block has 32 bytes, so 256kb/32bytes=8000, that means i have 8000 ways. If a set has with 8 ways each one, so 8000/8=1000 sets =2^10. So set has 10 bits in the adress.
At last if the adress has 25 bits, so tag has:
25 bits - 5 bits - 10 bits = 10 bits.
End result:
Adress memory=32 bits
Tag=10bits
Set=10bits
Word=5bits
Is this well resolved?