So, I recently inherited some VHDL code, and my first reaction was: "VHDL has structures, why do they use bit vectors everywhere?" And then I realized that this is because there seems to be no way to write something like this:
entity Queue is
generic (
EL : type
);
port (
data_in : EL;
data_out : EL;
...
);
end entity Queue;
I really wanted it to be possible. Is there anything even remotely approximating this? Even if I need to re-declare entity or component declarations, just somehow somehow avoid re-typing the architecture definition for each type (modulo total width)?
source
share