Forum Discussion
Altera_Forum
Honored Contributor
19 years agoproblem with memcpy
Hi, I want to copy many times a region of memory located in one of my slaves into a local buffer. This ram region is filled by a master, and i use a function which advice me when the ram have b...
Altera_Forum
Honored Contributor
19 years agoHi ochando,
> tried to use the HAL function alt_dcache_flush(), but i couldn't resolve ( i must be doing > something wrong You must invalidate the source (your peripheral) prior to performing read access. > nyway, i will loose too much time if i have to flush the dcache each iteration. I have to think > on it, but by the moment, i'm gonna try using al alternative method, doing a dma from my > own master. No doubt, a good DMA implemenation is much faster. But this won't solve your cache coherency problems: you will still need to invalidate main memory regions prior to accessing data that was transferred via DMA from the peripheral, and you will still need to flush main memory regions prior to DMA transfers to the peripheral. Regards, --Scott