You cannot have such a loop to generate expressions for the case statement. You can probably do something close to what you want, without considering this, simply using the for loop:
FOR i IN ... LOOP IF test = i then output <= myarray(i); END IF; END LOOP;
... but if all you do is a simple multiplexer like the one above, you donβt need a loop or , you can just index directly with your select signal:
output <= myarray(to_integer(test));
source share