summaryrefslogtreecommitdiff
path: root/qrouter.tcl.in
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-07-12 22:31:02 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2018-07-12 22:31:02 +0200
commit178038ed02d94aaeb341792cce5e3d8f6767e0a5 (patch)
tree12a24a9583adaf2c581866018998d2f43c861e49 /qrouter.tcl.in
parent1fdeebded00f8f9c13229dcf48aca690513c7b00 (diff)
Imported 1.3.103
Diffstat (limited to 'qrouter.tcl.in')
-rw-r--r--qrouter.tcl.in51
1 files changed, 39 insertions, 12 deletions
diff --git a/qrouter.tcl.in b/qrouter.tcl.in
index d13a472..ce5b874 100644
--- a/qrouter.tcl.in
+++ b/qrouter.tcl.in
@@ -17,7 +17,13 @@ if {[string compare $tcl_platform(platform) "windows"] == 0} {
set libext .so
}
-load ${QROUTER_LIB_DIR}/qrouter$libext
+if {${tcl_version} >= 8.6} {
+ if {[catch {load ${QROUTER_LIB_DIR}/qrouter$libext}]} {
+ load -lazy ${QROUTER_LIB_DIR}/qrouter$libext
+ }
+} else {
+ load ${QROUTER_LIB_DIR}/qrouter$libext
+}
package require Qrouter
proc pushnamespace { name } {
@@ -93,7 +99,7 @@ proc qrouter::standard_route {{filename ""} {doquit true}} {
set result [stage1]
if {$result > 0} {
set msize 10
- while {true} {
+ while {$msize <= 100} {
set lastresult $result
puts -nonewline stdout "*** Running stage2 routing"
puts stdout " with options mask $msize, effort 10"
@@ -114,19 +120,40 @@ proc qrouter::standard_route {{filename ""} {doquit true}} {
incr msize 10
}
}
- puts stdout "*** Running stage3 routing with defaults, 1st round"
- set result [stage3]
+ # Attempt a couple of runs at "mask none" if not solved yet
if {$result > 0} {
- puts -nonewline stdout "*** Running stage2 routing"
- puts stdout " with options break, mask none"
- set result [stage2 break mask none]
+ puts -nonewline stdout "*** Running stage2 routing"
+ puts stdout " with options mask none, effort 30"
+ set result [stage2 mask none effort 30]
}
- puts stdout "*** Running stage3 routing with defaults, 2nd round"
- set result [stage3]
if {$result > 0} {
- puts -nonewline stdout "*** Running stage2 routing"
- puts stdout " with options break, mask none"
- set result [stage2 break mask none]
+ puts -nonewline stdout "*** Running stage2 routing"
+ puts stdout " with options mask none, effort 40"
+ set result [stage2 mask none effort 40]
+ }
+
+ # There is no point in running a cleanup stage if there are lots of
+ # unrouted nets.
+ if {$result < 10} {
+ puts stdout "*** Running stage3 routing with defaults, 1st round"
+ set result [stage3]
+ if {$result > 0} {
+ puts -nonewline stdout "*** Running stage2 routing"
+ puts stdout " with options mask none"
+ set result [stage2 mask none]
+ }
+ puts stdout "*** Running stage3 routing with defaults, 2nd round"
+ set result [stage3]
+ set i 0
+ while {$result > 0} {
+ puts -nonewline stdout "*** Running stage2 routing"
+ puts stdout " with options mask none"
+ set result [stage2 mask none]
+ incr i
+ if {$i == 5} {
+ break
+ }
+ }
}
if {$filename != ""} {
puts stdout "*** Writing DEF file $filename"