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.

Prefetching from MSRAM to L2

Other Parts Discussed in Thread: TCI6638K2K

Hi,

 

I have a few basic question about prefetching.

Currently, I have some data in L2 memory, that I want to move to MSRAM. I have read in ‘K2 SOC memory performance.doc’ that using if I use prefetching, and a small stride of 16kbytes, I can expect similar latency.

In the corepac manual, I can read in the chapter 7 ‘extended memory controller (XMC)’ that there is a bit to set in MARREG to enable prefetching for MSRAM. I have not read anything else about prefetching.

 

My questions are the following:

1. how prefetching is actually working? When the DSP is accessing the prefetchable data, since the memory zone is prefetchable, does in repeatedly read data in cache, when the current data in cache are being processed?

2. Do I need to add additional code lines when I actuallu process the data? In fact I would have expect comething like:

 

Prefetch data(some data)

Then When first data available

Loop

     prefetch(new data)

   Process(data)

End Loop

 

3. in the cache document, I can find a ‘Touch Assembly Routine’. Is the effect of this routine similar to prefeteching? Is this something that could in some way do the job as in my question 2?

 

Thanks for your anwers.

 

 

  • Hi,

    Can you specify which device are you planning to use (or using) and which SDK?

    Best Regards,
    Yordan
  • Houps sorry I thought I had specified the device. in fact this is for Turbo Nyquist (TI6618) and Kepler (TCI6638K2K). I am not sure about the SDK.

    Nicolas
  • Hello, these are difficult questions. Typically the device is configured by default for the most efficient memory usage, and nothing extra is required from a coding side. If you see a register that looks like it might adjust performance, I would suggest timing the code with/without to see the effect.

    If you want zero-cpu pre-fetching, you might consider using the Multicore Navigator (QM + packet DMA). This can easily move any size blocks from one memory to another, in the background, so that your data will be in MSMC when you need it. It can also perform gather-scatter memory movements.
  • Hi thanks for the answer.

    That is more or the less conclusion I came to! I was expected some software impact as well, but it seems to be really HW managed.

    Clearly we will check the impact on performance, to check if this suits our needs for this specific application.

    Nicolas