Forum Discussion
Altera_Forum
Honored Contributor
11 years agoI would challenge you to use a case statement in that code.
It really referes to muxes. an if/elsif/else tree builds a priority encoder, whereas a similar casestatement will build a simple mux. But synthesisors are getting better now, so they can work out when a load of if/elseifs are mutually exclusive and therefore build a mux instead of a priority encoder. But unless you really care about logic usage (you probably dont with modern devices - ram and DSP usages are usually the problem areas) you should write readible code, rather than code that is really bady written but saves you a couple of LUTs.