Forum Discussion
Altera_Forum
Honored Contributor
15 years agoIn these cases it is better to use uncached buffers, through the alt_remap_uncached() function. Using the alt_dcache_flush_all() will flush all the data cache (as the name suggests) and it can also have bad side-effects if a DMA is writing to memory at the same time.
That said, I see that you use the pk_alloc() function, that should already return you an uncached buffer, so you shouldn't need to do anything. To be sure, you could add a printf() to display the value of outpkt->nb_buff, in hexadecimal. It should have its bit 31 set. I see that you free the packet just after calling raw_send(). This will work properly only if you ensure that the packet has been sent before raw_send() returns. This could explain why you had to add this option with the Opencores driver, but AFAIK the TSE driver uses a synchronous write, so it doesn't explain why you have the same problem with the TSE.