Forum Discussion
Altera_Forum
Honored Contributor
13 years agoYou can put generics anywhere you like. The error is due to the fact you did not assign a value anywhere. Modelsim would have produced the same error had you tried to elaborate the design.
You can set generics using Quartus and Modelsim commands, however, you can also set a default value in your design, eg,
generic (
width : integer := 8
);
The width generic can then be overridden in Modelsim using vsim option -gwidth=16, and in Quartus via the set_parameter Tcl command (or using the GUI). Cheers, Dave