Forum Discussion
Altera_Forum
Honored Contributor
14 years agothis is going to depend on whether its clocked or not.
If its an asynchronous code, you should always have an else or a when others with a signal <= value assignment, otherwise you will create latches (which are generally bad). For synchronous code, it will really depend on what behaviour you want. no else/when others should produce behaviour the same as when you have signal <= signal. But the difference probably comes from how the logic is generated. Without an else/when others, the logic will have a decoded value that connects to the enable input of the register. with the specific selection, it may instead build a mux to the input of the register with nothing connected to the enable input (held at '1'). Hence the small difference in LEs (but exactly the same functionality. The signal <= value case, it has to use the mux option with last input the value rather than a looped back version of the register.