how can is specify with generics how many ports i want and the width of each vector port?
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 | );
|
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.