I have an exercise and I don't understand the solution.

Given memory data ranging from 1A0040h:

Given memory data ranging from 1A0090h:

Given memory data ranging from 7B0040h:

Given memory data ranging from CD0090h:

Given memory data ranging from FF0040h:

Given memory data ranging from AD0040h:

Given the fully associative cache at size 4 (4 cache lines) with counter, with 16 Byte data space

Describe the contents of the cache after these steps:

  1. Reading from 1A0046
  2. Write F to the address 1A0053
  3. Reading from 7B0049h
  4. Reading from FF0042h

This is the solution:

enter image description here

How do I fill an empty table to get to the answer?

/Reading from 1A0046 means reading all 16 Byte and what about the writing?/


  • 1
    $\begingroup$ I can't understand your question. Can you rephrase it? Can you break down the sentence into multiple parts? What does "what about the writing?" mean? Can you show us your thoughts and what you think the correct solution should be? What do you think the contents of the cache should be after each of the 4 steps? $\endgroup$ – D.W. Feb 20 '17 at 19:38

So, the cache tags at the 16 byte address range, so the tags for 4 reads are as given (as you simply drop the last nibble of the address - which then becomes the offset in the range 0x0 - 0xF).

The cache reads from the 16 byte division, so for the first read it reads the first 16 bytes in from 0x1A0040 (which covers the range sought).

In the second the cache reflects the data from 0x1A0050 with the write as required.

From the third the cache line begins at 0x7B0040 (with the tag dropping the nibble) and so on...

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.