How can I update or verify the content of the MicroBlaze instruction and data cache? Is it possible to write to the data or instruction cache? Is it possible to view or verify the cache content via GDB or XMD ?
The MicroBlaze instruction set includes two instructions for changing the cache content. You can use the WIC (Write Instruction Cache) and the WDC (Write Data Cache) instructions to write to the cache if the cache is disabled. In EDK 3.2, GDB and XMD do not support a feature for viewing the content stored in the MicroBlaze cache. There are more cache-related functions, such as disabling the cache using "microblaze_disable_icache()" or "microblaze_disable_dcache()". For more information, refer to the EST User Guide and the MicroBlaze Reference Guide in your EDK installation.
You cannot view the cache content with GDB or XMD. However, there is a simple way of verifying it. By executing at that address, MicroBlaze should execute the instructions that were written into the cache.
For example, if you have some code at an address (in memory), and you write different code to the cache at the same address using the WIC instruction. If you now jump to that address, the code written into the cache is executed rather than the code in memory.