Osvvm LocalScriptsDefault.tcl location
Why OSVVM™? › Forums › OSVVM › Osvvm LocalScriptsDefault.tcl location
- This topic has 1 reply, 2 voices, and was last updated 5 days, 6 hours ago by
Jim Lewis.
-
AuthorPosts
-
November 22, 2025 at 01:55 #2813
Senthil
MemberHi Jim,
I have a local LocalScriptsDefault.tcl to direct Osvvm outputs to a different directory by updating this variable,
variable OutputHomeDirectory <new path>
What is the location the LocalScriptsDefault.tcl needs to be stored to be picked up. Is it preferred to use env variable OSVVM_SETTINGS_DIR to point to the file?Regards,
-SenthilNovember 22, 2025 at 14:48 #2814
Jim LewisMemberHi Senthil,
Settings have changed through time. What I say here pertains to the current release, 2025.06a. Typically I try to keep changes backward compatible – to the degree that they originally worked. Note that $OsvvmLibraries is a Tcl variable in the OSVVM Script environment (set by calling $OsvvmLibraries/Scripts/StartUp.tcl).You will find a “how to” for OSVVM’s tcl and vhdl settings documented in OsvvmSettings_user_guide.pdf in OsvvmLibraries/Documentation. With respect to finding the settings files, it says:
6 OSVVM Settings Directory for VHDL and Script Settings
The OSVVM Settings Directory for VHDL and Script settings is found in the directory specified by joining the Tcl variables $SettingsRootDirectory, $SettingsDirectory, and $::osvvm::OsvvmSettingsSubDirectory.The SettingsRootDirectory is $OsvvmLibraries. $OsvvmLibraries is the location of your OsvvmLibraries install. $OsvvmLibraries is a Tcl variable set by the scripts when started with $OsvvmLibraries/Scripts/StartUp.tcl.
The SettingsDirectory is determined by the first of the following found:
• Environment variable OSVVM_SETTINGS_DIR – (highest precedence)
• Directory $OsvvmLibraries/../OsvvmSettings
• Directory $OsvvmLibraries/osvvm for vhdl settings and $OsvvmLibraries/Scripts for script settings – (lowest precedence)The OSVVM_SETTINGS_DIR variable can contain either an absolute path or a relative path. If OSVVM_SETTINGS_DIR contains an absolute path, then the path of $OsvvmLibraries in the join is ignored.
$::osvvm::OsvvmSettingsSubDirectory is set by OsvvmSettingsLocal.tcl. As a result, this value is “” for scripts (since OsvvmSettingsLocal.tcl has not been called yet). If multiple simulators are being used, set OsvvmSettingsSubDirectory as follows:
set OsvvmSettingsSubDirectory ${ToolName}In past releases settings were in $OsvvmLibraries/Scripts or $OsvvmLibraries/osvvm (for VHDL settings). Having settings in the OsvvmLibraries directory structure caused Git to notice the changes. This is awkward if the project does not otherwise update OsvvmLibraries. The first fix to this was to offer an OsvvmSettings directory that is in the same directory that contains OsvvmLibraries. The OSVVM_SETTINGS_DIR was added for more flexibility WRT locations. Some of the decision for me is what needs to go on backups and what does not. Settings need to be backed up. Things already in Git do not.
Note here it references OsvvmSettingsLocal.tcl, as that is the current recommended file name for tcl settings. LocalScriptsDefault.tcl is the old name, but it is expected to be found in $OsvvmLibraries/Scripts and is only searched for if OsvvmSettingsLocal.tcl is not found. The code that selects these is:
# -------------------------------- # Load User settings # Get Directory for User settings variable ::osvvm::OsvvmUserSettingsDirectory [FindOsvvmSettingsDirectory "Scripts"] # Settings Second: OSVVM User/Project Customizations - not required if {[file exists ${::osvvm::OsvvmUserSettingsDirectory}/OsvvmSettingsLocal.tcl]} { # Found in OSVVM_SETTINGS_DIR source ${::osvvm::OsvvmUserSettingsDirectory}/OsvvmSettingsLocal.tcl } elseif {[file exists ${::osvvm::OsvvmScriptDirectory}/OsvvmSettingsLocal.tcl]} { # Deprecated. Found in Scripts Directory - backward compatible source ${::osvvm::OsvvmScriptDirectory}/OsvvmSettingsLocal.tcl } elseif {[file exists ${::osvvm::OsvvmScriptDirectory}/LocalScriptDefaults.tcl]} { # Deprecated: Uses old name - backward compatible source ${::osvvm::OsvvmScriptDirectory}/LocalScriptDefaults.tcl }I have noted that this section is real important and will move to the front of the user guide (section 2) in the next release.
Best Regards,
Jim -
AuthorPosts
- You must be logged in to reply to this topic.