[qflow] 10/11: Corrected place2def.tcl, which would greedily take the first underscore and so screw up output on cell names that contain an underscore as part of the name.

Ruben Undheim rubund-guest at moszumanska.debian.org
Thu Apr 16 18:01:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

rubund-guest pushed a commit to tag upstream/1.0.93
in repository qflow.

commit ab0e1fc62cb393111a3f235502e0ef4b8b6dac26
Author: Tim Edwards <tim at opencircuitdesign.com>
Date:   Mon Mar 30 19:35:22 2015 -0400

    Corrected place2def.tcl, which would greedily take the first
    underscore and so screw up output on cell names that contain
    an underscore as part of the name.
---
 scripts/place2def.tcl | 58 ++++++++++++++++++++++++++++++++-------------------
 1 file changed, 37 insertions(+), 21 deletions(-)

diff --git a/scripts/place2def.tcl b/scripts/place2def.tcl
index 52df28b..79c63e2 100755
--- a/scripts/place2def.tcl
+++ b/scripts/place2def.tcl
@@ -97,6 +97,22 @@ if [catch {open $infoname r} finf] {
    set widthx 160
    set widthy 200
 
+   set numlayers 3
+   for {set i 1} {$i <= $numlayers} {incr i 2} {
+      set metal${i}(name) metal${i}
+      set metal${i}(pitch) $pitchx
+      set metal${i}(orient) horizontal
+      set metal${i}(offset) $offsetx
+      set metal${i}(width) $widthx
+   }
+   for {set i 2} {$i <= $numlayers} {incr i 2} {
+      set metal${i}(name) metal${i}
+      set metal${i}(pitch) $pitchy
+      set metal${i}(orient) vertical
+      set metal${i}(offset) $offsety
+      set metal${i}(width) $widthy
+   }
+
 } else {
 
    set i 0
@@ -131,27 +147,27 @@ if [catch {open $infoname r} finf] {
    }
    close $finf
    if {($numlayers == 0) || ($numlayers > $i)} {set numlayers $i}
+}
 
-   # NOTE:  Treating all pitches the same for all layers in the same
-   # direction.  This is good for doing various calculations on cell
-   # and pin positions.  The track positions themselves will be placed
-   # according to the given route layer pitch.
-
-   if {$metal1(orient) == "horizontal"} {
-      set pitchx [expr 100 * $metal2(pitch)]
-      set pitchy [expr 100 * $metal1(pitch)]
-      set offsetx [expr 100 * $metal2(offset)]
-      set offsety [expr 100 * $metal1(offset)]
-      set widthx [expr 100 * $metal2(width)]
-      set widthy [expr 100 * $metal1(width)]
-   } else {
-      set pitchx [expr 100 * $metal1(pitch)]
-      set pitchy [expr 100 * $metal2(pitch)]
-      set offsetx [expr 100 * $metal1(offset)]
-      set offsety [expr 100 * $metal2(offset)]
-      set widthx [expr 100 * $metal1(width)]
-      set widthy [expr 100 * $metal2(width)]
-   }
+# NOTE:  Treating all pitches the same for all layers in the same
+# direction.  This is good for doing various calculations on cell
+# and pin positions.  The track positions themselves will be placed
+# according to the given route layer pitch.
+
+if {$metal1(orient) == "horizontal"} {
+   set pitchx [expr 100 * $metal2(pitch)]
+   set pitchy [expr 100 * $metal1(pitch)]
+   set offsetx [expr 100 * $metal2(offset)]
+   set offsety [expr 100 * $metal1(offset)]
+   set widthx [expr 100 * $metal2(width)]
+   set widthy [expr 100 * $metal1(width)]
+} else {
+   set pitchx [expr 100 * $metal1(pitch)]
+   set pitchy [expr 100 * $metal2(pitch)]
+   set offsetx [expr 100 * $metal1(offset)]
+   set offsety [expr 100 * $metal2(offset)]
+   set widthx [expr 100 * $metal1(width)]
+   set widthy [expr 100 * $metal2(width)]
 }
 
 # Add numlayers to the configuration file now that we know it
@@ -544,7 +560,7 @@ while {[gets $fpl1 line] >= 0} {
 	 }
 
          # Get cellname from instance name.
-         regsub {([^_]+)_[\d]+} $instance {\1} cellname
+         regsub {(.+)_[\d]+} $instance {\1} cellname
       }
 
       set llxoff [expr $llx - $cellxbot]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/qflow.git



More information about the debian-science-commits mailing list