Hello,
lets say i have some signal select_signal, and that is one-hot type of a signal, so at any time only one of its bits is 1, others are 0.
The number of bits in that signal depends on the GENERIC statement describing the top entity.
Now i want to create a MUX which will use that select_signal as a control signal, and of course which will also depend on the number of bits defined in top level entity.
now what would be the most compact, nice and efficient method to do that with generate statement?
for example its possible to do in VHDL things like that:
as you see there i am assigning bit #127 value 1, others are zeros.
Now in my problem it has to be vice versa, i must inside the generate statement create such a mux which compares specific bit and makes sure that others are zero..
any thoughts?
thank you
lets say i have some signal select_signal, and that is one-hot type of a signal, so at any time only one of its bits is 1, others are 0.
The number of bits in that signal depends on the GENERIC statement describing the top entity.
Now i want to create a MUX which will use that select_signal as a control signal, and of course which will also depend on the number of bits defined in top level entity.
now what would be the most compact, nice and efficient method to do that with generate statement?
for example its possible to do in VHDL things like that:
Code:
my_signal <= (127 => '1', others=>'0');
as you see there i am assigning bit #127 value 1, others are zeros.
Now in my problem it has to be vice versa, i must inside the generate statement create such a mux which compares specific bit and makes sure that others are zero..
any thoughts?
thank you