Question

Assume the following about a computer with a cache: .. The memory is byte addressable. • Memory accesses are to 1-byte words

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

Memory address size = 8 bits

Cache associativity = 2

#sets in cache = 4

Cache block size = 2 bytes

So, cache block offset = log2(block size) = log2(2) = 1 bit

Cache Set Index = log2(number of sets)= log2(4) = 2 bits

Cache tag = Address size - block offset - set index = 8 - 1 - 2 = 5 bits

Memory Address is represented as below

Tag Set Index Block Offset
5 2 1

memory address = 0x4a = 0100 1010

  • Cache Tag = 01001 = 0x09
  • Cache Set index = 01 = 0x1
  • Cache block offset = 0 = 0x0
  • Cache hit = Yes
    • All entries in Set index 1 is looked for any matche with tag value 0x9. If found e check for valid bit V. if V=1 data is returned based on block offset.
  • Cache byte returned = 0xe8
    • ​​​​​​​Each cache entry contains 2 byte. as block offset is 0, 0th byte is returned.

Add a comment
Know the answer?
Add Answer to:
Assume the following about a computer with a cache: .. The memory is byte addressable. •...
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