--- Quote Start ---
dwh, using tcl is one more thing I need to learn...
you mean that from the tcl I can change the value of generic?
so in your example VERSION and TIMESTAMP are defined in the VHDL code as generics, std_logic_vector or custom type?
--- Quote End ---
The generics were integers, and then down in the control registers code, the integers are changed to std_logic_vector.
Generics can be set from the command-line in Modelsim as well. This is useful for changing timescales, eg. lets say in hardware you blink an LED every 0.5s. To test this in simulation, you'd have to simulate for several seconds. If instead you have a generic real value for the blink time, you can set it to 0.5 for synthesis and 1.0e-6 for simulation. Since the generic can be over-ridden by both tools, there is no need to edit the code, eg., the code can have a default setting for the generic of 0.5.
Cheers,
Dave