I have an 8-bit signal all_inputs that I am feeding into a selected signal assignment on a signal W1, as shown below:
with all_inputs select W1 <=
'1' when "010001",
'1' when "100100",
'1' when "001100",
'0' when others;
I want to know if there is a way to combine the string literals into one line to write it more compactly. If I had more signal values to add, it would get tedious quickly. I've tried:
with all_inputs select W1 <=
'1' when "010001" or "100100" or "001100",
'0' when others;
Which does synthesize, but seems to treat the expression as a bitwise OR operation, where I want a logical treatment of these values. Surrounding the string literals with ()s gives me a syntax error.
Any ideas on how I can make these assignments a little more compact?