Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- Are 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. --- Quote End --- Hi BadOmen, where enable the optimizations? I'm using the default setting of NIOS II SBT tool to compile both codes I want in a first step be sure of the functioning of IORD and IOWR and then use the mutex to access the shared memory any help will be appreciated, Thanks