summaryrefslogtreecommitdiffstats
path: root/mig_test/simulation/run.do
diff options
context:
space:
mode:
Diffstat (limited to 'mig_test/simulation/run.do')
-rw-r--r--mig_test/simulation/run.do65
1 files changed, 65 insertions, 0 deletions
diff --git a/mig_test/simulation/run.do b/mig_test/simulation/run.do
new file mode 100644
index 0000000..bba55ac
--- /dev/null
+++ b/mig_test/simulation/run.do
@@ -0,0 +1,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] "
OpenPOWER on IntegriCloud