Forum Discussion
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- Hello cprodrigues, I see that there could be latches produced from the above code. This is because the signals are not assigned values in all reachable statements. Please correct that. Latches are not preferred in a very good logic design as they have unpredictable results or they generate glitches during the operation. In the mean time you can design a state machine that does the above job in a very nice and glitch free way. I see that int_flash_en signal will have very tight timing as you are checking the signal with in the process as well as assigning the same signal with different value. Please check your timing. This could be also a problem. all the best. --- Quote End --- There are no latches as it is a clocked process. When a signal is set, it's enable input is set high, with a mux selecting what input to use. I will have a look at the code, and give my thoughts. As for the reset, you probably didnt notice any difference. But you really should have it in the sensitivity list. Any inputs that affect outputs need to be in there. In the case of a clocked process, because things only change on clock edges, only the clock needs to be there.