forked from OSVVM/OSVVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OsvvmSettingsPkg_default.vhd
177 lines (151 loc) · 9.12 KB
/
OsvvmSettingsPkg_default.vhd
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
--
-- File Name: OsvvmSettingsPkg_default.vhd
-- Design Unit Name: OsvvmSettingsPkg
-- Revision: STANDARD VERSION
--
-- Maintainer: Jim Lewis email: [email protected]
--
-- Description:
-- OSVVM Settings package body
-- The package body, OsvvmSettingsPkg_default.vhd contains the current
-- defaults supplied by OSVVM.
-- To change these, create a package body with the revised settings
-- in the file OsvvmSettingsPkg_local.vhd
--
-- If the file OsvvmSettingsPkg_local.vhd exits it will be analyzed by
-- the scripts if it exists, otherwise, OsvvmSettingsPkg_default.vhd
-- will be analyzed.
--
-- Developed for:
-- SynthWorks Design Inc.
-- VHDL Training Classes
-- 11898 SW 128th Ave. Tigard, Or 97223
-- http://www.SynthWorks.com
--
-- Revision History:
-- Date Version Description
-- 09/2024 2024.09 Added ALERT_LOG_IGNORE_SPACES and ALERT_LOG_IGNORE_EMPTY_LINES
-- 07/2024 2024.07 Added ALERT_LOG_NOCHECKS_NAME and ALERT_LOG_TIMEOUT_NAME
-- 03/2024 2024.03 Major updates
-- 09/2023 2023.09 Initial
--
-- This file is part of OSVVM.
--
-- Copyright (c) 2023 - 2024 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.
--
use work.IfElsePkg.all ;
use work.OsvvmScriptSettingsPkg.all ;
package body OsvvmSettingsPkg is
-- ------------------------------------------
-- Settings for RandomPkg
-- ------------------------------------------
-- RandomPkg.InitSeed:
-- For new designs, make this TRUE.
-- For old designs, changing it will change your randomization. If you need that exact pattern, then do not change.
constant RANDOM_USE_NEW_SEED_METHODS : boolean := IfElse(OSVVM_SETTINGS_REVISION >= "2024", TRUE, FALSE) ; -- Historic FALSE
-- ------------------------------------------
-- Settings for ScoreboardGenericPkg
-- ------------------------------------------
-- WriteScoreboardYaml
constant SCOREBOARD_YAML_IS_BASE_FILE_NAME : boolean := IfElse(OSVVM_SETTINGS_REVISION >= "2024", TRUE, FALSE) ; -- Historic FALSE
-- ------------------------------------------
-- Settings shared by AlertLogPkg and CoveragePkg
-- ------------------------------------------
constant OSVVM_PRINT_PREFIX : string := "%% " ;
constant OSVVM_DONE_NAME : string := "DONE" ;
constant OSVVM_PASS_NAME : string := "PASSED" ;
constant OSVVM_FAIL_NAME : string := "FAILED" ;
constant OSVVM_DEFAULT_TIME_UNITS : time := 1 ns ;
-- ------------------------------------------
-- Settings for CoveragePkg
-- ------------------------------------------
-- InitSeed: When TRUE uses updated seed methods. TRUE for coverage singleton.
constant COVERAGE_USE_NEW_SEED_METHODS : boolean := TRUE ;
constant COVERAGE_DEFAULT_WEIGHT_MODE : string := IfElse(OSVVM_SETTINGS_REVISION >= "2024", string'("REMAIN"), "AT_LEAST") ;
constant COVERAGE_PRINT_PREFIX : string := OSVVM_PRINT_PREFIX ;
constant COVERAGE_PASS_NAME : string := OSVVM_PASS_NAME ;
constant COVERAGE_FAIL_NAME : string := OSVVM_FAIL_NAME ;
-- WriteBin Settings - not relevant if you use the HTML reports
constant COVERAGE_WRITE_PASS_FAIL : boolean := FALSE ;
constant COVERAGE_WRITE_BIN_INFO : boolean := TRUE ;
constant COVERAGE_WRITE_COUNT : boolean := TRUE ;
constant COVERAGE_WRITE_ANY_ILLEGAL : boolean := FALSE ;
-- ------------------------------------------
-- Settings for AlertLogPkg
-- ------------------------------------------
-- Control printing of Alert/Log
constant ALERT_LOG_JUSTIFY_ENABLE : boolean := IfElse(OSVVM_SETTINGS_REVISION >= "2024", TRUE, FALSE) ; -- Historic FALSE - Do not Justify printing
constant ALERT_LOG_WRITE_TIME_FIRST : boolean := IfElse(OSVVM_SETTINGS_REVISION >= "2024", TRUE, FALSE) ; -- Historic FALSE
constant ALERT_LOG_WRITE_TIME_LAST : boolean := not ALERT_LOG_WRITE_TIME_FIRST ;
constant ALERT_LOG_TIME_JUSTIFY_AMOUNT : integer := IfElse(OSVVM_SETTINGS_REVISION >= "2024", 9, 0) ; -- Justify time - particularly when at beginning
-- File Match/Diff controls
constant ALERT_LOG_IGNORE_SPACES : boolean := FALSE ; -- Historic FALSE
constant ALERT_LOG_IGNORE_EMPTY_LINES : boolean := FALSE ; -- Historic FALSE
-- Boolean controls to print or not print fields in Alert/Log
constant ALERT_LOG_WRITE_ERRORCOUNT : boolean := FALSE ; -- prefix message with # of errors - requested by Marco for Mike P.
constant ALERT_LOG_WRITE_NAME : boolean := TRUE ; -- Print Alert/Log
constant ALERT_LOG_WRITE_LEVEL : boolean := TRUE ; -- Print Level Name
constant ALERT_LOG_WRITE_TIME : boolean := TRUE ; -- Print Level Name
constant ALERT_LOG_ALERT_NAME : string := "Alert" ;
constant ALERT_LOG_LOG_NAME : string := "Log " ;
constant ALERT_LOG_ID_SEPARATOR : string := ": " ;
constant ALERT_LOG_PRINT_PREFIX : string := OSVVM_PRINT_PREFIX ;
constant ALERT_LOG_DONE_NAME : string := OSVVM_DONE_NAME ;
constant ALERT_LOG_PASS_NAME : string := OSVVM_PASS_NAME ;
constant ALERT_LOG_FAIL_NAME : string := OSVVM_FAIL_NAME ;
-- Handled by scripts. Generate NOCHECKS, scripts handles whether it is an error or PASSED.
-- constant ALERT_LOG_NOCHECKS_NAME : string := IfElse(OSVVM_SETTINGS_REVISION >= "2024.07", "NOCHECKS", "PASSED") ;
constant ALERT_LOG_NOCHECKS_NAME : string := "NOCHECKS" ;
constant ALERT_LOG_TIMEOUT_NAME : string := "TIMEOUT" ;
-- Defaults for Stop Counts
constant ALERT_LOG_STOP_COUNT_FAILURE : integer := 0 ;
constant ALERT_LOG_STOP_COUNT_ERROR : integer := integer'high ; -- VUnit 1
constant ALERT_LOG_STOP_COUNT_WARNING : integer := integer'high ;
-- Allows disabling alerts at startup - and then turn them on at or near system reset
constant ALERT_LOG_GLOBAL_ALERT_ENABLE : boolean := TRUE ;
-- requirements
constant ALERT_LOG_DEFAULT_PASSED_GOAL : integer := 1 ;
-- Control what makes a test failure
constant ALERT_LOG_FAIL_ON_WARNING : boolean := TRUE ;
constant ALERT_LOG_FAIL_ON_DISABLED_ERRORS : boolean := TRUE ;
constant ALERT_LOG_FAIL_ON_REQUIREMENT_ERRORS : boolean := TRUE ;
-- ReportAlerts Settings
constant ALERT_LOG_REPORT_HIERARCHY : boolean := TRUE ; -- ReportAerts
constant ALERT_LOG_PRINT_PASSED : boolean := TRUE ; -- ReportAlerts: Print PassedCount
constant ALERT_LOG_PRINT_AFFIRMATIONS : boolean := FALSE ; -- ReportAlerts: Print Affirmations Checked
constant ALERT_LOG_PRINT_DISABLED_ALERTS : boolean := FALSE ; -- ReportAlerts: Print Disabled Alerts
constant ALERT_LOG_PRINT_REQUIREMENTS : boolean := FALSE ; -- ReportAlerts: Print requirements
constant ALERT_LOG_PRINT_IF_HAVE_REQUIREMENTS : boolean := TRUE ; -- ReportAlerts: Print requirements if have any
--!! -- Defaults for Log Enables
--!! constant LOG_ENABLE_INFO : boolean := FALSE ;
--!! constant LOG_ENABLE_DEBUG : boolean := FALSE ;
--!! constant LOG_ENABLE_PASSED : boolean := FALSE ;
--!! constant LOG_ENABLE_FINAL : boolean := FALSE ;
--!!
--!! -- Controls for default Alert enables
--!! constant ALERT_ENABLE_FAILURE : boolean := TRUE ; -- TRUE and not setable
--!! constant ALERT_ENABLE_ERROR : boolean := TRUE ; -- TRUE and not setable
--!! constant ALERT_ENABLE_WARNING : boolean := TRUE ; -- TRUE and not setable
--!!
--!! There does not seem to be any compelling reason for these
--!! Instead, I suspect code will be optimized better if these are merged into a single ALERT_LOG value
--!! -- Controls that split the Alert/Log controls separately
--!! constant ALERT_WRITE_ERRORCOUNT : boolean := ALERT_LOG_WRITE_ERRORCOUNT ; -- Prefix message with # of errors
--!! constant ALERT_WRITE_LEVEL : boolean := ALERT_LOG_WRITE_LEVEL ; -- Print FAILURE, ERROR, WARNING
--!! constant ALERT_WRITE_NAME : boolean := ALERT_LOG_WRITE_NAME ; -- Print Alert Message
--!! constant LOG_WRITE_ERRORCOUNT : boolean := ALERT_LOG_WRITE_ERRORCOUNT ; -- Prefix message with # of errors
--!! constant LOG_WRITE_LEVEL : boolean := ALERT_LOG_WRITE_LEVEL ; -- Print ALWAYS, INFO, DEBUG, FINAL, PASSED
--!! constant LOG_WRITE_NAME : boolean := ALERT_LOG_WRITE_NAME ; -- Print Log Message
end package body OsvvmSettingsPkg ;