-1
$\begingroup$

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

Given memory data ranging from 1A0040h:
000102070405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F

Given memory data ranging from 1A0090h:
202122272425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F

Given memory data ranging from 7B0040h:
404142474445464748494A4B4C4D4E4F505152575455565758595A5B5C5D5E5F

Given memory data ranging from CD0090h:
606162676465666768696A6B6C6D6E6F707172777475767778797A7B7C7D7E7F

Given memory data ranging from FF0040h:
808182878485868788898A8B8C8D8E8F909192999495969798999A9B9C9D9E9F

Given memory data ranging from AD0040h:
A0A1A2A7A4A5A6A7A8A9AAABACADAEAFB0B1B2BBB4B5B6B7B8B9BABBBCBDBEBF

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?/

Thanks.

$\endgroup$
1
  • 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, 2017 at 19:38

1 Answer 1

0
$\begingroup$

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...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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