How to solve a problem with declaring port as array type?
I want to make entity multiplexer like this:
I want to make entity multiplexer like this:
Code:
entity multiplexer is
generic(
sel_bits: integer := 2;
data_width: integer := 1
);
port(
input: in array (2**sel_bits-1 downto 0) of bit_vector(data_width-1 downto 0); -- this won't do. I could use package, but is there this kind of solution?
output: out bit_vector(data_width-1 downto 0);
sel: in bit_vector (sel_bits-1 downto 0)
);
end entity multiplexer;