Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12408 Discussions

Disable caching for some memory parts

Altera_Forum
Honored Contributor I
806 Views

Hi 

 

I have a TCP/IP stack running on my NIOS. The big part of the data goes directly from the FPGA-HW to a DDR3 memory,  

the stack has only to add some addresses etc. Is it somehow possible to forbid caching of some variables? It is just  

too slow if I have to flush my whole dcache before every DMA-transfer. 

 

Thanks for any help
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
106 Views

Use alt_remap_uncached() to get a pointer you can use for uncached accesses.

Altera_Forum
Honored Contributor I
106 Views

You shouldn't be flushing the entire dcache before doing DMA. There are routines that I have forgotten the name of that will flush only a given area. I don't recommend setting your DMA buffers to be uncached as that will slow down CPU access to that area. After doing a DMA read, invalidate the buffer. Before doing a DMA write, flush the buffer.

Altera_Forum
Honored Contributor I
106 Views

You could allocate some of the memory to be used as tightly-coupled memory for better latency/performance.

Reply