UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor wenwei
Visitor
13,342 Views

what is the difference between cache invalidate and cache flush?

If one function has updated variables that are cached, does it need to invalidate it or flush it?
For other functions that need to see the new values of the variables updated (and invalidated/flushed) by the first one, do they need to flush the cache or invalidate it when reading?
Thanks for help.

-Wenwei

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
13,322 Views

Re: what is the difference between cache invalidate and cache flush?

See other thread for your specific case: It is probably not so much about caches, but more about volatiles.

 

A cache invalidate simply marks the cache contents as invalid. So the next time you access data, you will get what is in memory. A cache flush writes back data from cache into memory. These two will differ only when memory contents get out of sync with cache contents, which will happen only when you have DMA or a 2nd processor writing to the same memory location.

0 Kudos