Forum Discussion
Altera_Forum
Honored Contributor
14 years agoBill,
Really good point, thanks for your reply! Truth be told, I should admit that I'm just the intern on this project trying to go the extra mile for my boss. So while I think I have a rough understanding of what we're doing, I can't say that I have completely mastered this code, and so there may very well be things in play here of which I am unaware. That said, I believe one reason we used dead code was to have the system actively detect hardware faults. Something like:
memory_location = SOME_VALUE;
if !(memory_location == SOME_VALUE)
faultyMemoryAlert();
Now, without delving too far into what might prove to be tedious detail, there are probably redundant systems at work in the new setup that might make all of this "dead code" unnecessary. However, given a time constraint we are hoping to port as much of the previous system to the new one. (I've quickly learned that that the time granted for any given project is roughly = timeItTakesToDoItRight/4 ...) The current GCC has an optimization flag to opt out of dead code elimination, I just wanted to make sure that I wasn't overlooking a way to enable a similar flag in the NiosII compiler.