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.

DSP/BIOS: BCACHE_setMode() Context, and cache optimizations.

Hi,

I was wondering in what context does the BCACHE_setMode() run ? For example, if I run "BCACHE_setMode(BCACHE_L1D ,BCACHE_FREEZE)" in a low priority task will L1D be frozen for the entire system or just that specific task.

Lastly, are there any cache/memory analysis tools for observing cache evictions and misses. Furthermore, are there any tools which would aid me in proper placement of my data/code into the DDR for optimal cache hits.

 

Note: We are using BIOS 5.33.05 / DSPLink 1.65.00.03 on the OMAP-L138 with Linux on the ARM Core.

 

Thank you very much,

Arya B.

  • Upon further investigation it seems the standard "BCACHE_setMode" will globally disable caching in the system. Which brings me to the question is there a way to freeze the cache based on which task/SWI is running?

    Thanks.

  • Hi Arya,

    Correct, the BCACHE functions are not task/SWI specific. You can plug in a hook function (look at the HOOK module for more details) that could be used to enable/disable cache as needed when a content switch occurs.

    Todd

  • Hi Todd,

     

    Thank you very much for the rapid response, seems like the HOOK module is exactly what I need. Moreover, do you know of any cache analysis tools for my version the DSP/BIOS? I know there are much better tools for the newer SYS/BIOS, however, we are not able to upgrade at the moment.

    Lastly, what would be the optimal way of optimizing our L1D cache hits? For example, what would be the best way of going through the map file and rearranging memory locations?

     

    Thanks,

    Arya B.

     

  • Arya,

    I know that CCS has some cache analysis tools. You might want to post a question to that forum (http://e2e.ti.com/support/development_tools/code_composer_studio/f/81.aspx).

    Todd

  • Hi Todd,

    Will do. Also, quick question about the HOOK module. From what I have read it seems like the HOOK module is a wrapper on the TSK module. It seems it will notify me of context switches between tasks. However, how will I know if a given task was interrupted by a higher priority HWI? Because I am attempting to have the L1 cache enabled for all HWI/SWI and disabled on most tasks.

     

    Thanks,

    Arya B.

  • Hi Arya,

    You are right. These are TSK hooks.

    Since you are writing the HWI and SWI functions, you could put the logic directly in the function. You'll need to store the current cache settings in your HWI/SWI, set it to the desired setting and do the HWI/SWI . Then at the end, restore to the previous cache setting.

    Todd