Forum Discussion
Altera_Forum
Honored Contributor
13 years agoProblem with IORD and IOWR instructions
Dear all, I have a qsys system composed of two NIOS that can access a shared memory (data masters are connected to the memory), when I use the instructions IORD and IOWR I don't obtain the r...
Altera_Forum
Honored Contributor
13 years agoAre you compiling with optimizations enabled? I could see your delay loop getting optimized away since variables i and j are not used. Compilers look for code like that a remove it when optimizations are enable since it's a waste of CPU cycles.
In general using delays as synchronization points is very error prone. You should use flags in shared memory... or better yet use a mutex since if you work with a system with multiple data widths sharing information through shared memory is not safe either due to race conditions.