Forum Discussion
Altera_Forum
Honored Contributor
21 years agoI'm a pretty bad programmer, but if you have data cache, I don't think you're writes will be working (volatile doesn't mean the same thing it did in NIOS I). Use the IOWR, IORD to bypass the cache so you're data goes out (or use the HAL stuff if you know how to use it)
Volatile in NIOS II just means it doesn't optimize out the variable. This is why you can't directly upgrade from NIOS I to NIOS II/f (because the compiler wouldn't understand what's suppose to use cache and what is not to use it). One way to check if this is turn is to check to see if the very first write to it worked and nothing else did (nothing else would go to it because it's in cache and therefor not updated) Cheers