I'm needing to create a 4 bit, 16 input multiplexer. I know I could describe this as a long list of S => when "0000"
etc.. but I think that's not very clean, and I'd like to opt for a generic n-bit multiplexer so I can reuse it later for more inputs or whatever.
How would you do this?
Best Answer
It's like this:
Hope that helps!
Addition: If you'd need a multiple bit wide mux then...
This is where VHDL gets a little bit wordy, since sometimes it's not "compact" to fill in that data bus array just to do a simple mux. But, there you have it...