Closed riedel-ferringer closed 1 year ago
vsimVersionString and vsimVersion work correctly if running from within the Questa/ModelSim gui.
However if you are running from the command line they do not exist (at least on the windows install), so the exec vsim -version
is to catch those cases. This allows the scripts to return useful values when running Questa/ModelSim from tclsh.
OK, thanks for the clarification.
https://github.com/OSVVM/OSVVM-Scripts/blob/ce28ff0ac38a3ca525786e8757d3187d467ec46e/VendorScripts_Siemens.tcl#L63
I stumbled upon something similar in my own code. The problem here is (as far as I understand) that
exec vsim -version
executes thevsim
which is references in the system'sPATH
variable. Suppose you are using a specific vsim to execute the simulation:.../2023.2/bin/vsim -do "..."
if yourPATH=.../2021.2/bin
thenexec vsim -version
would returnModelSim 2021.2
, which is most probably not the intended result. Unfortunately, I don't know what to do about it. And thevsimVersionString
method works fine anyway. I just wanted to point that out because it took me a while to figure it out :-)BTW, it is not possible to remove the
exec
and just runvsim -version
, because this somehow corrupts ModelSim, which throws an error "No design!" when trying to run the simulation.