How can I generate a single multiplexer with FOR loop.
Here is a snippet what I mean:
CASE test IS
FOR i IN ... LOOP
WHEN i => ... ;
END LOOP;
END CASE;
I am aware that one can put FOR before CASE but in that case it will generate many multiplexers?
You can’t have a loop like that to generate the expressions for a case statement. You can probably do something close to what you want without the case, however, by just using the for loop:
…but if all you’re doing is a simple multiplexer like the above, you don’t need the case or the loop, you can just index directly with your selection signal: