Forum Discussion
Altera_Forum
Honored Contributor
13 years agoIf n is static per simulation run, then use a generic.
If n needs to change during the simulation, then either dynamically create the std_logic_vector, or use a vector with a width that is the maximum value for n. In that case, use a subtype for port n that restricts the values for n, eg., subtype n_t is natural range 0 to 2000. Cheers, Dave