I have a VHDL design question. I have N similar entities which take some input and each of them generates an STD_LOGIC output.
Example:
entity example1 is
begin
...
result_1 : out std_logic;
end example1;
entity example2 is
begin
...
result_2 : out std_logic;
end example2;
...
I am looking for a way to aggregate all those single bit results in one UNSIGNED(N - 1 downto 0) result signal V such that V(i) = result_i holds.
Currently, my approach looks like this:
entity ResultAggregation is
port (
result_1 : in std_logic;
result_2 : in std_logic;
aggregate_results : out unsigned(1 downto 0)
);
end ResultAggregation;
architecture Behavioral of ResultAggregation is
begin
aggregate_results <= result_2 & result_1;
end Behavioral;
I find this approach rather clumsy. What I am looking for is a more automated solution, for example that I can provide the number N such that the appropriate pins are generated.
I know this is a rather generic question, but if somebody knows a clever solution please let me know.
Thanks in advance,
Sven