Forum Discussion
Altera_Forum
Honored Contributor
11 years agoDoes quartus complain about your code? If so, that is probably a hint as to why it is doing what it is doing.
But as kaz suggested, if you restructure your code with the reset condition at the highest priority, and the adder at the lowest priority, it will probably work as you expect. See example 13-39 of the Recommended HDL Coding Styles: http://www.altera.com/literature/hb/qts/qts_qii51007.pdf