Question

Please calculate the total number of bits needed for the cache with listed below for a...

Please calculate the total number of bits needed for the cache with listed below for a direct-mapped cache.

Size of Cache Data: 32KB

Size of Cache Block: 2 Words

0 0
Add a comment Improve this question Transcribed image text
Answer #1

For direct mapping , CPU generated address is divided into : Tag field , Line field and Word offset

Given data memory size of cache = 32 KB

Assuming the memory to be byte addressable (ie. 1 word size = 1B)

No. of cache lines = Data memory size of cache/ Data size of one cache line

                           = 32 KB /2B = 214 lines

Then number of bits needed to represent cache line = log 2 (214) = 14 bits

Number of bits needed to represent a word in a line = log2 2 = 1 bit

No. of bits needed for tag = 32-14-1 =17 bits

For a given line, we will have the same tag. So one tag is associated with one line in case of direct mapping

So size of the tag memory = No. of tag bits * no.of lines = 17 * 214 bits = 279 K bits

data memory size of cache = 32 KB = 256 K bits

So total memory needed for cache = 256 K bits + 279 K bits = 535 K bits

Add a comment
Know the answer?
Add Answer to:
Please calculate the total number of bits needed for the cache with listed below for a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT