forked from The-OpenROAD-Project/OpenSTA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVariables.tcl
193 lines (151 loc) · 5.88 KB
/
Variables.tcl
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
189
190
191
192
193
# OpenSTA, Static Timing Analyzer
# Copyright (c) 2021, Parallax Software, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
namespace eval sta {
################################################################
#
# Variables
#
################################################################
trace variable ::link_make_black_boxes "rw" \
sta::trace_link_make_black_boxes
proc trace_link_make_black_boxes { name1 name2 op } {
trace_boolean_var $op ::link_make_black_boxes \
link_make_black_boxes set_link_make_black_boxes
}
# Default digits to print after decimal point for reporting commands.
set ::sta_report_default_digits 2
trace variable ::sta_report_default_digits "rw" \
sta::trace_report_default_digits
proc trace_report_default_digits { name1 name2 op } {
global sta_report_default_digits
if { $op == "w" } {
if { !([string is integer $sta_report_default_digits] \
&& $sta_report_default_digits >= 0) } {
sta_error 436 "sta_report_default_digits must be a positive integer."
}
}
}
trace variable ::sta_crpr_enabled "rw" \
sta::trace_crpr_enabled
proc trace_crpr_enabled { name1 name2 op } {
trace_boolean_var $op ::sta_crpr_enabled \
crpr_enabled set_crpr_enabled
}
trace variable ::sta_crpr_mode "rw" \
sta::trace_crpr_mode
proc trace_crpr_mode { name1 name2 op } {
global sta_crpr_mode
if { $op == "r" } {
set sta_crpr_mode [crpr_mode]
} elseif { $op == "w" } {
if { $sta_crpr_mode == "same_pin" || $sta_crpr_mode == "same_transition" } {
set_crpr_mode $sta_crpr_mode
} else {
sta_error 437 "sta_crpr_mode must be pin or transition."
}
}
}
trace variable ::sta_cond_default_arcs_enabled "rw" \
sta::trace_cond_default_arcs_enabled
proc trace_cond_default_arcs_enabled { name1 name2 op } {
trace_boolean_var $op ::sta_cond_default_arcs_enabled \
cond_default_arcs_enabled set_cond_default_arcs_enabled
}
trace variable ::sta_gated_clock_checks_enabled "rw" \
sta::trace_gated_clk_checks_enabled
proc trace_gated_clk_checks_enabled { name1 name2 op } {
trace_boolean_var $op ::sta_gated_clock_checks_enabled \
gated_clk_checks_enabled set_gated_clk_checks_enabled
}
trace variable ::sta_internal_bidirect_instance_paths_enabled "rw" \
sta::trace_internal_bidirect_instance_paths_enabled
proc trace_internal_bidirect_instance_paths_enabled { name1 name2 op } {
trace_boolean_var $op ::sta_internal_bidirect_instance_paths_enabled \
bidirect_inst_paths_enabled set_bidirect_inst_paths_enabled
}
trace variable ::sta_bidirect_net_paths_enabled "rw" \
sta::trace_bidirect_net_paths_enabled
proc trace_bidirect_net_paths_enabled { name1 name2 op } {
trace_boolean_var $op ::sta_bidirect_net_paths_enabled \
bidirect_net_paths_enabled set_bidirect_net_paths_enabled
}
trace variable ::sta_clock_through_tristate_enabled "rw" \
sta::trace_clock_through_tristate_enabled
proc trace_clock_through_tristate_enabled { name1 name2 op } {
trace_boolean_var $op ::sta_clock_through_tristate_enabled \
clk_thru_tristate_enabled set_clk_thru_tristate_enabled
}
trace variable ::sta_preset_clear_arcs_enabled "rw" \
sta::trace_preset_clr_arcs_enabled
proc trace_preset_clr_arcs_enabled { name1 name2 op } {
trace_boolean_var $op ::sta_preset_clear_arcs_enabled \
preset_clr_arcs_enabled set_preset_clr_arcs_enabled
}
trace variable ::sta_recovery_removal_checks_enabled "rw" \
sta::trace_recovery_removal_checks_enabled
proc trace_recovery_removal_checks_enabled { name1 name2 op } {
trace_boolean_var $op ::sta_recovery_removal_checks_enabled \
recovery_removal_checks_enabled set_recovery_removal_checks_enabled
}
trace variable ::sta_dynamic_loop_breaking "rw" \
sta::trace_dynamic_loop_breaking
proc trace_dynamic_loop_breaking { name1 name2 op } {
trace_boolean_var $op ::sta_dynamic_loop_breaking \
dynamic_loop_breaking set_dynamic_loop_breaking
}
trace variable ::sta_input_port_default_clock "rw" \
sta::trace_input_port_default_clock
proc trace_input_port_default_clock { name1 name2 op } {
trace_boolean_var $op ::sta_input_port_default_clock \
use_default_arrival_clock set_use_default_arrival_clock
}
trace variable ::sta_propagate_all_clocks "rw" \
sta::trace_propagate_all_clocks
proc trace_propagate_all_clocks { name1 name2 op } {
trace_boolean_var $op ::sta_propagate_all_clocks \
propagate_all_clocks set_propagate_all_clocks
}
trace variable ::sta_propagate_gated_clock_enable "rw" \
sta::trace_propagate_gated_clock_enable
proc trace_propagate_gated_clock_enable { name1 name2 op } {
trace_boolean_var $op ::sta_propagate_gated_clock_enable \
propagate_gated_clock_enable set_propagate_gated_clock_enable
}
trace variable ::sta_pocv_enabled "rw" \
sta::trace_pocv_enabled
proc trace_pocv_enabled { name1 name2 op } {
trace_boolean_var $op ::sta_pocv_enabled \
pocv_enabled set_pocv_enabled
}
# Report path numeric field width is digits + extra.
set report_path_field_width_extra 5
################################################################
proc trace_boolean_var { op var_name get_proc set_proc } {
upvar 1 $var_name var
if { $op == "r" } {
set var [$get_proc]
} elseif { $op == "w" } {
if { $var == 0 } {
$set_proc 0
} elseif { $var == 1 } {
$set_proc 1
} else {
sta_error 438 "$var_name value must be 0 or 1."
}
}
}
# sta namespace end.
}