Forum Discussion
Altera_Forum
Honored Contributor
10 years ago --- Quote Start --- The synthesis tool noticed that all of the if statements are in parallel, so it chooses the very last one to implement. It should reduce it to a combinatorial latch that clears all of the output bits once it sees all of the input bits set; there is no way for it to set any of the output bits --- Quote End --- In fact it is inside a process, so each "if" statement will be evaluated by the synthesizer to generate the logic. But I agree that a "case" statement would be more elegant. In both cases it is advisable to also put a default output (either before all the ifs in the original example, or as an "others" case statement) to avoid generation of latches if we forgot an input value.