blob: bba55acbed0964668b0d88dc8a4d807c6687b30b (
plain)
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
|
#
# helper functions
#
# restart + run
proc r {} {
restart -f
set sim_start [clock seconds]
run -all
puts "# simulation run time: [clock format [expr [clock seconds] - $sim_start] -gmt 1 -format %H:%M:%S] "
}
# restart with clear
proc rc {} {
.main clear
r
}
# print varables
proc my_debug {} {
global env
foreach key [array names env] {
puts "$key=$env($key)"
}
}
# fast exit
proc e {} {
exit -force
}
# fast exit
proc x {} {
exit -force
}
# get env variables
global env
quietly set top $env(top)
if {[file exists wave.do]} {
do wave.do
} else {
if {[file exists wave_$top.do]} {
do wave_$top.do
} else {
puts "INFO: wave file (wave_$top.do) not found"
}
puts "INFO: no wave file (wave.do) found"
}
set sim_start [clock seconds]
run -all
puts "# simulation run time: [clock format [expr [clock seconds] - $sim_start] -gmt 1 -format %H:%M:%S] "
|