--- Quote Start ---
IF .. GENERATE for the complete component instantian (not only the generic map) works for sure. CONSTANT ARRAY elements for the generic values may work too, but I didn't yet try.
--- Quote End ---
This will work, but you will be instantiating the entity N times in parrallel. This is fine if you dont mind lots of them running at once (maybe thats the point) and can capture all of the output.
But if you just want 1 running at a time in a testbench, you can use TCL. The VSIM command in modelsim has a -g option that allows you to set/override top level generics. You could put the generic list in a constant in a package, then have something like this:
entity my_TB is
generic (
..
GENERIC_SET : integer range my_TB_generics'range;
..
);
end entity my_TB
then using TCL you would start the testbench thus:
VSIM my_TB -gGENERIC_SET=0
Now, because it is TCL you can do loops and things to control every combination of generics. Im not really that up to speed with TCL, but I have seen nice TCL files that allow to test every combination of generics using just a single function (you input all the different values for each generic and it would test every combination of all of them).
PS. generic maps have to be mapped like port maps using => not :=