summaryrefslogtreecommitdiffstats
path: root/src/phys/place/hpwl
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2007-09-30 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2007-09-30 08:01:00 -0700
commite54d9691616b9a0326e2fdb3156bb4eeb8abfcd7 (patch)
treede3ffe87c3e17950351e3b7d97fa18318bd5ea9a /src/phys/place/hpwl
parent7d7e60f2dc84393cd4c5db22d2eaf7b1fb1a79b2 (diff)
downloadabc-e54d9691616b9a0326e2fdb3156bb4eeb8abfcd7.tar.gz
abc-e54d9691616b9a0326e2fdb3156bb4eeb8abfcd7.tar.bz2
abc-e54d9691616b9a0326e2fdb3156bb4eeb8abfcd7.zip
Version abc70930
Diffstat (limited to 'src/phys/place/hpwl')
-rw-r--r--src/phys/place/hpwl57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/phys/place/hpwl b/src/phys/place/hpwl
deleted file mode 100644
index f69a1d05..00000000
--- a/src/phys/place/hpwl
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /usr/bin/perl
-
-$netsfile = shift;
-$plfile = shift;
-
-# ------------------------------ read placement
-
-open FILE, $plfile;
-while (<FILE>) {
- chop;
- if (/(\w+)\s+([\-\d\.]+)\s+([\-\d\.]+)\s+\:/) {
- $loc{$1} = "$2 $3";
- }
-}
-close FILE;
-
-open FILE, $netsfile;
-while (<FILE>) {
- chop;
- $net = $2 if /NetDegree\s+\:\s+(\d+)\s+(\w+)/;
- if (/(\w+)\s+(\w+)\s+\:/) {
- $netconn{$net} .= "$1 ";
- $cellconn{$1} .= "$net ";
- }
-}
-close FILE;
-
-# ----------------------------- compute HPWL
-
-$hpwl = 0;
-foreach $net (keys %netconn) {
- @conns = split ' ',$netconn{$net};
- $min_x = $min_y = 1e12;
- $max_x = $max_y = -1e12;
- foreach $cell (@conns) {
- if (!exists $loc{$cell}) {
- print "WARNING: Unknown cell location: $cell\n";
- } else {
- ($x, $y) = split ' ',$loc{$cell};
- $min_x = $x if $x < $min_x;
- $min_y = $y if $y < $min_y;
- $max_x = $x if $x > $max_x;
- $max_y = $y if $y > $max_y;
- }
- }
-
- if ($min_x eq 1e12 or $min_y eq 1e12 or
- $max_x eq -1e12 or $max_y eq -1e12) {
- print "WARNING: Unbounded box\n";
- } else {
- $hpwl = $hpwl + $max_x - $min_x + $max_y - $min_y;
- }
-}
-
-print "HPWL = ";
-printf "%e",$hpwl;
-print "\n";