Forum Discussion
Altera_Forum
Honored Contributor
10 years agoDefining an array of bytes with a dynamically allocated size
Hello, Can anyone tell me how to define an output to an entity, which is an array of bytes and has a size specified by a generic parameter. I have written a code snippet below which doesn't wor...
Altera_Forum
Honored Contributor
10 years agoarrays can be defined in a package without a length (as long as the "internal" arrays are all length defined pre VHDL2008)
type TArray is array(integer range <>) of unsigned(7 downto 0) ; and then in the entitiy
entity My_entity is
generic (No_of_Bytes : integer := 5);
port (Entity_output : out TArray(No_of_Bytes-1 downto 0);
end entity;