- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Should the C2H wrapper function flush the data cache before
activating the hardware accelerator if the processor has a data cache but doesn't write to the same memory that the accelerated function operates on?Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The cache flush is optional and you only need to use when data is accessed by the CPU and accelerator. Function parameters will be communicated to the accelerator using cache bypassing so you don't have to worry about them. The cache flush is needed if you for example have Nios II populate some buffer, then call the accelerator which then accesses this buffer. The Nios II processor has a writeback cache so the contents written might be still in the cache without the flush. Another example of where the cache flush is needed is if the accelerator writes to a memory location(s) and the CPU needs to access this data after. If you are familiar with cache coherency with multiple processors or processors and DMA engines then the same applies to C2H.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tthanks for your rich reply. Sometimes, some documents are confusing and need to simplify things like what you did!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page