May 08, 2020
09:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 08, 2020
09:22 AM
Hello,
I'm using TC275, and i have a variable located in cached LMU (shared RAM). I update sequentially it's value from core0 (TC1.6E), then core1 (TC1.6P), then core2 (TC1.6P) but only the first core was able to write into the LMU.
I tested the isync and dsync instructions after writing to that variable, but without effect.
Thanks to everybody,
best greetings!
AA.
I'm using TC275, and i have a variable located in cached LMU (shared RAM). I update sequentially it's value from core0 (TC1.6E), then core1 (TC1.6P), then core2 (TC1.6P) but only the first core was able to write into the LMU.
I tested the isync and dsync instructions after writing to that variable, but without effect.
Thanks to everybody,
best greetings!
AA.
5 Replies
May 08, 2020
11:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 08, 2020
11:23 AM
Do you have data cache enabled? DSYNC will force the store buffers to complete, but it won't purge any writes that are lounging around in DCACHE.
Check CPUx_DCON0: if DCON0.DCBYP=0 (bit 2), data cache is enabled.
The TriCore doesn't have automatic cache coherency, so you have a few ways of forcing the write to become visible to other cores:
- Set CPUx_PMA0 to 0x100 instead of the default 0x300, so LMU data is not cached
- Use the uncached LMU addresses of 0xBxxxxxxx instead of 0x9xxxxxxx
- Invalidate the cache (see this thread: https://www.infineonforums.com/threads/2759-Cache-invalidation)
- Disable data cache
Check CPUx_DCON0: if DCON0.DCBYP=0 (bit 2), data cache is enabled.
The TriCore doesn't have automatic cache coherency, so you have a few ways of forcing the write to become visible to other cores:
- Set CPUx_PMA0 to 0x100 instead of the default 0x300, so LMU data is not cached
- Use the uncached LMU addresses of 0xBxxxxxxx instead of 0x9xxxxxxx
- Invalidate the cache (see this thread: https://www.infineonforums.com/threads/2759-Cache-invalidation)
- Disable data cache
May 08, 2020
02:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 08, 2020
02:20 PM
Thank you for your answer.
Yes, The Dcache was enabled.
Should i understand that there is no way to flush Dcache content into the LMU so the only way is to use LMU no cached either by disabling the Dcache or changing the LMU attribute.
Yes, The Dcache was enabled.
Should i understand that there is no way to flush Dcache content into the LMU so the only way is to use LMU no cached either by disabling the Dcache or changing the LMU attribute.
May 08, 2020
03:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 08, 2020
03:24 PM
See the post I referenced - it is possible to purge the entire cache, or purge individual entries. The other alternatives are much easier.
May 11, 2020
09:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 11, 2020
09:26 AM
Still not solving the problem. My goal is to write into the cached LMU from TC1.6P core, the referenced post helps to flush the Dcache.
May 11, 2020
10:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 11, 2020
10:24 AM
When you have data cache enabled, writes are not purged from the cache until they become the Least Recently Used entries.
Easy solutions include disabling data cache, turning off caching for LMU RAM, or using non-cached addressing for LMU.
Harder solutions include manually purging cache lines with the CACHEA instruction, or invalidating the entire data cache, both included in the previously referenced post.
Easy solutions include disabling data cache, turning off caching for LMU RAM, or using non-cached addressing for LMU.
Harder solutions include manually purging cache lines with the CACHEA instruction, or invalidating the entire data cache, both included in the previously referenced post.