Hi there, I have a gradually input-upwards multiplexer. I designed a general 3 bit input multiplexer with one select input and one output. My question is, that in the first level MUX_0 from the 3 bit-input I am using only one bit, so accordingly
MUX_0 = 1 bit input usage
MUX_1 = 2 bit input usage
MUX_2 = 3 bit input usage
How I declare in MUX_0 and MUX_1 the non input bit in the port map? I have been already tried with the keyword "open" but it doesn't work. A small example of my code which doesn't work see below.
I would expect a useful default in the entity definition, if so you can simply omit the port association. You can also assign value 'X';
Not sure how one select input bit can control a 3-bit mux?
Showing your code other than just your port map might help. And, as FVM said, how can you control a 3-input mux with one select line?
Generally, if you're not using an input, just assign it a value. Again, without seeing your code it's impossible to see why assigning a '0' caused a problem. The error you're seeing I think occurs when you assign a value of different size than the target, for example, assigning a single-bit value to a multi-bit vector.
My code is huge, each operand has 4 bit input, its a carry select adder. I need to fix it because I have to use the for - generate statement. Yeah you have right. The input must be something, otherwise won't work.