Forum Discussion
Altera_Forum
Honored Contributor
20 years agoDDR SDRAM vs SSRAM
I've develop a project with 3 Nios II processors and 4 on-chip memories and mutexes. And I'm using a Development kit Cyclone II and Quartus and Nios IDE 5.0. Often in my code the processors n...
Altera_Forum
Honored Contributor
20 years agoHi mendonca,
just a guess: the nios/f has data cache. If another avalon master changes the value of your flag in memory, the nios/f processor doesn't notice, because it loads the value from the cache. If you load the values by using the 'ldwio' opcode, you read the value directly from memory. And depending on your optimization level, the value isn't read at all from memory, only a value in a processor register is checked. You can cirumvent this by adding 'volatile' to your variable declaration. Also, isn't there a hardware mutex component that synchorinzes access to memory between different processors? Wolfgang