Forum Discussion
Altera_Forum
Honored Contributor
21 years agoUnoptimizing Code?
I have some code that basically bangs bits out a PPort. At the moment I dont really care how fast it occurs, however; the optimizer, or something is basically makeing my code useles! The code w...
Altera_Forum
Honored Contributor
21 years agoHI! my firts post here.
I think your problem is because optimizer "thinks" that your instructions can be removed because they have not effect on code. Your variable Pport is not readed by nobody after one writting, so that writting is not usefull. To tell to compiler to avoid this behavior, define your variable like this : volatile sometype Pport; Regards