Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
996 Views

iniche memory access between hardware and nios cpu

New here and am having a problem with the iniche stack and the simple socket server. When I see a new tcp session initiated to the simple socket server, i write off the contents of that first packet (the syn) to a memory location which maps to a cpu memory location. I can happily read out the contents that I have written, but there is a massive disconnect if I write back to that memory location in the soft cpu. the hardware side does not see the update, it just reads back what it originally put there. 

 

I believe I have the wires connected properly, but I am not clear if there is another step that i am missing to facilitate what I am trying to do.
0 Kudos
5 Replies
Altera_Forum
Honored Contributor I
21 Views

Your problem description is very consistent with not having taken appropriate precautions with the processor data cache. 

 

Does your NIOS include data cache? Is your software taking any precautions to make sure your written data is leaving the cache?
Altera_Forum
Honored Contributor I
21 Views

 

--- Quote Start ---  

Your problem description is very consistent with not having taken appropriate precautions with the processor data cache. 

 

Does your NIOS include data cache? Is your software taking any precautions to make sure your written data is leaving the cache? 

--- Quote End ---  

 

 

pardon my naivety, but how do i disable the data cache? or even know if the nios is including it? this is my first project leveraging the nios cpu. 

 

thanks
Altera_Forum
Honored Contributor I
21 Views

The settings can be modified by in the Qsys system. You can access the settings wizard in an existing Qsys system by double-clicking on the instance in Qsys. In a new system, you have access to the wizard when you instantiate the component.

Altera_Forum
Honored Contributor I
21 Views

You probably need to use the data cache for normal program accesses to memory - otherwise it will be slower than slow. 

Initially just use uncached accesses to the frame buffer area (if you aren't using the mmu, the easiest way to acomplish this is to set the high bit on the addresses). 

However you'll probably need to use the data cache flush and invalidate functions/instructions to give reasonable performance when accessing the buffers.
Altera_Forum
Honored Contributor I
21 Views

See the "NIOS II Software Developer's Handbook" http://www.altera.com/literature/hb/nios2/n2sw_nii5v2.pdf 

 

Chapter 7 talks about writing drivers, chapter 9 talks about the cache.
Reply