question to generics and ports

Guest #4325564
Rate this post
useful
not useful
For defining the number of ports and not only the width of each port, I 
would recommend using an array, which is defined within a package

within the Package:
1
type tIoArray is array (gNumber -1 downto 0) of std_logic_vector (gWidth - 1 downto 0);

within the entity:
1
entity myEnt is
2
port(
3
  myInput : in tIoArray;
4
  ...
5
);

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now