This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Memory View and the Cache



Hi,

Can anyone help me understand the Memory View, Memory Save and the cache?

I paused my application and set the Memory View address but the memory didn't look like I expected so I cleared the L1D Cache check box and the correct data appeared.

I read "Advanced Functions of Memory Window" in the on-line help of CCSV3 (because I couldn't find any more recent documentation) but I'm still confused. I think the help is saying that selecting L1D Cache will ensure that the data will appear even if it is cached in L1D Cache. In other words, selecting the check boxes will ensure that the most recent data is shown regardless of any caching. But I had to clear the checkbox!

I then tried to save the memory by specifying the lowest (where cache is highest) memory address and got the wrong values. Which implies that the data is in the cache and Memory Save doesn't know about cache.

I tried forcing a writeback-invalidate of L1D using L1DWBINV but this made things more confused and I couldn't see the correct data regardless of the checkbox.

So how can I use the Memory Save function in the face of caching?

Can I force a cache writeback from CCS?

I just want to analyse some data that's in memory; I haven't got any problems or cache coherency issues!

My target is a C6455, the data has been placed in IRAM. L1D and L1P are enabled. There is some other data in DDR2 and L2 cache is enabled. I'm using CCSv4.1.3.00038 and a XDS100v2.

Any thoughts greatly appreciated!

Thanks,

Matt

  • Hi Matt,

    MattB said:
    I think the help is saying that selecting L1D Cache will ensure that the data will appear even if it is cached in L1D Cache. In other words, selecting the check boxes will ensure that the most recent data is shown regardless of any caching.

    If the L1D Cache checkbox is enabled, it means it will show the contents in L1D cache. If it is unchecked, the it will bypass L1D Cache and show the value in the next level of memory that is checked (like L2). If everything is unchecked, then it will show what is in actual physical memory for the address.

    MattB said:
    I then tried to save the memory by specifying the lowest (where cache is highest) memory address and got the wrong values. Which implies that the data is in the cache and Memory Save doesn't know about cache.

    Correct. Memory Save would only access what is in the actual memory and not cache.

    MattB said:
    So how can I use the Memory Save function in the face of caching?

    If you want Memory Save to get the contents of cache, I don't think this is currently supported. I will confirm this.

    Thanks

    ki