-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathOsvvmSettingsRequired.tcl
More file actions
188 lines (164 loc) · 7.81 KB
/
OsvvmSettingsRequired.tcl
File metadata and controls
188 lines (164 loc) · 7.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File Name: OsvvmSettingsRequired.tcl
# Purpose: Scripts for running simulations
# Revision: OSVVM MODELS STANDARD VERSION
#
# Maintainer: Jim Lewis email: [email protected]
# Contributor(s):
# Jim Lewis email: [email protected]
#
# Description
# Required initializations for variables.
# DO NOT CHANGE THESE.
# For things users can change, see OsvvmDefaultSettings.tcl
#
# Developed by:
# SynthWorks Design Inc.
# VHDL Training Classes
# OSVVM Methodology and Model Library
# 11898 SW 128th Ave. Tigard, Or 97223
# http://www.SynthWorks.com
#
# Revision History:
# Date Version Description
# 7/2024 2024.07 Set FailOnNoChecks and ClockResetVersion if not already set in OsvvmSettingsLocal (user defined)
# Naming updates. Added WaveFiles default.
# 3/2024 2024.03 Revision Update for release
# Added default values for argc, argv, argv0 for questa -batch
# Sets OsvvmVersionCompatibility if it is not set in LocalScriptDefaults.tcl
# 1/2023 2023.01 Added OsvvmHomeDirectory and OsvvmCoSimDirectory.
# Added options for CoSim
# 5/2022 2022.05 Refactored Variable handling
#
#
# This file is part of OSVVM.
#
# Copyright (c) 2022 - 2025 by SynthWorks Design Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# DO NOT CHANGE THESE SETTINGS
# These settings are required by OSVVM to function properly
# For user settings use LocalScriptDefaults.tcl.
# If you do not have a LocalScriptDefaults.tcl,
# copy Example_LocalScriptDefaults.tcl to LocalScriptDefaults.tcl
#
namespace eval ::osvvm {
variable OsvvmVersion 2026.01
variable OsvvmYamlVersion 0.1
variable OsvvmIndexYamlVersion $OsvvmYamlVersion
variable OsvvmBuildYamlVersion $OsvvmYamlVersion
variable OsvvmTestCaseYamlVersion $OsvvmYamlVersion
# The following are passed to the VHDL Code via OsvvmScriptSettingsPkg
variable OsvvmAlertYamlVersion $OsvvmYamlVersion
variable OsvvmScoreboardYamlVersion $OsvvmYamlVersion
variable OsvvmCoverageYamlVersion $OsvvmYamlVersion
variable OsvvmRequirementsYamlVersion $OsvvmYamlVersion ;# Not currently versioned
# Do not update if user set these already
if {![info exists OsvvmVersionCompatibility]} {
variable OsvvmVersionCompatibility $OsvvmVersion
}
if {![info exists FailOnNoChecks]} {
variable FailOnNoChecks [expr [string compare $OsvvmVersionCompatibility "2024.07"] >= 0]
}
if {![info exists ClockResetVersion]} {
variable ClockResetVersion $OsvvmVersionCompatibility
}
#
# OsvvmTempOutputDirectory - Used as temp directory for output
# DefaultBuildOutputDirectory - Default value if a build is not active
# OsvvmBuildOutputDirectory - Apply default to Build Output Directory
#
# ToolName not set when OsvvmSettingsDefault called
variable OsvvmTempOutputDirectory $OsvvmTempOutputSubdirectory
# variable OsvvmTempOutputDirectory [file join $OutputBaseDirectory $OsvvmTempOutputSubdirectory]
# Default OsvvmBuildOutputDirectory - otherwise it is [file join $OutputBaseDirectory $BuildName]
# variable DefaultBuildOutputDirectory [file join $OutputBaseDirectory $OsvvmTempOutputSubdirectory]
variable DefaultBuildOutputDirectory $OsvvmTempOutputSubdirectory
variable OsvvmBuildOutputDirectory $DefaultBuildOutputDirectory
#
# Formalize settings in OsvvmDefaultSettings + LocalScriptDefaults
# Call OSVVM functions to do parameter checking and normalization
#
if {![info exists VhdlVersion]} {
SetVHDLVersion $DefaultVHDLVersion
}
# SetSimulatorResolution $SimulateTimeUnits ;# SimulateTimeUnits is the definitive value
SetTranscriptType $TranscriptExtension
SetLibraryDirectory $VhdlLibraryParentDirectory
#
# Create derived directory paths
variable OsvvmCoSimDirectory ${OsvvmHomeDirectory}/CoSim
# The following directories are now dynamically created by CheckSimulationDirs - locate these in the build directory
variable ReportsDirectory $InvalidDirectory
variable ResultsDirectory $InvalidDirectory
variable CoverageDirectory $InvalidDirectory
# Dynamically created by StartTranscript
variable LogDirectory $InvalidDirectory
#
# Initialize OSVVM Internals
#
# Wave files for a single simulation run - set by vendor_DoWaves for some simulators
variable WaveFiles ""
#
# Extended TCL information about errors - for debugging
# TCL's errorInfo is saved to these as build finishes
#
variable AnalyzeErrorInfo ""
variable SimulateErrorInfo ""
variable WaveErrorInfo ""
variable BuildErrorInfo ""
variable BuildReportErrorInfo ""
variable SimulateReportErrorInfo ""
variable Simulate2HtmlErrorInfo ""
variable ReportErrorInfo ""
variable Report2HtmlErrorInfo ""
variable Report2JunitErrorInfo ""
variable Log2OsvvmErrorInfo ""
variable BuildStarted "false" ; # Detects if build is running and if build is called, call include instead
variable HaveNotCreatedBuildOutputDirectory "true"
variable BuildName ""
variable BuildStatus "FAILED"
variable LastBuildName ""
variable LastAnalyzedFile ""
variable GenericDict ""
variable GenericNames ""
variable GenericOptions ""
variable RunningCoSim "false"
variable RanSimulationWithCoverage "false"
if {[catch {set OperatingSystemName [string tolower [exec uname]]} err]} {
set OperatingSystemName windows
}
# OsvvmIndex...File - locates index.html for summarizing different builds
variable OsvvmIndexYamlFile [file join ${::osvvm::OutputBaseDirectory} index.yml]
variable OsvvmIndexHtmlFile [file rootname ${::osvvm::OsvvmIndexYamlFile}].html
# OsvvmTempYamlFile: temporary OSVVM name. Moved to ${OutputBaseDirectory}/${BuildName}/${BuildName}.yaml when build finishes
# Both VHDL and Scripts add to this file
variable OsvvmTempYamlFile [file join ${OsvvmTempOutputDirectory} "OsvvmRun.yml"] ;
# TempTranscriptYamlFile: temporary file that contains set of files used in TranscriptOpen. Deleted by scripts.
variable TempTranscriptYamlFile [file join ${OsvvmTempOutputDirectory} "OSVVM_transcript.yml"] ;
# OsvvmTempLogFile: temporary OSVVM name. Moved to ${OutputBaseDirectory}/${BuildName}/${LogSubDirectory}/${BuildName}.log when scripts complete
# Created in temporary space since BuildName may not have been established yet.
variable OsvvmTempLogFile [file join ${OsvvmTempOutputDirectory} "OsvvmBuild.log"] ;
# Error handling
variable AnalyzeErrorCount 0
variable LastAnalyzeHasError FALSE
variable ConsecutiveAnalyzeErrors 0
variable SimulateErrorCount 0
variable ConsecutiveSimulateErrors 0
variable ScriptErrorCount 0
variable GotTee false
# Initial saved values for ErrorStopCounts
variable SavedAnalyzeErrorStopCount $AnalyzeErrorStopCount
variable SavedSimulateErrorStopCount $SimulateErrorStopCount
}