Forum Discussion
Altera_Forum
Honored Contributor
15 years agogenral software problem
im writing a simple clock program for a niosII standard processor and i encountered this bug in my main loop i have an infinite loop which updates all the seven segments(DE2 board) like
w...
Altera_Forum
Honored Contributor
15 years agoCould well be.
Without a function call (a call to any globally visible function should do) the compiler can/will cache all 'time' variables in registers. Marking them as 'volatile' will force the compiler to issue a memory read for each loop iteration.