summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2019-10-19 20:20:08 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2019-10-19 20:20:08 +0200
commit7f98fe0e7d6ddb3741ad3bfb379671bd9cba35a2 (patch)
treed792e8a1c7d8a5fa6e63f3fe817e3ecf9d476038
parent829e49b36caf9b4324b1eb78543ddd8e43ae2adf (diff)
parentb49874fa2e975dedc87b52174da98ceb360ee125 (diff)
Update upstream source from tag 'upstream/1.4.71'
Update to upstream version '1.4.71' with Debian dir 481b7e05de283e5ba23c353901c69da1e941a62d
-rw-r--r--.gitignore1
-rw-r--r--Makefile148
-rw-r--r--Makefile.in13
-rw-r--r--README2
-rw-r--r--VERSION2
-rw-r--r--antenna.c73
-rw-r--r--config.log499
-rwxr-xr-xconfig.status942
-rwxr-xr-xconfigure4
-rw-r--r--configure.in4
-rw-r--r--def.c104
-rw-r--r--def.h9
-rw-r--r--lef.c38
-rw-r--r--main.c2
-rw-r--r--node.c382
-rw-r--r--node.h5
-rw-r--r--output.c299
-rw-r--r--output.h6
-rw-r--r--qconfig.c21
-rw-r--r--qconfig.h1
-rw-r--r--qrouter.c56
-rw-r--r--qrouter.h12
-rw-r--r--qrouter.tcl.in30
-rw-r--r--tclqrouter.c371
-rwxr-xr-xtkcon.tcl20
25 files changed, 1333 insertions, 1711 deletions
diff --git a/.gitignore b/.gitignore
index 03f3096..6597d1b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,3 @@ qrouter.tcl
*.so
*~
UPDATE_ME
-VERSION
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 01a61f0..0000000
--- a/Makefile
+++ /dev/null
@@ -1,148 +0,0 @@
-#
-# qrouter Makefile
-#
-
-# Main compiler arguments
-CFLAGS += -g
-CPPFLAGS = -m64 -fPIC
-DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_LIBXT=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_MMAN_H=1 -DTCL_QROUTER=1 -DLINUX=1 -DSYSV=1 -DVERSION=\"1.4\" -DREVISION=\"7\"
-STUB_DEFS = -DUSE_TCL_STUBS -DUSE_TK_STUBS
-LIBS = -lXt
-LDFLAGS +=
-LDDL_FLAGS = -shared -Wl,-soname,$@ -Wl,--version-script=symbol.map
-LD_RUN_PATH =
-SHLIB_CFLAGS = -fPIC
-LIB_SPECS_NOSTUB = -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6
-LIB_SPECS = -L/usr/lib64 -ltkstub8.6 -L/usr/lib64 -ltclstub8.6
-INC_SPECS =
-TCL_LIB_DIR = /usr/lib64
-TK_LIB_DIR = /usr/lib64
-EXTRA_LIB_SPECS = -ldl
-INSTALL = /usr/bin/install -c
-SHDLIB_EXT = .so
-EXEEXT =
-X_LIBS =
-X_EXTRA_LIBS =
-X_PRE_LIBS = -lSM -lICE
-QROUTER_LIB_DIR = share/qrouter
-WISH_EXE = /usr/bin/wish
-VERSION = 1.4
-REVISION = 7
-prefix = /usr/local
-
-INSTALL_TARGET := install-tcl
-ALL_TARGET := tcl
-
-SOURCES = qrouter.c point.c maze.c mask.c node.c output.c qconfig.c lef.c def.c
-OBJECTS := $(patsubst %.c,%.o,$(SOURCES))
-
-SOURCES2 = graphics.c tclqrouter.c tkSimple.c delays.c antenna.c
-OBJECTS2 := $(patsubst %.c,%.o,$(SOURCES2))
-
-SOURCES3 = qrouterexec.c
-OBJECTS3 := $(patsubst %.c,%.o,$(SOURCES3))
-
-SOURCES4 = qrouternullg.c
-OBJECTS4 := $(patsubst %.c,%.o,$(SOURCES4))
-
-SOURCES5 = main.c
-OBJECTS5 := $(patsubst %.c,%.o,$(SOURCES5))
-
-BININSTALL = ${prefix}/bin
-LIBINSTALL = ${prefix}/${QROUTER_LIB_DIR}
-EXTRA_DEFS = -DQROUTER_PATH=\"${LIBINSTALL}\"
-
-all: $(ALL_TARGET)
-
-install: $(INSTALL_TARGET)
-
-nointerp: qrouter$(EXEEXT)
-
-tcl: qrouter.sh qrouter.tcl qrouter$(SHDLIB_EXT) qrouterexec$(EXEEXT) \
- qrouternullg$(EXEEXT)
-
-qrouter.tcl: qrouter.tcl.in
- sed -e '/LIBDIR/s#LIBDIR#${LIBINSTALL}#' \
- -e '/VERSION/s#VERSION#${VERSION}#' \
- -e '/REVISION/s#REVISION#${REVISION}#' \
- qrouter.tcl.in > $@
-
-qrouter.sh: qrouter.sh.in
- sed -e '/WISH_EXE/s#WISH_EXE#${WISH_EXE}#' \
- -e '/LIBDIR/s#LIBDIR#${LIBINSTALL}#' \
- qrouter.sh.in > $@
- chmod 0755 $@
-
-qrouter$(EXEEXT): $(OBJECTS) $(OBJECTS5)
- $(CC) $(LDFLAGS) $(OBJECTS) $(OBJECTS5) -o $@ $(LIBS) -lm
-
-qrouter$(SHDLIB_EXT): $(OBJECTS) $(OBJECTS2)
- $(RM) qrouter$(SHDLIB_EXT)
- $(CC) ${CFLAGS} ${STUB_DEFS} ${SHLIB_CFLAGS} -o $@ \
- ${LDDL_FLAGS} $(OBJECTS) $(OBJECTS2) \
- ${LDFLAGS} -lc ${LIBS} ${X_PRE_LIBS} -lX11 ${X_LIBS} \
- ${X_EXTRA_LIBS} ${LIB_SPECS} ${EXTRA_LIB_SPECS} -lm
-
-qrouterexec$(EXEEXT): $(OBJECTS3)
- $(RM) qrouterexec$(EXEEXT)
- $(CC) ${CFLAGS} ${CPPFLAGS} ${DEFS} ${EXTRA_DEFS} \
- ${SOURCES3} ${INC_SPECS} -o $@ ${LIB_SPECS_NOSTUB} \
- ${LD_RUN_PATH} ${LDFLAGS} ${X_PRE_LIBS} -lX11 ${X_LIBS} \
- ${X_EXTRA_LIBS} ${LIBS} ${EXTRA_LIB_SPECS} -lm
-
-qrouternullg$(EXEEXT): $(OBJECTS4)
- $(RM) qrouternullg$(EXEEXT)
- $(CC) ${CFLAGS} ${CPPFLAGS} ${DEFS} ${EXTRA_DEFS} \
- ${SOURCES4} ${INC_SPECS} -o $@ ${LIB_SPECS_NOSTUB} \
- ${LD_RUN_PATH} ${LDFLAGS} ${LIBS} ${EXTRA_LIB_SPECS} -lm
-
-install-nointerp:
- @echo "Installing qrouter"
- $(INSTALL) -d $(DESTDIR)${BININSTALL}
- $(INSTALL) qrouter $(DESTDIR)${BININSTALL}
-
-install-tcl: qrouter.sh qrouter.tcl qrouter$(SHDLIB_EXT) \
- qrouterexec$(EXEEXT) qrouternullg$(EXEEXT)
- @echo "Installing qrouter"
- $(INSTALL) -d $(DESTDIR)${BININSTALL}
- $(INSTALL) -d $(DESTDIR)${LIBINSTALL}
- $(INSTALL) qrouter.sh $(DESTDIR)${BININSTALL}/qrouter
- $(INSTALL) qrouter$(SHDLIB_EXT) $(DESTDIR)${LIBINSTALL}
- $(INSTALL) qrouterexec$(EXEEXT) $(DESTDIR)${LIBINSTALL}
- $(INSTALL) qrouternullg$(EXEEXT) $(DESTDIR)${LIBINSTALL}
- $(INSTALL) console.tcl $(DESTDIR)${LIBINSTALL}
- $(INSTALL) tkcon.tcl $(DESTDIR)${LIBINSTALL}
- $(INSTALL) qrouter.tcl $(DESTDIR)${LIBINSTALL}
-
-uninstall:
- $(RM) $(DESTDIR)${BININSTALL}/qrouter
-
-clean:
- $(RM) $(OBJECTS)
- $(RM) $(OBJECTS2)
- $(RM) $(OBJECTS3)
- $(RM) $(OBJECTS4)
- $(RM) $(OBJECTS5)
- $(RM) qrouterexec$(EXEEXT)
- $(RM) qrouternullg$(EXEEXT)
- $(RM) qrouter$(EXEEXT)
- $(RM) qrouter$(SHDLIB_EXT)
- $(RM) qrouter.tcl
- $(RM) qrouter.sh
-
-veryclean:
- $(RM) $(OBJECTS)
- $(RM) $(OBJECTS2)
- $(RM) $(OBJECTS3)
- $(RM) $(OBJECTS4)
- $(RM) $(OBJECTS5)
- $(RM) qrouterexec$(EXEEXT)
- $(RM) qrouternullg$(EXEEXT)
- $(RM) qrouter$(EXEEXT)
- $(RM) qrouter$(SHDLIB_EXT)
- $(RM) qrouter.tcl
- $(RM) qrouter.sh
-
-.c.o:
- $(CC) $(CFLAGS) $(CPPFLAGS) $(SHLIB_CFLAGS) $(DEFS) $(STUB_DEFS) \
- $(EXTRA_DEFS) $(INC_SPECS) -c $< -o $@
diff --git a/Makefile.in b/Makefile.in
index a86e268..9cbcba8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -143,6 +143,19 @@ veryclean:
$(RM) qrouter.tcl
$(RM) qrouter.sh
+distclean:
+ $(RM) $(OBJECTS)
+ $(RM) $(OBJECTS2)
+ $(RM) $(OBJECTS3)
+ $(RM) $(OBJECTS4)
+ $(RM) $(OBJECTS5)
+ $(RM) qrouterexec$(EXEEXT)
+ $(RM) qrouternullg$(EXEEXT)
+ $(RM) qrouter$(EXEEXT)
+ $(RM) qrouter$(SHDLIB_EXT)
+ $(RM) qrouter.tcl
+ $(RM) qrouter.sh
+
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) $(SHLIB_CFLAGS) $(DEFS) $(STUB_DEFS) \
$(EXTRA_DEFS) $(INC_SPECS) -c $< -o $@
diff --git a/README b/README
index b5afe2d..d97a472 100644
--- a/README
+++ b/README
@@ -116,6 +116,8 @@ the standard compile and install sequence:
make
make install
+For FreeBSD, use 'gmake' instead of 'make'.
+
Options to configure:
--prefix=<prefix>
diff --git a/VERSION b/VERSION
index ed32bf2..db02007 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.4.49
+1.4.71
diff --git a/antenna.c b/antenna.c
index a3d0ad5..1a9efd0 100644
--- a/antenna.c
+++ b/antenna.c
@@ -20,6 +20,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <regex.h>
+#include <assert.h>
/* This entire file is dependent on the Tcl/Tk version */
#ifdef TCL_QROUTER
@@ -55,6 +56,42 @@ struct antennainfo_ {
ANTENNAINFO AntennaList;
+typedef struct annotateinfo_ *ANNOTATEINFO;
+
+struct annotateinfo_ {
+ ANNOTATEINFO next;
+ NET net;
+ char *instance;
+ char *pin;
+ int flag; /* Flag for checking output status */
+};
+
+ANNOTATEINFO AnnotateList = NULL;
+
+#define ANNO_INIT 0
+#define ANNO_OUTPUT 1
+
+/*----------------------------------------------------------------------*/
+/* Report connection of a fixed antenna violation, given the net. */
+/*----------------------------------------------------------------------*/
+
+char *get_annotate_info(NET net, char **pinptr)
+{
+ ANNOTATEINFO annotate;
+
+ for (annotate = AnnotateList; annotate; annotate = annotate->next) {
+ if (annotate->net->netnum == net->netnum) {
+ if (annotate->flag == ANNO_INIT) {
+ annotate->flag = ANNO_OUTPUT; /* Mark as having been output */
+ *pinptr = annotate->pin;
+ return annotate->instance;
+ }
+ }
+ }
+ *pinptr = NULL;
+ return NULL;
+}
+
/*--------------------------------------------------------------*/
/* Regular expression matching of the given string in */
/* "antennacell" to the string "strtest". If the regular */
@@ -561,7 +598,7 @@ get_route_area_forward_fromseg(NET net, ROUTE rt, SEG nseg, int layer,
/* antenna area forward and reverse from that segment. */
rt2 = rt->end.route;
- if (rt2 == NULL) return; /* This should not happen */
+ assert( rt2 != NULL ) ;
for (rseg = rt2->segments; rseg; rseg = rseg->next) {
if (rseg->segtype & ST_WIRE) {
@@ -612,7 +649,7 @@ get_route_area_forward_fromseg(NET net, ROUTE rt, SEG nseg, int layer,
}
}
}
- if (rseg == NULL) return; /* This should not happen */
+ assert( rseg != NULL ) ;
if (rseg->next != NULL)
area += get_route_area_forward_fromseg(net, rt2, rseg->next,
@@ -1252,8 +1289,20 @@ resolve_antenna(char *antennacell, u_char do_fix)
if ((FixedList != NULL) || (BadList != NULL))
fout = fopen("antenna.out", "w");
+ /* Clear any existing list of instance connections (annotations) */
+
+ if (AnnotateList) {
+ ANNOTATEINFO nextannotate;
+ while (AnnotateList != NULL) {
+ nextannotate = AnnotateList->next;
+ free(AnnotateList);
+ AnnotateList = nextannotate;
+ }
+ }
+
if (FixedList != NULL) {
ROUTE rt;
+ ANNOTATEINFO newannotate;
fprintf(fout, "Revised netlist: New antenna anchor connections\n");
for (nextviolation = FixedList; nextviolation;
@@ -1265,6 +1314,16 @@ resolve_antenna(char *antennacell, u_char do_fix)
fprintf(fout, "Net=%s Instance=%s Cell=%s Pin=%s\n",
nextviolation->net->netname, g->gatename,
g->gatetype->gatename, g->gatetype->node[i]);
+
+ // Create an annotation entry for this fixed violation
+
+ newannotate = (ANNOTATEINFO)malloc(sizeof(struct annotateinfo_));
+ newannotate->net = nextviolation->net;
+ newannotate->instance = g->gatename;
+ newannotate->pin = g->gatetype->node[i];
+ newannotate->flag = ANNO_INIT;
+ newannotate->next = AnnotateList;
+ AnnotateList = newannotate;
}
fprintf(fout, "\n");
}
@@ -1291,10 +1350,12 @@ resolve_antenna(char *antennacell, u_char do_fix)
/* Free up the violation lists */
- while (FixedList != NULL) {
- nextviolation = FixedList->next;
- free(FixedList);
- FixedList = nextviolation;
+ if (FixedList != NULL) {
+ while (FixedList != NULL) {
+ nextviolation = FixedList->next;
+ free(FixedList);
+ FixedList = nextviolation;
+ }
}
while (BadList != NULL) {
nextviolation = BadList->next;
diff --git a/config.log b/config.log
deleted file mode 100644
index 78ff1d3..0000000
--- a/config.log
+++ /dev/null
@@ -1,499 +0,0 @@
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by configure, which was
-generated by GNU Autoconf 2.69. Invocation command line was
-
- $ ./configure
-
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = stravinsky
-uname -m = x86_64
-uname -r = 4.1.13-100.fc21.x86_64
-uname -s = Linux
-uname -v = #1 SMP Tue Nov 10 13:13:20 UTC 2015
-
-/usr/bin/uname -p = x86_64
-/bin/uname -X = unknown
-
-/bin/arch = x86_64
-/usr/bin/arch -k = unknown
-/usr/convex/getsysinfo = unknown
-/usr/bin/hostinfo = unknown
-/bin/machine = unknown
-/usr/bin/oslevel = unknown
-/bin/universe = unknown
-
-PATH: .
-PATH: /bin
-PATH: /sbin
-PATH: /usr/bin
-PATH: /usr/sbin
-PATH: /usr/local/bin
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-configure:2206: checking build system type
-configure:2220: result: x86_64-unknown-linux-gnu
-configure:2240: checking host system type
-configure:2253: result: x86_64-unknown-linux-gnu
-configure:2273: checking target system type
-configure:2286: result: x86_64-unknown-linux-gnu
-configure:2380: checking for gcc
-configure:2396: found /bin/gcc
-configure:2407: result: gcc
-configure:2636: checking for C compiler version
-configure:2645: gcc --version >&5
-gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
-Copyright (C) 2014 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-configure:2656: $? = 0
-configure:2645: gcc -v >&5
-Using built-in specs.
-COLLECT_GCC=gcc
-COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
-Target: x86_64-redhat-linux
-Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
-Thread model: posix
-gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)
-configure:2656: $? = 0
-configure:2645: gcc -V >&5
-gcc: error: unrecognized command line option '-V'
-gcc: fatal error: no input files
-compilation terminated.
-configure:2656: $? = 4
-configure:2645: gcc -qversion >&5
-gcc: error: unrecognized command line option '-qversion'
-gcc: fatal error: no input files
-compilation terminated.
-configure:2656: $? = 4
-configure:2676: checking whether the C compiler works
-configure:2698: gcc conftest.c >&5
-configure:2702: $? = 0
-configure:2750: result: yes
-configure:2753: checking for C compiler default output file name
-configure:2755: result: a.out
-configure:2761: checking for suffix of executables
-configure:2768: gcc -o conftest conftest.c >&5
-configure:2772: $? = 0
-configure:2794: result:
-configure:2816: checking whether we are cross compiling
-configure:2824: gcc -o conftest conftest.c >&5
-configure:2828: $? = 0
-configure:2835: ./conftest
-configure:2839: $? = 0
-configure:2854: result: no
-configure:2859: checking for suffix of object files
-configure:2881: gcc -c conftest.c >&5
-configure:2885: $? = 0
-configure:2906: result: o
-configure:2910: checking whether we are using the GNU C compiler
-configure:2929: gcc -c conftest.c >&5
-configure:2929: $? = 0
-configure:2938: result: yes
-configure:2947: checking whether gcc accepts -g
-configure:2967: gcc -c -g conftest.c >&5
-configure:2967: $? = 0
-configure:3008: result: yes
-configure:3025: checking for gcc option to accept ISO C89
-configure:3088: gcc -c -g -O2 conftest.c >&5
-configure:3088: $? = 0
-configure:3101: result: none needed
-configure:3126: checking how to run the C preprocessor
-configure:3157: gcc -E conftest.c
-configure:3157: $? = 0
-configure:3171: gcc -E conftest.c
-conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
- #include <ac_nonexistent.h>
- ^
-compilation terminated.
-configure:3171: $? = 1
-configure: failed program was:
-| /* confdefs.h */
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define PACKAGE_URL ""
-| /* end confdefs.h. */
-| #include <ac_nonexistent.h>
-configure:3196: result: gcc -E
-configure:3216: gcc -E conftest.c
-configure:3216: $? = 0
-configure:3230: gcc -E conftest.c
-conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
- #include <ac_nonexistent.h>
- ^
-compilation terminated.
-configure:3230: $? = 1
-configure: failed program was:
-| /* confdefs.h */
-| #define PACKAGE_NAME ""
-| #define PACKAGE_TARNAME ""
-| #define PACKAGE_VERSION ""
-| #define PACKAGE_STRING ""
-| #define PACKAGE_BUGREPORT ""
-| #define PACKAGE_URL ""
-| /* end confdefs.h. */
-| #include <ac_nonexistent.h>
-configure:3259: checking for library containing strerror
-configure:3290: gcc -o conftest -g -O2 conftest.c >&5
-configure:3290: $? = 0
-configure:3307: result: none required
-configure:3332: checking for a BSD-compatible install
-configure:3400: result: /bin/install -c
-configure:3454: checking for ranlib
-configure:3470: found /bin/ranlib
-configure:3481: result: ranlib
-configure:3505: checking for autoconf
-configure:3521: found /bin/autoconf
-configure:3533: result: autoconf
-configure:3543: checking for cp
-configure:3559: found /bin/cp
-configure:3571: result: cp
-configure:3581: checking for rm
-configure:3597: found /bin/rm
-configure:3609: result: rm
-configure:3625: checking for grep that handles long lines and -e
-configure:3683: result: /bin/grep
-configure:3688: checking for egrep
-configure:3750: result: /bin/grep -E
-configure:3755: checking for ANSI C header files
-configure:3775: gcc -c -g -O2 conftest.c >&5
-configure:3775: $? = 0
-configure:3848: gcc -o conftest -g -O2 conftest.c >&5
-configure:3848: $? = 0
-configure:3848: ./conftest
-configure:3848: $? = 0
-configure:3859: result: yes
-configure:3870: checking for setenv
-configure:3870: gcc -o conftest -g -O2 conftest.c >&5
-configure:3870: $? = 0
-configure:3870: result: yes
-configure:3870: checking for putenv
-configure:3870: gcc -o conftest -g -O2 conftest.c >&5
-configure:3870: $? = 0
-configure:3870: result: yes
-configure:3902: checking for ld used by GCC
-configure:3965: result: /bin/ld
-configure:3972: checking if the linker (/bin/ld) is GNU ld
-GNU ld version 2.24
-configure:3984: result: yes
-configure:3990: checking for va_copy
-configure:4008: gcc -o conftest -g -O2 conftest.c >&5
-configure:4008: $? = 0
-configure:4017: result: yes
-configure:4025: checking for __va_copy
-configure:4043: gcc -o conftest -g -O2 conftest.c >&5
-configure:4043: $? = 0
-configure:4052: result: yes
-configure:4173: checking for tclConfig.sh
-configure:4247: result: /usr/lib64/tclConfig.sh
-configure:4263: checking for tkConfig.sh
-configure:4338: result: /usr/lib64/tkConfig.sh
-configure:4472: checking for wish executable
-configure:4499: result: /usr/bin/wish
-configure:4586: checking for X
-configure:4725: gcc -o conftest -g -O2 conftest.c -lX11 >&5
-configure:4725: $? = 0
-configure:4775: result: libraries , headers
-configure:4874: gcc -o conftest -g -O2 conftest.c -lX11 >&5
-configure:4874: $? = 0
-configure:4972: checking for gethostbyname
-configure:4972: gcc -o conftest -g -O2 conftest.c >&5
-configure:4972: $? = 0
-configure:4972: result: yes
-configure:5069: checking for connect
-configure:5069: gcc -o conftest -g -O2 conftest.c >&5
-configure:5069: $? = 0
-configure:5069: result: yes
-configure:5118: checking for remove
-configure:5118: gcc -o conftest -g -O2 conftest.c >&5
-configure:5118: $? = 0
-configure:5118: result: yes
-configure:5167: checking for shmat
-configure:5167: gcc -o conftest -g -O2 conftest.c >&5
-configure:5167: $? = 0
-configure:5167: result: yes
-configure:5225: checking for IceConnectionNumber in -lICE
-configure:5250: gcc -o conftest -g -O2 conftest.c -lICE >&5
-configure:5250: $? = 0
-configure:5259: result: yes
-configure:5280: checking for XtToolkitInitialize in -lXt
-configure:5305: gcc -o conftest -g -O2 conftest.c -lXt >&5
-configure:5305: $? = 0
-configure:5314: result: yes
-configure:5377: checking for sys/types.h
-configure:5377: gcc -c -g -O2 conftest.c >&5
-configure:5377: $? = 0
-configure:5377: result: yes
-configure:5377: checking for sys/stat.h
-configure:5377: gcc -c -g -O2 conftest.c >&5
-configure:5377: $? = 0
-configure:5377: result: yes
-configure:5377: checking for stdlib.h
-configure:5377: gcc -c -g -O2 conftest.c >&5
-configure:5377: $? = 0
-configure:5377: result: yes
-configure:5377: checking for string.h
-configure:5377: gcc -c -g -O2 conftest.c >&5
-configure:5377: $? = 0
-configure:5377: result: yes
-configure:5377: checking for memory.h
-configure:5377: gcc -c -g -O2 conftest.c >&5
-configure:5377: $? = 0
-configure:5377: result: yes
-configure:5377: checking for strings.h
-configure:5377: gcc -c -g -O2 conftest.c >&5
-configure:5377: $? = 0
-configure:5377: result: yes
-configure:5377: checking for inttypes.h
-configure:5377: gcc -c -g -O2 conftest.c >&5
-configure:5377: $? = 0
-configure:5377: result: yes
-configure:5377: checking for stdint.h
-configure:5377: gcc -c -g -O2 conftest.c >&5
-configure:5377: $? = 0
-configure:5377: result: yes
-configure:5377: checking for unistd.h
-configure:5377: gcc -c -g -O2 conftest.c >&5
-configure:5377: $? = 0
-configure:5377: result: yes
-configure:5391: checking sys/mman.h usability
-configure:5391: gcc -c -g -O2 conftest.c >&5
-configure:5391: $? = 0
-configure:5391: result: yes
-configure:5391: checking sys/mman.h presence
-configure:5391: gcc -E conftest.c
-configure:5391: $? = 0
-configure:5391: result: yes
-configure:5391: checking for sys/mman.h
-configure:5391: result: yes
-configure:5808: creating ./config.status
-
-## ---------------------- ##
-## Running config.status. ##
-## ---------------------- ##
-
-This file was extended by config.status, which was
-generated by GNU Autoconf 2.69. Invocation command line was
-
- CONFIG_FILES =
- CONFIG_HEADERS =
- CONFIG_LINKS =
- CONFIG_COMMANDS =
- $ ./config.status
-
-on stravinsky
-
-config.status:770: creating Makefile
-
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-
-ac_cv_build=x86_64-unknown-linux-gnu
-ac_cv_c___va_copy=yes
-ac_cv_c_compiler_gnu=yes
-ac_cv_c_va_copy=yes
-ac_cv_env_CC_set=
-ac_cv_env_CC_value=
-ac_cv_env_CFLAGS_set=
-ac_cv_env_CFLAGS_value=
-ac_cv_env_CPPFLAGS_set=
-ac_cv_env_CPPFLAGS_value=
-ac_cv_env_CPP_set=
-ac_cv_env_CPP_value=
-ac_cv_env_LDFLAGS_set=
-ac_cv_env_LDFLAGS_value=
-ac_cv_env_LIBS_set=
-ac_cv_env_LIBS_value=
-ac_cv_env_XMKMF_set=
-ac_cv_env_XMKMF_value=
-ac_cv_env_build_alias_set=
-ac_cv_env_build_alias_value=
-ac_cv_env_host_alias_set=
-ac_cv_env_host_alias_value=
-ac_cv_env_target_alias_set=
-ac_cv_env_target_alias_value=
-ac_cv_func_connect=yes
-ac_cv_func_gethostbyname=yes
-ac_cv_func_putenv=yes
-ac_cv_func_remove=yes
-ac_cv_func_setenv=yes
-ac_cv_func_shmat=yes
-ac_cv_have_x='have_x=yes ac_x_includes='\'''\'' ac_x_libraries='\'''\'''
-ac_cv_header_inttypes_h=yes
-ac_cv_header_memory_h=yes
-ac_cv_header_stdc=yes
-ac_cv_header_stdint_h=yes
-ac_cv_header_stdlib_h=yes
-ac_cv_header_string_h=yes
-ac_cv_header_strings_h=yes
-ac_cv_header_sys_mman_h=yes
-ac_cv_header_sys_stat_h=yes
-ac_cv_header_sys_types_h=yes
-ac_cv_header_unistd_h=yes
-ac_cv_host=x86_64-unknown-linux-gnu
-ac_cv_lib_ICE_IceConnectionNumber=yes
-ac_cv_lib_Xt_XtToolkitInitialize=yes
-ac_cv_objext=o
-ac_cv_path_EGREP='/bin/grep -E'
-ac_cv_path_GREP=/bin/grep
-ac_cv_path_LD=/bin/ld
-ac_cv_path_install='/bin/install -c'
-ac_cv_prog_AUTOCONF=autoconf
-ac_cv_prog_CP=cp
-ac_cv_prog_CPP='gcc -E'
-ac_cv_prog_RM=rm
-ac_cv_prog_ac_ct_CC=gcc
-ac_cv_prog_ac_ct_RANLIB=ranlib
-ac_cv_prog_cc_c89=
-ac_cv_prog_cc_g=yes
-ac_cv_prog_gnu_ld=yes
-ac_cv_search_strerror='none required'
-ac_cv_target=x86_64-unknown-linux-gnu
-
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-
-ALL_TARGET='tcl'
-AUTOCONF='autoconf'
-CC='gcc'
-CFLAGS='-g -O2'
-CP='cp'
-CPP='gcc -E'
-CPPFLAGS=' -m64 -fPIC'
-DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_LIBXT=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_MMAN_H=1 -DTCL_QROUTER=1 -DLINUX=1 -DSYSV=1 -DVERSION=\"1.4\" -DREVISION=\"7\"'
-ECHO_C=''
-ECHO_N='-n'
-ECHO_T=''
-EGREP='/bin/grep -E'
-EXEEXT=''
-EXTRA_LIB_SPECS='-ldl'
-GREP='/bin/grep'
-INC_SPECS=''
-INSTALL_DATA='${INSTALL} -m 644'
-INSTALL_PROGRAM='${INSTALL}'
-INSTALL_SCRIPT='${INSTALL}'
-INSTALL_TARGET='install-tcl'
-LD='/bin/ld'
-LDDL_FLAGS='-shared -Wl,-soname,$@ -Wl,--version-script=symbol.map'
-LDFLAGS=''
-LD_RUN_PATH=''
-LIBOBJS=''
-LIBS='-lXt '
-LIB_SPECS=' -L/usr/lib64 -ltkstub8.6 -L/usr/lib64 -ltclstub8.6'
-LIB_SPECS_NOSTUB=' -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6'
-LTLIBOBJS=''
-OBJEXT='o'
-PACKAGE_BUGREPORT=''
-PACKAGE_NAME=''
-PACKAGE_STRING=''
-PACKAGE_TARNAME=''
-PACKAGE_URL=''
-PACKAGE_VERSION=''
-PATH_SEPARATOR=':'
-QROUTER_LIB_DIR='share/qrouter'
-RANLIB='ranlib'
-REVISION='7'
-RM='rm'
-SHDLIB_EXT='.so'
-SHELL='/bin/sh'
-SHLIB_CFLAGS='-fPIC'
-SHLIB_LD=''
-SHLIB_LIB_SPECS=''
-STDLIBS=''
-TCL_LIB_DIR='/usr/lib64'
-TK_LIB_DIR='/usr/lib64'
-VERSION='1.4'
-WISH_EXE='/usr/bin/wish'
-XMKMF=''
-X_CFLAGS=''
-X_EXTRA_LIBS=''
-X_LIBS=''
-X_PRE_LIBS=' -lSM -lICE'
-ac_ct_CC='gcc'
-bindir='${exec_prefix}/bin'
-build='x86_64-unknown-linux-gnu'
-build_alias=''
-build_cpu='x86_64'
-build_os='linux-gnu'
-build_vendor='unknown'
-datadir='${datarootdir}'
-datarootdir='${prefix}/share'
-docdir='${datarootdir}/doc/${PACKAGE}'
-dvidir='${docdir}'
-exec_prefix='${prefix}'
-host='x86_64-unknown-linux-gnu'
-host_alias=''
-host_cpu='x86_64'
-host_os='linux-gnu'
-host_vendor='unknown'
-htmldir='${docdir}'
-includedir='${prefix}/include'
-infodir='${datarootdir}/info'
-libdir='${exec_prefix}/lib'
-libexecdir='${exec_prefix}/libexec'
-localedir='${datarootdir}/locale'
-localstatedir='${prefix}/var'
-mandir='${datarootdir}/man'
-oldincludedir='/usr/include'
-pdfdir='${docdir}'
-prefix='/usr/local'
-program_transform_name='s,x,x,'
-psdir='${docdir}'
-sbindir='${exec_prefix}/sbin'
-sharedstatedir='${prefix}/com'
-stub_defs=' -DUSE_TCL_STUBS -DUSE_TK_STUBS'
-sysconfdir='${prefix}/etc'
-target='x86_64-unknown-linux-gnu'
-target_alias=''
-target_cpu='x86_64'
-target_os='linux-gnu'
-target_vendor='unknown'
-
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-
-/* confdefs.h */
-#define PACKAGE_NAME ""
-#define PACKAGE_TARNAME ""
-#define PACKAGE_VERSION ""
-#define PACKAGE_STRING ""
-#define PACKAGE_BUGREPORT ""
-#define PACKAGE_URL ""
-#define STDC_HEADERS 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_VA_COPY 1
-#define HAVE___VA_COPY 1
-#define HAVE_LIBXT 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_UNISTD_H 1
-#define HAVE_SYS_MMAN_H 1
-#define TCL_QROUTER 1
-#define LINUX 1
-#define SYSV 1
-#define VERSION "1.4"
-#define REVISION "7"
-
-configure: exit 0
diff --git a/config.status b/config.status
deleted file mode 100755
index e52ea93..0000000
--- a/config.status
+++ /dev/null
@@ -1,942 +0,0 @@
-#! /bin/sh
-# Generated by configure.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -pR'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -pR'
- fi
-else
- as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
- test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.69. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-# Files that config.status was made for.
-config_files=" Makefile"
-
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to the package provider."
-
-ac_cs_config=""
-ac_cs_version="\
-config.status
-configured by ./configure, generated by GNU Autoconf 2.69,
- with options \"$ac_cs_config\"
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='/home/tim/gitsrc/qrouter-1.4'
-srcdir='.'
-INSTALL='/bin/install -c'
-test -n "$AWK" || AWK=awk
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=?*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-if $ac_cs_recheck; then
- set X /bin/sh './configure' $ac_configure_extra_args --no-create --no-recursion
- shift
- $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
- CONFIG_SHELL='/bin/sh'
- export CONFIG_SHELL
- exec "$@"
-fi
-
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp= ac_tmp=
- trap 'exit_status=$?
- : "${ac_tmp:=$tmp}"
- { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-cat >>"$ac_tmp/subs1.awk" <<\_ACAWK &&
-S["LTLIBOBJS"]=""
-S["LIBOBJS"]=""
-S["QROUTER_LIB_DIR"]="share/qrouter"
-S["INSTALL_TARGET"]="install-tcl"
-S["ALL_TARGET"]="tcl"
-S["STDLIBS"]=""
-S["LD_RUN_PATH"]=""
-S["SHLIB_CFLAGS"]="-fPIC"
-S["WISH_EXE"]="/usr/bin/wish"
-S["TK_LIB_DIR"]="/usr/lib64"
-S["TCL_LIB_DIR"]="/usr/lib64"
-S["LIB_SPECS_NOSTUB"]=" -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6"
-S["LIB_SPECS"]=" -L/usr/lib64 -ltkstub8.6 -L/usr/lib64 -ltclstub8.6"
-S["INC_SPECS"]=""
-S["EXTRA_LIB_SPECS"]="-ldl"
-S["stub_defs"]=" -DUSE_TCL_STUBS -DUSE_TK_STUBS"
-S["SHLIB_LIB_SPECS"]=""
-S["LDDL_FLAGS"]="-shared -Wl,-soname,$@ -Wl,--version-script=symbol.map"
-S["LD"]="/bin/ld"
-S["SHLIB_LD"]=""
-S["SHDLIB_EXT"]=".so"
-S["X_EXTRA_LIBS"]=""
-S["X_LIBS"]=""
-S["X_PRE_LIBS"]=" -lSM -lICE"
-S["X_CFLAGS"]=""
-S["XMKMF"]=""
-S["EGREP"]="/bin/grep -E"
-S["GREP"]="/bin/grep"
-S["RM"]="rm"
-S["CP"]="cp"
-S["AUTOCONF"]="autoconf"
-S["RANLIB"]="ranlib"
-S["INSTALL_DATA"]="${INSTALL} -m 644"
-S["INSTALL_SCRIPT"]="${INSTALL}"
-S["INSTALL_PROGRAM"]="${INSTALL}"
-S["CPP"]="gcc -E"
-S["OBJEXT"]="o"
-S["EXEEXT"]=""
-S["ac_ct_CC"]="gcc"
-S["CPPFLAGS"]=" -m64 -fPIC"
-S["LDFLAGS"]=""
-S["CFLAGS"]="-g -O2"
-S["CC"]="gcc"
-S["REVISION"]="7"
-S["VERSION"]="1.4"
-S["target_os"]="linux-gnu"
-S["target_vendor"]="unknown"
-S["target_cpu"]="x86_64"
-S["target"]="x86_64-unknown-linux-gnu"
-S["host_os"]="linux-gnu"
-S["host_vendor"]="unknown"
-S["host_cpu"]="x86_64"
-S["host"]="x86_64-unknown-linux-gnu"
-S["build_os"]="linux-gnu"
-S["build_vendor"]="unknown"
-S["build_cpu"]="x86_64"
-S["build"]="x86_64-unknown-linux-gnu"
-S["target_alias"]=""
-S["host_alias"]=""
-S["build_alias"]=""
-S["LIBS"]="-lXt "
-S["ECHO_T"]=""
-S["ECHO_N"]="-n"
-S["ECHO_C"]=""
-S["DEFS"]="-DPACKAGE_NAME=\\\"\\\" -DPACKAGE_TARNAME=\\\"\\\" -DPACKAGE_VERSION=\\\"\\\" -DPACKAGE_STRING=\\\"\\\" -DPACKAGE_BUGREPORT=\\\"\\\" -DPACKAGE_URL=\\\"\\\" -DSTDC_HEADERS=1"\
-" -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DHAVE_LIBXT=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAV"\
-"E_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_MMAN_H=1 -DTCL_QROUTER=1 -DLINU"\
-"X=1 -DSYSV=1 -DVERSION=\\\"1.4\\\" -DREVISION=\\\"7\\\""
-S["mandir"]="${datarootdir}/man"
-S["localedir"]="${datarootdir}/locale"
-S["libdir"]="${exec_prefix}/lib"
-S["psdir"]="${docdir}"
-S["pdfdir"]="${docdir}"
-S["dvidir"]="${docdir}"
-S["htmldir"]="${docdir}"
-S["infodir"]="${datarootdir}/info"
-S["docdir"]="${datarootdir}/doc/${PACKAGE}"
-S["oldincludedir"]="/usr/include"
-S["includedir"]="${prefix}/include"
-S["localstatedir"]="${prefix}/var"
-S["sharedstatedir"]="${prefix}/com"
-S["sysconfdir"]="${prefix}/etc"
-S["datadir"]="${datarootdir}"
-S["datarootdir"]="${prefix}/share"
-S["libexecdir"]="${exec_prefix}/libexec"
-S["sbindir"]="${exec_prefix}/sbin"
-S["bindir"]="${exec_prefix}/bin"
-S["program_transform_name"]="s,x,x,"
-S["prefix"]="/usr/local"
-S["exec_prefix"]="${prefix}"
-S["PACKAGE_URL"]=""
-S["PACKAGE_BUGREPORT"]=""
-S["PACKAGE_STRING"]=""
-S["PACKAGE_VERSION"]=""
-S["PACKAGE_TARNAME"]=""
-S["PACKAGE_NAME"]=""
-S["PATH_SEPARATOR"]=":"
-S["SHELL"]="/bin/sh"
-_ACAWK
-cat >>"$ac_tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-fi # test -n "$CONFIG_FILES"
-
-
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$ac_tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
- ac_datarootdir_hack='
- s&@datadir@&${datarootdir}&g
- s&@docdir@&${datarootdir}/doc/${PACKAGE}&g
- s&@infodir@&${datarootdir}/info&g
- s&@localedir@&${datarootdir}/locale&g
- s&@mandir@&${datarootdir}/man&g
- s&\${datarootdir}&${prefix}/share&g' ;;
-esac
-ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[ ]*$//
-}
-
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
- >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
- "$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
-
- rm -f "$ac_tmp/stdin"
- case $ac_file in
- -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
- *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
- esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-
-
-
- esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
diff --git a/configure b/configure
index 473316f..6afc0a9 100755
--- a/configure
+++ b/configure
@@ -5570,9 +5570,9 @@ if test $usingTcl ; then
*-freebsd*)
# Not available on all versions: check for include file.
- SHLIB_CFLAGS="-fpic"
+ SHLIB_CFLAGS="-fPIC"
LDDL_FLAGS="-shared ${LIB_SPECS}"
- CFLAGS="${CFLAGS} -l/usr/X11R6/include"
+ CFLAGS="${CFLAGS} -L/usr/X11R6/include"
;;
*-netbsd*|*-openbsd*)
diff --git a/configure.in b/configure.in
index b9bd50f..637082a 100644
--- a/configure.in
+++ b/configure.in
@@ -842,9 +842,9 @@ if test $usingTcl ; then
*-freebsd*)
# Not available on all versions: check for include file.
- SHLIB_CFLAGS="-fpic"
+ SHLIB_CFLAGS="-fPIC"
LDDL_FLAGS="-shared ${LIB_SPECS}"
- CFLAGS="${CFLAGS} -l/usr/X11R6/include"
+ CFLAGS="${CFLAGS} -L/usr/X11R6/include"
;;
*-netbsd*|*-openbsd*)
diff --git a/def.c b/def.c
index 6376b67..b2af479 100644
--- a/def.c
+++ b/def.c
@@ -32,6 +32,7 @@
#include "lef.h"
#include "def.h"
+TRACKS *Tracks = NULL;
int numSpecial = 0; /* Tracks number of specialnets */
#ifndef TCL_QROUTER
@@ -178,6 +179,27 @@ DefHashNet(NET net)
/*
*------------------------------------------------------------
*
+ * DefGetTracks --
+ *
+ * Get tracks information for the given layer.
+ * If no TRACKS were specified for the layer, NULL will be
+ * returned.
+ *
+ *------------------------------------------------------------
+ */
+
+TRACKS
+DefGetTracks(int layer)
+{
+ if (Tracks)
+ return Tracks[layer];
+ else
+ return NULL;
+}
+
+/*
+ *------------------------------------------------------------
+ *
* DefAddRoutes --
*
* Parse a network route statement from the DEF file.
@@ -214,9 +236,6 @@ DefAddRoutes(FILE *f, float oscale, NET net, char special)
refp.x1 = 0;
refp.y1 = 0;
- /* Set pitches and allocate memory for Obs[] if we haven't yet. */
- set_num_channels();
-
/* Don't create obstructions or routes on routed specialnets inputs */
/* except for power and ground nets. */
noobstruct = ((special == (char)1) && (!(net->flags & NET_IGNORED)) &&
@@ -630,6 +649,7 @@ DefReadGatePin(NET net, NODE node, char *instname, char *pinname, double *home)
if (gridx < 0) gridx = 0;
while (1) {
+ if (gridx >= NumChannelsX) break;
dx = (gridx * PitchX) + Xlowerbound;
if (dx > drect->x2 + home[drect->layer] - EPS) break;
if (dx < drect->x1 - home[drect->layer] + EPS) {
@@ -640,6 +660,7 @@ DefReadGatePin(NET net, NODE node, char *instname, char *pinname, double *home)
if (gridy < 0) gridy = 0;
while (1) {
+ if (gridy >= NumChannelsY) break;
dy = (gridy * PitchY) + Ylowerbound;
if (dy > drect->y2 + home[drect->layer] - EPS) break;
if (dy < drect->y1 - home[drect->layer] + EPS) {
@@ -747,6 +768,9 @@ DefReadNets(FILE *f, char *sname, float oscale, char special, int total)
NULL
};
+ /* Set pitches and allocate memory for Obs[] if we haven't yet. */
+ set_num_channels();
+
if (Numnets == 0)
{
// Initialize net and node records
@@ -896,9 +920,12 @@ DefReadNets(FILE *f, char *sname, float oscale, char special, int total)
while (token && (*token != ';'))
token = DefAddRoutes(f, oscale, net, special);
// Treat power and ground nets in specialnets as fixed
- if (subkey == DEF_NETPROP_ROUTED && special == (char)1)
+ if ((subkey == DEF_NETPROP_ROUTED ||
+ subkey == DEF_NETPROP_FIXED) &&
+ special == (char)1) {
if (net->netnum == VDD_NET || net->netnum == GND_NET)
fixed++;
+ }
break;
}
}
@@ -933,8 +960,8 @@ DefReadNets(FILE *f, char *sname, float oscale, char special, int total)
if (processed == total) {
if (Verbose > 0)
- Fprintf(stdout, " Processed %d%s nets total.\n", processed,
- (special) ? " special" : "");
+ Fprintf(stdout, " Processed %d%s nets total (%d fixed).\n",
+ processed, (special) ? " special" : "", fixed);
}
else
LefError(DEF_WARNING, "Warning: Number of nets read (%d) does not match "
@@ -971,7 +998,7 @@ DefReadLocation(gate, f, oscale)
int keyword;
char *token;
float x, y;
- char mxflag, myflag;
+ char mxflag, myflag, r90flag;
static char *orientations[] = {
"N", "S", "E", "W", "FN", "FS", "FE", "FW"
@@ -994,7 +1021,7 @@ DefReadLocation(gate, f, oscale)
return -1;
}
- mxflag = myflag = (char)0;
+ mxflag = myflag = r90flag = (char)0;
switch (keyword)
{
@@ -1011,10 +1038,20 @@ DefReadLocation(gate, f, oscale)
myflag = 1;
break;
case DEF_EAST:
+ r90flag = 1;
+ break;
case DEF_WEST:
+ r90flag = 1;
+ mxflag = 1;
+ myflag = 1;
+ break;
case DEF_FLIPPED_EAST:
+ r90flag = 1;
+ mxflag = 1;
+ break;
case DEF_FLIPPED_WEST:
- LefError(DEF_ERROR, "Error: Cannot handle 90-degree rotated components!\n");
+ r90flag = 1;
+ myflag = 1;
break;
}
@@ -1024,6 +1061,7 @@ DefReadLocation(gate, f, oscale)
gate->orient = MNONE;
if (mxflag) gate->orient |= MX;
if (myflag) gate->orient |= MY;
+ if (r90flag) gate->orient |= R90;
}
return 0;
@@ -1760,6 +1798,18 @@ DefReadComponents(FILE *f, char *sname, float oscale, int total)
drect->y2 -= gateginfo->placedY;
// handle rotations and orientations here
+ if (gate->orient & R90) {
+ tmp = drect->y1;
+ drect->y1 = -drect->x1;
+ drect->y1 += gateginfo->width;
+ drect->x1 = tmp;
+
+ tmp = drect->y2;
+ drect->y2 = -drect->x2;
+ drect->y2 += gateginfo->width;
+ drect->x2 = tmp;
+ }
+
if (gate->orient & MX) {
tmp = drect->x1;
drect->x1 = -drect->x2;
@@ -1803,6 +1853,18 @@ DefReadComponents(FILE *f, char *sname, float oscale, int total)
drect->y2 -= gateginfo->placedY;
// handle rotations and orientations here
+ if (gate->orient & R90) {
+ tmp = drect->y1;
+ drect->y1 = -drect->x1;
+ drect->y1 += gateginfo->width;
+ drect->x1 = tmp;
+
+ tmp = drect->y2;
+ drect->y2 = -drect->x2;
+ drect->y2 += gateginfo->width;
+ drect->x2 = tmp;
+ }
+
if (gate->orient & MX) {
tmp = drect->x1;
drect->x1 = -drect->x2;
@@ -2060,6 +2122,30 @@ DefRead(char *inName, float *retscale)
if (!strcmp(token, "LAYER")) {
curlayer = LefReadLayer(f, FALSE);
}
+ if (curlayer < 0) {
+ LefError(DEF_ERROR, "Failed to read layer; cannot parse TRACKS.");
+ LefEndStatement(f);
+ break;
+ }
+ else if (curlayer >= Num_layers) {
+ LefError(DEF_WARNING, "Ignoring TRACKS above number of "
+ "specified route layers.");
+ LefEndStatement(f);
+ break;
+ }
+ if (Tracks && (Tracks[curlayer] != NULL)) {
+ LefError(DEF_ERROR, "Only one TRACKS line per layer allowed; "
+ "last one is used.");
+ }
+ else {
+ if (Tracks == NULL)
+ Tracks = (TRACKS *)calloc(Num_layers, sizeof(TRACKS));
+ Tracks[curlayer] = (TRACKS)malloc(sizeof(struct tracks_));
+ }
+ Tracks[curlayer]->start = start / oscale;
+ Tracks[curlayer]->ntracks = channels;
+ Tracks[curlayer]->pitch = step / oscale;
+
if (corient == 'x') {
Vert[curlayer] = 1;
locpitch = step / oscale;
diff --git a/def.h b/def.h
index f08f753..435221e 100644
--- a/def.h
+++ b/def.h
@@ -8,9 +8,18 @@
#ifndef _DEFINT_H
#define _DEFINT_H
+/* Retain information from TRACKS entries in a DEF file */
+
+typedef struct tracks_ {
+ double start;
+ int ntracks;
+ double pitch;
+} *TRACKS;
+
extern int numSpecial;
extern int DefRead(char *inName, float *);
+extern TRACKS DefGetTracks(int layer);
extern GATE DefFindGate(char *name);
extern NET DefFindNet(char *name);
diff --git a/lef.c b/lef.c
index 9c654ac..ce4b36e 100644
--- a/lef.c
+++ b/lef.c
@@ -865,7 +865,10 @@ LefGetXYViaWidth(int base, int layer, int dir, int orient)
viatable = ViaYY;
break;
}
- lefl = LefFindLayer(*(viatable + base));
+ if (*viatable == NULL)
+ lefl = NULL;
+ else
+ lefl = LefFindLayer(*(viatable + base));
/* The routine LefAssignLayerVias() should assign all Via** types. */
/* Below are fallback assignments. */
@@ -2565,11 +2568,11 @@ LefList LefNewVia(char *name)
enum lef_sections {LEF_VERSION = 0,
LEF_BUSBITCHARS, LEF_DIVIDERCHAR, LEF_MANUFACTURINGGRID,
- LEF_USEMINSPACING, LEF_CLEARANCEMEASURE,
+ LEF_USEMINSPACING, LEF_CLEARANCEMEASURE, LEF_NOWIREEXTENSIONATPIN,
LEF_NAMESCASESENSITIVE, LEF_PROPERTYDEFS, LEF_UNITS,
LEF_SECTION_LAYER, LEF_SECTION_VIA, LEF_SECTION_VIARULE,
- LEF_SECTION_SPACING, LEF_SECTION_SITE, LEF_PROPERTY,
- LEF_NOISETABLE, LEF_CORRECTIONTABLE, LEF_IRDROP,
+ LEF_SECTION_NONDEFAULTRULE, LEF_SECTION_SPACING, LEF_SECTION_SITE,
+ LEF_PROPERTY, LEF_NOISETABLE, LEF_CORRECTIONTABLE, LEF_IRDROP,
LEF_ARRAY, LEF_SECTION_TIMING, LEF_EXTENSION, LEF_MACRO,
LEF_END};
/*
@@ -2592,7 +2595,7 @@ enum lef_layer_keys {LEF_LAYER_TYPE=0, LEF_LAYER_WIDTH,
LEF_LAYER_MINWIDTH, LEF_LAYER_MAXWIDTH, LEF_LAYER_AREA,
LEF_LAYER_SPACING, LEF_LAYER_SPACINGTABLE,
LEF_LAYER_PITCH, LEF_LAYER_DIRECTION, LEF_LAYER_OFFSET,
- LEF_LAYER_WIREEXT,
+ LEF_LAYER_FOREIGN, LEF_LAYER_WIREEXT,
LEF_LAYER_RES, LEF_LAYER_CAP, LEF_LAYER_EDGECAP,
LEF_LAYER_THICKNESS, LEF_LAYER_HEIGHT, LEF_LAYER_MINIMUMCUT,
LEF_LAYER_MINDENSITY, LEF_LAYER_ACDENSITY, LEF_LAYER_DCDENSITY,
@@ -2643,6 +2646,7 @@ LefReadLayerSection(f, lname, mode, lefl)
"PITCH",
"DIRECTION",
"OFFSET",
+ "FOREIGN",
"WIREEXTENSION",
"RESISTANCE",
"CAPACITANCE",
@@ -2786,6 +2790,7 @@ LefReadLayerSection(f, lname, mode, lefl)
}
LefEndStatement(f);
break;
+ case LEF_LAYER_FOREIGN:
case LEF_LAYER_MAXWIDTH:
// Not handled.
LefEndStatement(f);
@@ -3034,6 +3039,7 @@ LefReadLayerSection(f, lname, mode, lefl)
else
lefl->info.route.method = CALC_AGG_SIDEAREA;
LefEndStatement(f);
+ break;
case LEF_LAYER_ANTENNADIFF:
case LEF_LAYER_AGG_ANTENNADIFF:
/* Not specifically handling these antenna types */
@@ -3262,12 +3268,22 @@ LefAssignLayerVias()
if (lefl->info.via.generated == TRUE) {
/* Find the base layer and set hasGenerate[] for that layer */
baselayer = lefl->info.via.area.layer;
- if (lefl->info.via.lr)
+ if (lefl->info.via.lr) {
+ if (lefl->info.via.lr->layer < 0) {
+ lefl->info.via.generated = FALSE;
+ continue;
+ }
if ((baselayer < 0) || (lefl->info.via.lr->layer < baselayer))
baselayer = lefl->info.via.lr->layer;
- if (lefl->info.via.lr->next)
+ }
+ if (lefl->info.via.lr->next) {
+ if (lefl->info.via.lr->next->layer < 0) {
+ lefl->info.via.generated = FALSE;
+ continue;
+ }
if ((baselayer < 0) || (lefl->info.via.lr->next->layer < baselayer))
baselayer = lefl->info.via.lr->next->layer;
+ }
if ((baselayer >= 0) && (baselayer < MAX_LAYERS))
hasGenerate[baselayer] = TRUE;
}
@@ -3488,12 +3504,14 @@ LefRead(inName)
"MANUFACTURINGGRID",
"USEMINSPACING",
"CLEARANCEMEASURE",
+ "NOWIREEXTENSIONATPIN",
"NAMESCASESENSITIVE",
"PROPERTYDEFINITIONS",
"UNITS",
"LAYER",
"VIA",
"VIARULE",
+ "NONDEFAULTRULE",
"SPACING",
"SITE",
"PROPERTY",
@@ -3547,6 +3565,7 @@ LefRead(inName)
case LEF_CLEARANCEMEASURE:
case LEF_USEMINSPACING:
case LEF_NAMESCASESENSITIVE:
+ case LEF_NOWIREEXTENSIONATPIN:
LefEndStatement(f);
break;
case LEF_MANUFACTURINGGRID:
@@ -3561,6 +3580,11 @@ LefRead(inName)
case LEF_UNITS:
LefSkipSection(f, sections[LEF_UNITS]);
break;
+ case LEF_SECTION_NONDEFAULTRULE:
+ token = LefNextToken(f, TRUE);
+ sprintf(tsave, "%.127s", token);
+ LefSkipSection(f, tsave);
+ break;
case LEF_SECTION_VIA:
case LEF_SECTION_VIARULE:
diff --git a/main.c b/main.c
index 8455684..9427d46 100644
--- a/main.c
+++ b/main.c
@@ -31,6 +31,8 @@ main(int argc, char *argv[])
if (result < 5)
dosecondstage(0, FALSE, FALSE, (u_int)100);
write_def(NULL);
+ /* write_delays() cannot work in a non-Tcl build */
+ // write_delays((delayfilename == NULL) ? "stdout" : delayfilename);
return 0;
}
diff --git a/node.c b/node.c
index 7de614d..8662e38 100644
--- a/node.c
+++ b/node.c
@@ -17,6 +17,7 @@
#include "node.h"
#include "qconfig.h"
#include "lef.h"
+#include "def.h"
#include "output.h"
/*--------------------------------------------------------------*/
@@ -94,10 +95,18 @@ FreeNodeinfo(int gridx, int gridy, int layer)
/* also, it should check for tap points that are routable */
/* by a wire and not a tap. However, those conditions are */
/* rare and are left unhandled for now. */
+/* */
+/* If "unblock_all" is 1, then unblock all grid points that */
+/* are cleanly routable by being completely inside a pin with */
+/* available margins for placing a via, regardless of whether */
+/* or not the pin has other available tap points. This should */
+/* only be used if obstructions are drawn in the style where */
+/* they can abut pins (e.g., part of the pin has been marked */
+/* as an obstruction). */
/*--------------------------------------------------------------*/
void
-count_reachable_taps()
+count_reachable_taps(u_char unblock_all)
{
NODE node;
NODEINFO lnode;
@@ -130,7 +139,7 @@ count_reachable_taps()
node = g->noderec[i];
if (node == NULL) continue;
if (node->numnodes == 0) continue; // e.g., vdd or gnd bus
- if (node->numtaps == 0) {
+ if ((node->numtaps == 0) || (unblock_all == TRUE)) {
/* Will try more than one via if available */
for (orient = 0; orient < 4; orient += 2) {
@@ -139,6 +148,7 @@ count_reachable_taps()
deltay = 0.5 * LefGetXYViaWidth(ds->layer, ds->layer, 1, orient);
gridx = (int)((ds->x1 - Xlowerbound) / PitchX) - 1;
+ if (gridx < 0) gridx = 0;
while (1) {
dx = (gridx * PitchX) + Xlowerbound;
if (dx > ds->x2 || gridx >= NumChannelsX) break;
@@ -147,6 +157,7 @@ count_reachable_taps()
((ds->x2 - dx + EPS) > deltax)) {
gridy = (int)((ds->y1 - Ylowerbound)
/ PitchY) - 1;
+ if (gridy < 0) gridy = 0;
while (1) {
dy = (gridy * PitchY) + Ylowerbound;
if (dy > ds->y2 || gridy >= NumChannelsY)
@@ -219,6 +230,7 @@ count_reachable_taps()
deltay = 0.5 * LefGetXYViaWidth(ds->layer, ds->layer, 1, orient);
gridx = (int)((ds->x1 - Xlowerbound) / PitchX) - 1;
+ if (gridx < 0) gridx = 0;
while (1) {
dx = (gridx * PitchX) + Xlowerbound;
if (dx > ds->x2 || gridx >= NumChannelsX) break;
@@ -226,6 +238,7 @@ count_reachable_taps()
if (((dx - ds->x1 + EPS) > -deltax) &&
((ds->x2 - dx + EPS) > -deltax)) {
gridy = (int)((ds->y1 - Ylowerbound) / PitchY) - 1;
+ if (gridy < 0) gridy = 0;
while (1) {
dy = (gridy * PitchY) + Ylowerbound;
@@ -233,13 +246,20 @@ count_reachable_taps()
break;
// Check that the grid position is inside the
- // tap rectangle. However, if the point above
- // the grid is blocked, then a via cannot be
- // placed here, so skip it.
+ // tap rectangle.
+
+ // NOTE: If the point above the grid is blocked,
+ // then a via cannot be placed here, so skip it.
+ // This currently looks only for completely
+ // obstructed positions. To do: For directionally
+ // obstructed positions, see if the obstruction
+ // is in the opposite direction of the via's
+ // offset and at least the same distance.
+ // Otherwise, it won't clear.
if (((ds->layer == Num_layers - 1) ||
!(OBSVAL(gridx, gridy, ds->layer + 1)
- & NO_NET)) &&
+ & (NO_NET || OBSTRUCT_MASK))) &&
((dy - ds->y1 + EPS) > -deltay) &&
((ds->y2 - dy + EPS) > -deltay)) {
@@ -371,6 +391,66 @@ count_reachable_taps()
print_node_name(node), node->netname);
Fprintf(stderr, "Qrouter will not be able to completely"
" route this net.\n");
+ if (Verbose > 1) {
+ int found_inside, found_inrange;
+ Fprintf(stderr, "Tap position blockage analysis:\n");
+
+ /* Unreachable taps are the most common problem with */
+ /* new processes or buggy code, so make a detailed */
+ /* report of blockages affecting routing for debugging. */
+
+ found_inside = found_inrange = 0;
+ for (ds = g->taps[i]; ds; ds = ds->next) {
+ unsigned char is_inside, is_inrange;
+
+ deltax = 0.5 * LefGetXYViaWidth(ds->layer, ds->layer, 0, 0);
+ deltay = 0.5 * LefGetXYViaWidth(ds->layer, ds->layer, 1, 0);
+
+ Fprintf(stderr, "Tap geometry (%g %g) to (%g %g):\n",
+ ds->x1, ds->y1, ds->x2, ds->y2);
+
+ gridx = (int)(((ds->x1 - 1) - Xlowerbound) / PitchX) - 1;
+ if (gridx < 0) gridx = 0;
+ while (1) {
+ dx = (gridx * PitchX) + Xlowerbound;
+ if (dx > (ds->x2 + 1) || gridx >= NumChannelsX) break;
+ gridy = (int)(((ds->y1 - 1) - Ylowerbound) / PitchY) - 1;
+ if (gridy < 0) gridy = 0;
+ while (1) {
+ dy = (gridy * PitchY) + Ylowerbound;
+ if (dy > (ds->y2 + 1) || gridy >= NumChannelsY)
+ break;
+
+ is_inside = (dx >= ds->x1 && dx <= ds->x2 &&
+ dy >= ds->y1 && dy <= ds->y2) ? 1 : 0;
+
+ is_inrange = (dx > ds->x1 - deltax &&
+ dx < ds->x2 + deltax &&
+ dy > ds->y1 - deltay &&
+ dy < ds->y2 + deltay) ? 1 : 0;
+
+ if (is_inrange) {
+ Fprintf(stderr, "Grid position (%d %d) at (%g %g) "
+ "layer %d is %s tap geometry.\n",
+ gridx, gridy, dx, dy, ds->layer,
+ (is_inside == 1) ? "inside" : "outside");
+ print_grid_information(gridx, gridy, ds->layer);
+ found_inrange++;
+ if (is_inside) found_inside++;
+ }
+ gridy++;
+ }
+ gridx++;
+ }
+ }
+ if (found_inrange == 0) Fprintf(stderr, "No positions analyzed.\n");
+ Fprintf(stderr, "%d grid position%s found "
+ "inside tap geometry\n", found_inside,
+ ((found_inside == 1) ? " was" : "s were"));
+ Fprintf(stderr, "%d grid position%s found "
+ "nearby tap geometry\n", found_inrange,
+ ((found_inrange == 1) ? " was" : "s were"));
+ }
}
}
}
@@ -427,16 +507,15 @@ void check_variable_pitch(int l, int *hptr, int *vptr)
vpitch = 0.5 * (LefGetRouteWidth(l) + wvia) + LefGetRouteSpacing(l);
}
- vnum = 1;
- while (vpitch > PitchY + EPS) {
- vpitch /= 2.0;
- vnum++;
- }
- hnum = 1;
- while (hpitch > PitchX + EPS) {
- hpitch /= 2.0;
- hnum++;
- }
+ vnum = (int)((vpitch / PitchY) - EPS) + 1;
+ hnum = (int)((hpitch / PitchX) - EPS) + 1;
+
+ // To mark blockages, either none of (hnum & vnum) should be
+ // larger than 1, or both of them should be. Further info in
+ // create_obstructions_from_variable_pitch(), below.
+
+ if (vnum > 1 && hnum == 1) hnum++;
+ if (hnum > 1 && vnum == 1) vnum++;
*vptr = vnum;
*hptr = hnum;
@@ -458,13 +537,56 @@ void check_variable_pitch(int l, int *hptr, int *vptr)
void create_obstructions_from_variable_pitch(void)
{
- int l, vnum, hnum, x, y;
+ int l, vnum, hnum, hoff, voff, x, y;
NODEINFO lnode;
+ TRACKS tracksinfo, tracksinfoother;
for (l = 0; l < Num_layers; l++) {
+ // check_variable_pitch() guarantees that either hnum
+ // and vnum are both one, or both are larger than 1.
+
check_variable_pitch(l, &hnum, &vnum);
+ if (hnum == 1 && vnum == 1) continue; // No obstructions needed
+
+ // Compute the offset of the tracks to mark obstructions
+ tracksinfo = DefGetTracks(l);
+ if (tracksinfo == NULL) {
+ // Should look at standard cell placement and LEF offset
+ // to determine offset here. For now, just use 0.
+ hoff = voff = 0;
+ }
+ else {
+ // Use the start position relative to lowerbound to determine
+ // the offset. use the offset of the higher or lower layer
+ // for determining the offset in the opposite direction of
+ // the current layer orientation.
+ if (l < Num_layers - 1) {
+ // If not the top layer, then use the upper layer as the other layer
+ tracksinfoother = DefGetTracks(l + 1);
+ }
+ else if (l > 0) {
+ // Otherwise, use the lower layer
+ tracksinfoother = DefGetTracks(l - 1);
+ }
+ else {
+ // Should not happen, as it means routing is done with one layer. . .
+ tracksinfoother = (TRACKS)NULL;
+ }
+
+ if (Vert[l]) {
+ hoff = (int)((tracksinfo->start - Xlowerbound) / PitchX + 0.5);
+ voff = (tracksinfoother == (TRACKS)NULL) ?
+ 0 : (int)((tracksinfoother->start - Ylowerbound) / PitchY + 0.5);
+ }
+ else {
+ voff = (int)((tracksinfo->start - Ylowerbound) / PitchY + 0.5);
+ hoff = (tracksinfoother == (TRACKS)NULL) ?
+ 0 : (int)((tracksinfoother->start - Xlowerbound) / PitchX + 0.5);
+ }
+ }
+
// This could be better handled by restricting
// access from specific directions rather than
// marking a position as NO_NET. Since the
@@ -473,14 +595,11 @@ void create_obstructions_from_variable_pitch(void)
// the other value, then we force both values to
// be at least 2.
- if (vnum > 1 && hnum == 1) hnum++;
- if (hnum > 1 && vnum == 1) vnum++;
-
if (vnum > 1 || hnum > 1) {
for (x = 0; x < NumChannelsX; x++) {
- if (x % hnum == 0) continue;
+ if ((x - hoff) % hnum == 0) continue;
for (y = 0; y < NumChannelsY; y++) {
- if (y % vnum == 0) continue;
+ if ((y - voff) % vnum == 0) continue;
// If the grid position itself is a node, don't restrict
// routing based on variable pitch.
@@ -808,8 +927,11 @@ void create_obstructions_from_gates(void)
}
else edist = 0;
- if ((edist + EPS) < (s * s))
+ if ((edist + EPS) < (s * s)) {
check_obstruct(gridx, gridy, ds, dx, dy, s);
+ if (is_testpoint(gridx, gridy, g, -1, ds) != NULL)
+ Fprintf(stderr, " Position blocked by gate obstruction.\n");
+ }
else
edist = 0; // diagnostic break
}
@@ -876,8 +998,12 @@ void create_obstructions_from_gates(void)
}
else edist = 0;
- if ((edist + EPS) < (s * s))
+ if ((edist + EPS) < (s * s)) {
check_obstruct(gridx, gridy, ds, dx, dy, s);
+ if (is_testpoint(gridx, gridy, g, i, ds) != NULL)
+ Fprintf(stderr, " Position blocked by unused"
+ " gate pin.\n");
+ }
}
gridy++;
}
@@ -912,8 +1038,11 @@ void create_obstructions_from_gates(void)
dy = (gridy * PitchY) + Ylowerbound;
if (dy > (ds->y2 + delta[ds->layer])
|| gridy >= NumChannelsY) break;
- if (dy >= (ds->y1 - delta[ds->layer]) && gridy >= 0)
+ if (dy >= (ds->y1 - delta[ds->layer]) && gridy >= 0) {
check_obstruct(gridx, gridy, ds, dx, dy, delta[i]);
+ if (is_testpoint(gridx, gridy, NULL, -1, ds) != NULL)
+ Fprintf(stderr, " Position blocked by defined obstruction.\n");
+ }
gridy++;
}
@@ -1000,6 +1129,79 @@ void expand_tap_geometry(void)
}
/*--------------------------------------------------------------*/
+/* is_testpoint() */
+/* */
+/* Check if a grid position is on the testpoint list. If so, */
+/* return the pointer to the testpoint structure. */
+/*--------------------------------------------------------------*/
+
+DPOINT
+is_testpoint(int gridx, int gridy, GATE g, int nidx, DSEG ds)
+{
+ int layer;
+ DPOINT trypoint;
+ NODE node = NULL, onode;
+ NODEINFO lnode;
+
+ layer = ds->layer;
+ for (trypoint = testpoint; trypoint; trypoint = trypoint->next) {
+ if (trypoint->gridx == gridx && trypoint->gridy == gridy &&
+ trypoint->layer == layer) {
+ Fprintf(stderr, "Watchpoint (%g, %g) layer %d"
+ " grid (%d, %d):\n",
+ trypoint->x, trypoint->y, trypoint->layer,
+ trypoint->gridx, trypoint->gridy);
+ if (g != NULL) {
+ Fprintf(stderr, " Gate instance = \"%s\"\n", g->gatename);
+ if (g->gatetype)
+ Fprintf(stderr, " Gate cell = \"%s\"\n", g->gatetype->gatename);
+
+ if (nidx >= 0) {
+ Fprintf(stderr, " Gate pin = \"%s\"\n", g->node[nidx]);
+ Fprintf(stderr, " Pin geometry = (%g, %g) to (%g, %g)\n",
+ ds->x1, ds->y1, ds->x2, ds->y2);
+ node = g->noderec[nidx];
+ Fprintf(stderr, " Connects to net \"%s\"\n", node->netname);
+ }
+ }
+ if (nidx < 0) {
+ Fprintf(stderr, " Obstruction geometry = (%g, %g) to (%g, %g)\n",
+ ds->x1, ds->y1, ds->x2, ds->y2);
+ }
+ lnode = NODEIPTR(gridx, gridy, layer);
+ if (lnode != NULL) {
+ onode = lnode->nodesav;
+ if (onode != NULL) {
+ if (node && (onode->netnum != node->netnum)) {
+ if (onode->netname)
+ Fprintf(stderr, " Position was previously assigned"
+ " to node %s on net %s\n", print_node_name(onode),
+ onode->netname);
+ else
+ Fprintf(stderr, " Position was previously assigned"
+ " to node %s on different net\n",
+ print_node_name(onode));
+ }
+ else {
+ Fprintf(stderr, " Position was previously assigned"
+ " to node %s on the same net\n",
+ print_node_name(onode));
+ }
+ }
+ else Fprintf(stderr, " Position was previously assigned"
+ " to a node that has been disabled.\n");
+ }
+ else Fprintf(stderr, " Position was not previously assigned"
+ " to a node\n");
+
+ Fprintf(stderr, "Disabled position because:\n");
+ return trypoint;
+ }
+ }
+ return NULL;
+}
+
+/*--------------------------------------------------------------*/
/* create_obstructions_inside_nodes() */
/* */
/* Fills in the Obs[][] grid from the position of each node */
@@ -1028,6 +1230,7 @@ void create_obstructions_inside_nodes(void)
NODEINFO lnode;
GATE g;
DSEG ds;
+ DPOINT tpoint;
u_int dir, mask, k;
int i, gridx, gridy;
double dx, dy, xdist, vwx, vwy;
@@ -1055,11 +1258,13 @@ void create_obstructions_inside_nodes(void)
for (ds = g->taps[i]; ds; ds = ds->next) {
gridx = (int)((ds->x1 - Xlowerbound) / PitchX) - 1;
+ if (gridx < 0) gridx = 0;
while (1) {
dx = (gridx * PitchX) + Xlowerbound;
if (dx > ds->x2 || gridx >= NumChannelsX) break;
else if (dx >= ds->x1 && gridx >= 0) {
gridy = (int)((ds->y1 - Ylowerbound) / PitchY) - 1;
+ if (gridy < 0) gridy = 0;
while (1) {
dy = (gridy * PitchY) + Ylowerbound;
if (dy > ds->y2 || gridy >= NumChannelsY) break;
@@ -1097,6 +1302,9 @@ void create_obstructions_inside_nodes(void)
// that it falls through on all subsequent
// processing.
+ if (is_testpoint(gridx, gridy, g, i, ds) != NULL)
+ Fprintf(stderr, " Position is inside pin but cannot "
+ "be routed without causing violation.\n");
disable_gridpos(gridx, gridy, ds->layer);
gridy++;
continue;
@@ -1287,6 +1495,7 @@ void create_obstructions_outside_nodes(void)
NODEINFO lnode;
GATE g;
DSEG ds;
+ DPOINT tpoint;
u_int dir, mask, k;
int i, gridx, gridy, orient;
double dx, dy, xdist, deltax, deltay;
@@ -1331,6 +1540,7 @@ void create_obstructions_outside_nodes(void)
deltax = get_via_clear(ds->layer, 1, orient, ds);
gridx = (int)((ds->x1 - Xlowerbound - deltax) / PitchX) - 1;
+ if (gridx < 0) gridx = 0;
while (1) {
dx = (gridx * PitchX) + Xlowerbound;
@@ -1347,6 +1557,7 @@ void create_obstructions_outside_nodes(void)
else if ((dx - EPS) > (ds->x1 - deltax) && gridx >= 0) {
deltay = get_via_clear(ds->layer, 0, orient, ds);
gridy = (int)((ds->y1 - Ylowerbound - deltay) / PitchY) - 1;
+ if (gridy < 0) gridy = 0;
while (1) {
dy = (gridy * PitchY) + Ylowerbound;
@@ -1437,8 +1648,9 @@ void create_obstructions_outside_nodes(void)
if ((ds->layer < Num_layers - 1) &&
(gridy > 0) &&
(OBSVAL(gridx, gridy - 1,
- ds->layer + 1) & OBSTRUCT_MASK))
+ ds->layer + 1) & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
@@ -1461,8 +1673,9 @@ void create_obstructions_outside_nodes(void)
if ((ds->layer < Num_layers - 1) &&
(gridy < NumChannelsY - 1) &&
(OBSVAL(gridx, gridy + 1,
- ds->layer + 1) & OBSTRUCT_MASK))
+ ds->layer + 1) & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
@@ -1485,8 +1698,9 @@ void create_obstructions_outside_nodes(void)
if ((ds->layer < Num_layers - 1) &&
(gridx > 0) &&
(OBSVAL(gridx - 1, gridy,
- ds->layer + 1) & OBSTRUCT_MASK))
+ ds->layer + 1) & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
@@ -1509,15 +1723,22 @@ void create_obstructions_outside_nodes(void)
if ((ds->layer < Num_layers - 1) &&
(gridx < NumChannelsX - 1) &&
(OBSVAL(gridx + 1, gridy,
- ds->layer + 1) & OBSTRUCT_MASK))
+ ds->layer + 1) & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
}
- if (maxerr == 1)
- disable_gridpos(gridx, gridy, ds->layer);
+ if (maxerr == 1) {
+ if (is_testpoint(gridx, gridy, g, i, ds) != NULL)
+ Fprintf(stderr,
+ "Attempted to clear obstruction with"
+ " offset, but offset is more than 1/2"
+ " route pitch.\n");
+ disable_gridpos(gridx, gridy, ds->layer);
+ }
// Diagnostic
else if (Verbose > 3)
@@ -1630,8 +1851,9 @@ void create_obstructions_outside_nodes(void)
(gridx > 0) &&
(OBSVAL(gridx - 1, gridy,
ds->layer + 1)
- & OBSTRUCT_MASK))
+ & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
else if ((dx <= ds->x1) &&
@@ -1646,8 +1868,9 @@ void create_obstructions_outside_nodes(void)
(NumChannelsX - 1)
&& (OBSVAL(gridx + 1, gridy,
ds->layer + 1)
- & OBSTRUCT_MASK))
+ & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
@@ -1665,8 +1888,9 @@ void create_obstructions_outside_nodes(void)
(NumChannelsY - 1)
&& (OBSVAL(gridx, gridy - 1,
ds->layer + 1)
- & OBSTRUCT_MASK))
+ & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
else if ((dy <= ds->y1) &&
@@ -1680,8 +1904,9 @@ void create_obstructions_outside_nodes(void)
(gridy > 0) &&
(OBSVAL(gridx, gridy + 1,
ds->layer + 1)
- & OBSTRUCT_MASK))
+ & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
@@ -1955,7 +2180,11 @@ void create_obstructions_outside_nodes(void)
// called STUBROUTE_X).
if (dir == NI_STUB_MASK) {
- disable_gridpos(gridx, gridy, ds->layer);
+ if (is_testpoint(gridx, gridy, g, i, ds) != NULL)
+ Fprintf(stderr, "Tap point is blocked in "
+ "and cannot be routed without causing "
+ "DRC violations.\n");
+ disable_gridpos(gridx, gridy, ds->layer);
}
}
else if (epass == 0) {
@@ -1993,8 +2222,17 @@ void create_obstructions_outside_nodes(void)
// node record. This will probably need
// revisiting.
- if ((k & PINOBSTRUCTMASK) != 0)
+ if ((k & PINOBSTRUCTMASK) != 0) {
+ if (is_testpoint(gridx, gridy, g, i, ds) != NULL) {
+ if (k & STUBROUTE)
+ Fprintf(stderr, "Position marked as a "
+ "stub route for the net.\n");
+ else
+ Fprintf(stderr, "Position marked as a "
+ "tap offset for the net.\n");
+ }
disable_gridpos(gridx, gridy, ds->layer);
+ }
else if ((lnode = NODEIPTR(gridx, gridy, ds->layer))
!= NULL && (lnode->nodesav != NULL)) {
@@ -2030,12 +2268,14 @@ void create_obstructions_outside_nodes(void)
if ((ds->layer < Num_layers - 1) &&
(gridx > 0) &&
(OBSVAL(gridx + 1, gridy,
- ds->layer + 1) & OBSTRUCT_MASK))
+ ds->layer + 1) & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
else if ((ds->layer < Num_layers - 1) &&
(gridx > 0) &&
- (dist > PitchX / 2))
+ (dist > PitchX / 2)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
@@ -2062,13 +2302,15 @@ void create_obstructions_outside_nodes(void)
if ((ds->layer < Num_layers - 1) && gridx <
(NumChannelsX - 1) &&
(OBSVAL(gridx - 1, gridy,
- ds->layer + 1) & OBSTRUCT_MASK))
+ ds->layer + 1) & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
else if ((ds->layer < Num_layers - 1) &&
gridx <
(NumChannelsX - 1) &&
- (dist < -PitchX / 2))
+ (dist < -PitchX / 2)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
@@ -2096,12 +2338,14 @@ void create_obstructions_outside_nodes(void)
if ((ds->layer < Num_layers - 1) &&
(gridy > 0) && (OBSVAL(gridx,
gridy + 1, ds->layer + 1)
- & OBSTRUCT_MASK))
+ & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
else if ((ds->layer < Num_layers - 1) &&
(gridy > 0) &&
- (dist > PitchY / 2))
+ (dist > PitchY / 2)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
@@ -2129,13 +2373,15 @@ void create_obstructions_outside_nodes(void)
gridx <
(NumChannelsX - 1) &&
(OBSVAL(gridx, gridy - 1,
- ds->layer + 1) & OBSTRUCT_MASK))
+ ds->layer + 1) & OBSTRUCT_MASK)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
else if ((ds->layer < Num_layers - 1) &&
gridx <
(NumChannelsX - 1) &&
- (dist < -PitchY / 2))
+ (dist < -PitchY / 2)) {
block_route(gridx, gridy, ds->layer, UP);
+ }
}
}
}
@@ -2149,14 +2395,24 @@ void create_obstructions_outside_nodes(void)
if (orient == 2) {
// Maybe no need to revert the flag?
lnode->flags &= ~NI_NO_VIAX;
+ if (is_testpoint(gridx, gridy,
+ g, i, ds) != NULL)
+ Fprintf(stderr, "Unable to find "
+ "a viable offset for a tap.\n");
disable_gridpos(gridx, gridy, ds->layer);
}
else
lnode->flags |= NI_NO_VIAX;
}
}
- else
+ else {
+ if (is_testpoint(gridx, gridy,
+ g, i, ds) != NULL)
+ Fprintf(stderr, "Tap point is too "
+ "close to two different nodes "
+ "and no offsets are possible.\n");
disable_gridpos(gridx, gridy, ds->layer);
+ }
}
/* If we are on a layer > 0, then this geometry */
@@ -2280,6 +2536,7 @@ void tap_to_tap_interactions(void)
NODEINFO lnode;
GATE g;
DSEG ds;
+ DPOINT tpoint;
struct dseg_ de;
int mingridx, mingridy, maxgridx, maxgridy;
int i, gridx, gridy, net, orignet;
@@ -2360,8 +2617,13 @@ void tap_to_tap_interactions(void)
/* the tap geometry? */
if ((de.x1 < ds->x2) && (ds->x1 < de.x2) &&
- (de.y1 < ds->y2) && (ds->y1 < de.y2))
+ (de.y1 < ds->y2) && (ds->y1 < de.y2)) {
+ if (is_testpoint(gridx, gridy,
+ g, i, ds) != NULL)
+ Fprintf(stderr, "Offset tap interferes "
+ "with position.\n");
disable_gridpos(gridx, gridy, ds->layer);
+ }
}
}
@@ -2472,11 +2734,13 @@ make_routable(NODE node)
if (g->noderec[i] == node) {
for (ds = g->taps[i]; ds; ds = ds->next) {
gridx = (int)((ds->x1 - Xlowerbound) / PitchX) - 1;
+ if (gridx < 0) gridx = 0;
while (1) {
dx = (gridx * PitchX) + Xlowerbound;
if (dx > ds->x2 || gridx >= NumChannelsX) break;
else if (dx >= ds->x1 && gridx >= 0) {
gridy = (int)((ds->y1 - Ylowerbound) / PitchY) - 1;
+ if (gridy < 0) gridy = 0;
while (1) {
dy = (gridy * PitchY) + Ylowerbound;
if (dy > ds->y2 || gridy >= NumChannelsY) break;
@@ -3164,10 +3428,12 @@ find_route_blocks()
lnode = NODEIPTR(gridx, gridy, lds.layer);
u = ((OBSVAL(gridx, gridy, lds.layer) & STUBROUTE)
&& (lnode->flags & NI_STUB_EW)) ? v : w;
- if (dy + EPS < lds.y2 - u)
+ if (dy + EPS < lds.y2 - u) {
block_route(gridx, gridy, lds.layer, NORTH);
- if (dy - EPS > lds.y1 + u)
+ }
+ if (dy - EPS > lds.y1 + u) {
block_route(gridx, gridy, lds.layer, SOUTH);
+ }
dy += PitchY;
gridy++;
}
@@ -3197,10 +3463,12 @@ find_route_blocks()
lnode = NODEIPTR(gridx, gridy, lds.layer);
u = ((OBSVAL(gridx, gridy, lds.layer) & STUBROUTE)
&& (lnode->flags & NI_STUB_EW)) ? v : w;
- if (dy + EPS < lds.y2 - u)
+ if (dy + EPS < lds.y2 - u) {
block_route(gridx, gridy, lds.layer, NORTH);
- if (dy - EPS > lds.y1 + u)
+ }
+ if (dy - EPS > lds.y1 + u) {
block_route(gridx, gridy, lds.layer, SOUTH);
+ }
dy += PitchY;
gridy++;
}
@@ -3230,10 +3498,12 @@ find_route_blocks()
lnode = NODEIPTR(gridx, gridy, lds.layer);
u = ((OBSVAL(gridx, gridy, lds.layer) & STUBROUTE)
&& (lnode->flags & NI_STUB_NS)) ? v : w;
- if (dx + EPS < lds.x2 - u)
+ if (dx + EPS < lds.x2 - u) {
block_route(gridx, gridy, lds.layer, EAST);
- if (dx - EPS > lds.x1 + u)
+ }
+ if (dx - EPS > lds.x1 + u) {
block_route(gridx, gridy, lds.layer, WEST);
+ }
dx += PitchX;
gridx++;
}
@@ -3263,10 +3533,12 @@ find_route_blocks()
lnode = NODEIPTR(gridx, gridy, lds.layer);
u = ((OBSVAL(gridx, gridy, lds.layer) & STUBROUTE)
&& (lnode->flags & NI_STUB_NS)) ? v : w;
- if (dx + EPS < lds.x2 - u)
+ if (dx + EPS < lds.x2 - u) {
block_route(gridx, gridy, lds.layer, EAST);
- if (dx - EPS > lds.x1 + u)
+ }
+ if (dx - EPS > lds.x1 + u) {
block_route(gridx, gridy, lds.layer, WEST);
+ }
dx += PitchX;
gridx++;
}
diff --git a/node.h b/node.h
index e44de43..91fc0ee 100644
--- a/node.h
+++ b/node.h
@@ -13,9 +13,8 @@
void find_bounding_box(NET net);
void defineRouteTree(NET);
-void print_nodes(char *filename);
-void print_nlnets(char *filename);
-void count_reachable_taps();
+DPOINT is_testpoint(int, int, GATE, int, DSEG);
+void count_reachable_taps(u_char);
void check_variable_pitch(int, int *, int *);
void create_obstructions_from_variable_pitch(void);
void count_pinlayers(void);
diff --git a/output.c b/output.c
index 056deb6..71144c7 100644
--- a/output.c
+++ b/output.c
@@ -426,7 +426,8 @@ void print_net(NET net) {
Fprintf(stdout, "Net %d: %s", net->netnum, net->netname);
for (node = net->netnodes; node != NULL; node = node->next) {
- Fprintf(stdout, "\n Node %d: \n Taps: ", node->nodenum);
+ Fprintf(stdout, "\n Node %d (%s): \n Taps: ",
+ node->nodenum, print_node_name(node));
for (tap = node->taps, i = 0, first = TRUE;
tap != NULL;
tap = tap->next, i = (i + 1) % 4, first = FALSE) {
@@ -607,6 +608,278 @@ void print_nlnets( char *filename )
} /* print_nlnets() */
/*--------------------------------------------------------------*/
+/* print_grid_information() */
+/* */
+/* For help in debugging routing problems, print information */
+/* about blockages marked at a specific grid position. */
+/*--------------------------------------------------------------*/
+
+void
+print_grid_information(int gridx, int gridy, int layer)
+{
+ u_int obsval;
+ int i, apos;
+ double dx, dy;
+ int netidx;
+ NET net;
+ NODE node;
+ NODEINFO lnode;
+ DSEG ds;
+
+ apos = OGRID(gridx, gridy);
+ obsval = Obs[layer][apos];
+
+ lnode = Nodeinfo[layer][apos];
+ if (lnode != NULL) {
+ node = lnode->nodesav;
+ if (node != NULL) {
+ Fprintf(stdout, "Grid position %d %d is an active node tap.\n",
+ gridx, gridy);
+
+ if (node->netname)
+ Fprintf(stdout, "Node at grid position is %s and belongs "
+ "to net \"%s\".\n", print_node_name(node), node->netname);
+ else
+ Fprintf(stdout, "Node at grid position is %s and is not routed.\n",
+ print_node_name(node));
+ if (lnode->nodeloc == NULL) {
+ Fprintf(stdout, "Position temporarily disabled to avoid "
+ "blocking the tap.\n");
+ }
+ }
+ else
+ Fprintf(stdout, "Grid position %d %d is a disabled node tap.\n",
+ gridx, gridy);
+
+ if (lnode->flags & NI_VIA_X)
+ Fprintf(stdout, "Via may be placed horizontally on tap.\n");
+ if (lnode->flags & NI_VIA_Y)
+ Fprintf(stdout, "Via may be placed vertically on tap.\n");
+ if (lnode->flags & NI_NO_VIAX)
+ Fprintf(stdout, "Horizontal vias are prohibited on tap.\n");
+ if (lnode->flags & NI_NO_VIAY)
+ Fprintf(stdout, "Vertical vias are prohibited on tap.\n");
+ if (lnode->flags & NI_OFFSET_EW) {
+ if (lnode->offset > 0.0)
+ Fprintf(stdout, "Tap connection offset to the east %gum\n",
+ lnode->offset);
+ else
+ Fprintf(stdout, "Tap connection offset to the west %gum\n",
+ -lnode->offset);
+ }
+ if (lnode->flags & NI_OFFSET_NS) {
+ if (lnode->offset > 0.0)
+ Fprintf(stdout, "Tap connection offset to the north %gum\n",
+ lnode->offset);
+ else
+ Fprintf(stdout, "Tap connection offset to the south %gum\n",
+ -lnode->offset);
+ }
+ if (lnode->flags & NI_STUB_EW) {
+ if (lnode->stub > 0.0)
+ Fprintf(stdout, "Stub connection to the east length %gum\n",
+ lnode->stub);
+ else
+ Fprintf(stdout, "Stub connection to the west length %gum\n",
+ -lnode->stub);
+ }
+ if (lnode->flags & NI_STUB_NS) {
+ if (lnode->stub > 0.0)
+ Fprintf(stdout, "Stub connection to the north length %gum\n",
+ lnode->stub);
+ else
+ Fprintf(stdout, "Stub connection to the south length %gum\n",
+ -lnode->stub);
+ }
+ if ((lnode->flags == 0) || (lnode->flags == NI_VIA_X | NI_VIA_Y))
+ Fprintf(stdout, "Node is cleanly routable with no restrictions.\n");
+ }
+ else
+ Fprintf(stdout, "Grid position is not associated with a node tap.\n");
+
+ if (obsval & OFFSET_TAP)
+ Fprintf(stdout, "Grid position requires a route position offset.\n");
+ if (obsval & STUBROUTE)
+ Fprintf(stdout, "Grid position requires a stub route to reach tap.\n");
+ if (obsval & ROUTED_NET)
+ Fprintf(stdout, "Grid position is assigned to routed net.\n");
+ if (obsval & BLOCKED_N)
+ Fprintf(stdout, "Grid position cannot be reached from the north.\n");
+ if (obsval & BLOCKED_S)
+ Fprintf(stdout, "Grid position cannot be reached from the south.\n");
+ if (obsval & BLOCKED_E)
+ Fprintf(stdout, "Grid position cannot be reached from the east.\n");
+ if (obsval & BLOCKED_W)
+ Fprintf(stdout, "Grid position cannot be reached from the west.\n");
+ if (obsval & BLOCKED_U)
+ Fprintf(stdout, "Grid position cannot be reached from above.\n");
+ if (obsval & BLOCKED_D)
+ Fprintf(stdout, "Grid position cannot be reached from below.\n");
+ if ((obsval & (OBSTRUCT_MASK | NO_NET)) == (OBSTRUCT_MASK | NO_NET)) {
+ Fprintf(stdout, "Grid position is completely obstructed\n");
+
+ /* Check if grid position is completely obstructed by a UserObs object */
+ dx = Xlowerbound + gridx * PitchX;
+ dy = Ylowerbound + gridy * PitchY;
+ for (ds = UserObs; ds; ds = ds->next) {
+ if (ds->layer == layer) {
+ if (ds->x1 < dx && ds->x2 > dx && ds->y1 < dy && ds->y2 > dy) {
+ Fprintf(stdout, "Defined obstruction at (%g, %g) to (%g, %g) "
+ "covers the tap point.\n",
+ ds->x1, ds->y1, ds->x2, ds->y2);
+ }
+ }
+ }
+ }
+ else if (obsval & NO_NET) {
+ if ((obsval & OBSTRUCT_MASK != 0) && (lnode == NULL)) {
+ Fprintf(stdout, "Error: Position marked as node obstruction has "
+ "no node assigned!\n");
+ }
+ else if (lnode != NULL) {
+ if (obsval & OBSTRUCT_N)
+ Fprintf(stdout, "Grid position is obstructed to the north at %gum.\n",
+ lnode->offset);
+ if (obsval & OBSTRUCT_S)
+ Fprintf(stdout, "Grid position is obstructed to the south at %gum.\n",
+ lnode->offset);
+ if (obsval & OBSTRUCT_E)
+ Fprintf(stdout, "Grid position is obstructed to the east at %gum.\n",
+ lnode->offset);
+ if (obsval & OBSTRUCT_W)
+ Fprintf(stdout, "Grid position is obstructed to the west at %gum.\n",
+ lnode->offset);
+ }
+ }
+ if ((obsval & DRC_BLOCKAGE) == DRC_BLOCKAGE) {
+ Fprintf(stdout, "Grid position disabled by neighboring route to prevent"
+ " DRC violations.\n");
+ }
+ if (((obsval & ROUTED_NET_MASK) != 0) && ((obsval & NO_NET) == 0)) {
+ netidx = obsval & NETNUM_MASK;
+ for (i = 0; i < Numnets; i++) {
+ net = Nlnets[i];
+ if (net->netnum == netidx) break;
+ }
+
+ if ((netidx > MAX_NETNUMS) || (i >= Numnets)) {
+ Fprintf(stdout, "Error: Grid position marked with a bad net number.\n");
+ }
+ else {
+ net = Nlnets[i];
+ Fprintf(stdout, "Grid position assigned to routed net \"%s\".\n",
+ net->netname);
+ }
+ }
+}
+
+/*--------------------------------------------------------------*/
+/* print_instance_information() */
+/* */
+/* For help in debugging routing problems, print information */
+/* about an instance. */
+/*--------------------------------------------------------------*/
+
+void
+print_instance_information(char *instname)
+{
+ NET net;
+ GATE gate;
+
+ for (gate = Nlgates; gate; gate = gate->next) {
+ if (!strcmp(gate->gatename, instname)) {
+ print_gate(gate);
+ break;
+ }
+ }
+}
+
+/*--------------------------------------------------------------*/
+/* print_node_information() */
+/* */
+/* For help in debugging routing problems, print information */
+/* about a node (instance and pin). */
+/*--------------------------------------------------------------*/
+
+void
+print_node_information(char *nodename)
+{
+ int i, j, k, l, apos;
+ NET net;
+ NODE node;
+ NODEINFO lnode;
+ GATE gate;
+ char *pptr, *instname, *pinname;
+
+ pptr = strchr(nodename, '/');
+ if (pptr == NULL) {
+ Fprintf(stderr, "Node name is not in <instance>/<pin> format!\n");
+ return;
+ }
+ *pptr = '\0';
+ instname = nodename;
+ pinname = pptr + 1;
+
+ for (gate = Nlgates; gate; gate = gate->next) {
+ if (!strcmp(gate->gatename, instname)) {
+ for (i = 0; i < gate->nodes; i++) {
+ if (!strcmp(gate->node[i], pinname)) {
+ node = gate->noderec[i];
+ Fprintf(stdout, "Instance name is %s\n", gate->gatename);
+ if (gate->gatetype)
+ Fprintf(stdout, "Gate type is %s\n", gate->gatetype->gatename);
+ else
+ Fprintf(stdout, "Node name is %s\n", print_node_name(node));
+ Fprintf(stdout, "Net connecting to node is %s\n", node->netname);
+
+ /* Find all grid positions that route to this node */
+ Fprintf(stdout, "Grid positions assigned to node:\n");
+ for (j = 0; j < NumChannelsX; j++) {
+ for (k = 0; k < NumChannelsY; k++) {
+ for (l = 0; l < Pinlayers; l++) {
+ apos = OGRID(j, k);
+ lnode = Nodeinfo[l][apos];
+ if (lnode && lnode->nodesav == node) {
+ Fprintf(stdout, " (%g, %g)um x=%d y=%d layer=%d\n",
+ Xlowerbound + j * PitchX,
+ Ylowerbound + k * PitchY,
+ j, k, l);
+ }
+ }
+ }
+ }
+ break;
+ }
+ }
+ break;
+ }
+ }
+ *pptr = '/';
+}
+
+/*--------------------------------------------------------------*/
+/* print_net_information() */
+/* */
+/* For help in debugging routing problems, print information */
+/* about a net. */
+/*--------------------------------------------------------------*/
+
+void
+print_net_information(char *netname)
+{
+ int i;
+ NET net;
+
+ for (i = 0; i < Numnets; i++) {
+ net = Nlnets[i];
+ if (!strcmp(net->netname, netname)) {
+ print_net(net);
+ break;
+ }
+ }
+}
+
+/*--------------------------------------------------------------*/
/* link_up_seg --- */
/* */
/* As part of cleanup_net (below), when removing unneeded vias, */
@@ -1378,7 +1651,7 @@ emit_routed_net(FILE *Cmd, NET net, u_char special, double oscale, int iscale)
Flush(stdout);
Fprintf(stderr, "Warning: non-Manhattan wire in route"
- " at (%d %d) to (%d %d)\n", x, y, x2, y2);
+ " at (%d, %d) to (%d, %d)\n", x, y, x2, y2);
}
if (special == (u_char)0) {
if (lastseg && (lastseg->segtype & ST_OFFSET_START) &&
@@ -2535,6 +2808,7 @@ static void emit_routes(char *filename, double oscale, int iscale)
char line[MAX_LINE_LEN + 1], *lptr = NULL;
char netname[MAX_NAME_LEN];
NET net = NULL;
+ NODE node;
ROUTE rt;
FILE *fdef;
u_char errcond = FALSE;
@@ -2625,11 +2899,21 @@ static void emit_routes(char *filename, double oscale, int iscale)
}
for (i = 0; i < numnets; i++) {
+ char *instname, *pinname;
+
if (errcond == TRUE) break;
+ net = NULL;
while (fgets(line, MAX_LINE_LEN, fdef) != NULL) {
if ((lptr = strchr(line, ';')) != NULL) {
*lptr = '\n';
*(lptr + 1) = '\0';
+#ifdef TCL_QROUTER
+ net = DefFindNet(netname);
+ while ((instname = get_annotate_info(net, &pinname)) != NULL) {
+ /* Output antenna connections that were added to the net */
+ fprintf(Cmd, " ( %s %s )\n", instname, pinname);
+ }
+#endif
break;
}
else {
@@ -2642,6 +2926,13 @@ static void emit_routes(char *filename, double oscale, int iscale)
fputs(line, Cmd);
}
else if (*lptr == '+') {
+#ifdef TCL_QROUTER
+ net = DefFindNet(netname);
+ while ((instname = get_annotate_info(net, &pinname)) != NULL) {
+ /* Output antenna connections that were added to the net */
+ fprintf(Cmd, " ( %s %s )\n", instname, pinname);
+ }
+#endif
lptr++;
while (isspace(*lptr)) lptr++;
if (!strncmp(lptr, "ROUTED", 6)) {
@@ -2670,9 +2961,9 @@ static void emit_routes(char *filename, double oscale, int iscale)
}
}
- /* Find this net */
+ /* Find this net (if not done already) */
- net = DefFindNet(netname);
+ if (!net) net = DefFindNet(netname);
if (!net || (net->flags & NET_IGNORED)) {
if (!net)
Fprintf(stderr, "emit_routes(): Net %s cannot be found.\n",
diff --git a/output.h b/output.h
index 2530afc..c1bdd62 100644
--- a/output.h
+++ b/output.h
@@ -23,4 +23,10 @@ void print_nlgates(char *filename);
void print_net(NET net);
void print_gate(GATE gate);
+/* Additional diagnostic routines */
+void print_grid_information(int, int, int);
+void print_instance_information(char *);
+void print_node_information(char *);
+void print_net_information(char *);
+
#endif /* _OUTPUTINT_H */
diff --git a/qconfig.c b/qconfig.c
index 0fc0261..3d57a96 100644
--- a/qconfig.c
+++ b/qconfig.c
@@ -63,6 +63,25 @@ char *ViaYX[MAX_LAYERS];
char *ViaYY[MAX_LAYERS];
/*--------------------------------------------------------------*/
+/* init_config --- */
+/* */
+/* Initialize arrays */
+/*--------------------------------------------------------------*/
+
+void
+init_config()
+{
+ int i;
+
+ for (i = 0; i < MAX_LAYERS; i++) {
+ ViaXX[i] = NULL;
+ ViaXY[i] = NULL;
+ ViaYX[i] = NULL;
+ ViaYY[i] = NULL;
+ }
+}
+
+/*--------------------------------------------------------------*/
/* post_config --- */
/* */
/* Resolve PitchX and PitchY, which are the minimum pitches */
@@ -221,7 +240,7 @@ int read_config(FILE *fconfig, int is_info)
// should get the information about gate pins & obstructions
OK = 1;
mscale = LefRead(sarg);
- if (mscale > Scales.mscale) Scales.mscale = mscale;
+ update_mscale(mscale);
}
}
diff --git a/qconfig.h b/qconfig.h
index 05b12cf..297dbb8 100644
--- a/qconfig.h
+++ b/qconfig.h
@@ -48,6 +48,7 @@ extern char *ViaYY[MAX_LAYERS]; // Top and bottom vertical
int read_config(FILE *configfileptr, int is_info);
void post_config(u_char noprint);
+void init_config();
#define QCONFIG_H
#endif
diff --git a/qrouter.c b/qrouter.c
index fd18a14..99cb77b 100644
--- a/qrouter.c
+++ b/qrouter.c
@@ -63,13 +63,45 @@ u_char maskMode = MASK_AUTO;
u_char mapType = MAP_OBSTRUCT | DRAW_ROUTES;
u_char ripLimit = 10; // Fail net rather than rip up more than
// this number of other nets.
+u_char unblockAll = FALSE;
char *DEFfilename = NULL;
char *delayfilename = NULL;
+DPOINT testpoint = NULL; // used for debugging route problems
+
ScaleRec Scales; // record of input and output scales
/*--------------------------------------------------------------*/
+/* Upate the output scale factor. It has to be a valid DEF */
+/* scale factor and it has to be a multiple of the given scale */
+/* factor. */
+/*--------------------------------------------------------------*/
+
+void
+update_mscale(int mscale)
+{
+ static int valid_mscales[] = {100, 200, 1000, 2000, 10000, 20000};
+ int nscales = sizeof(valid_mscales) / sizeof(valid_mscales[0]);
+ int mscale2, i;
+
+ if (mscale == 0) return;
+
+ if ((Scales.mscale % mscale) != 0) {
+ // Check valid scale values; if none is appropriate, don't update
+ for (i = 0; i < nscales; i++) {
+ mscale2 = valid_mscales[i];
+ if (mscale2 <= Scales.mscale) continue;
+ if ((mscale2 % mscale) == 0) {
+ Scales.mscale = mscale2;
+ break;
+ }
+ }
+ }
+}
+
+
+/*--------------------------------------------------------------*/
/* Check track pitch and set the number of channels (may be */
/* called from DefRead) */
/*--------------------------------------------------------------*/
@@ -382,8 +414,6 @@ runqrouter(int argc, char *argv[])
char *layername = LefGetRouteName(i);
check_variable_pitch(i, &hnum, &vnum);
- if (vnum > 1 && hnum == 1) hnum++; // see note in node.c
- if (hnum > 1 && vnum == 1) vnum++;
if (layername != NULL) {
pitch = (o == 1) ? PitchY : PitchX,
@@ -776,6 +806,7 @@ static int post_def_setup()
{
NET net;
ROUTE rt;
+ DPOINT tpoint;
int i;
if (DEFfilename == NULL) {
@@ -824,6 +855,23 @@ static int post_def_setup()
Fprintf(stderr, "Diagnostic: memory block is %d bytes\n",
(int)sizeof(u_int) * NumChannelsX * NumChannelsY);
+ /* If any watch points were made, make sure that they have */
+ /* the correct geometry values, since they were made before */
+ /* the DEF file was read. */
+
+ for (tpoint = testpoint; tpoint; tpoint = tpoint->next) {
+ if (tpoint->gridx < 0) {
+ /* Compute gridx,y from x,y */
+ tpoint->gridx = (int)(round((tpoint->x - Xlowerbound) / PitchX));
+ tpoint->gridy = (int)(round((tpoint->y - Xlowerbound) / PitchX));
+ }
+ else {
+ /* Compute x,y from gridx,y */
+ tpoint->x = (tpoint->gridx * PitchX) + Xlowerbound;
+ tpoint->y = (tpoint->gridy * PitchY) + Ylowerbound;
+ }
+ }
+
/* Be sure to create obstructions from gates first, since we don't */
/* want improperly defined or positioned obstruction layers to over- */
/* write our node list. */
@@ -840,7 +888,7 @@ static int post_def_setup()
create_obstructions_from_variable_pitch();
adjust_stub_lengths();
find_route_blocks();
- count_reachable_taps();
+ count_reachable_taps(unblockAll);
count_pinlayers();
// If any nets are pre-routed, calculate route endpoints, and
@@ -957,6 +1005,7 @@ int dofirststage(u_char graphdebug, int debug_netnum)
if (Verbose > 0)
Fprintf(stdout, "Finished routing net %s\n", net->netname);
Fprintf(stdout, "Nets remaining: %d\n", remaining);
+ Flush(stdout);
}
else {
if (Verbose > 0)
@@ -1414,6 +1463,7 @@ int dothirdstage(u_char graphdebug, int debug_netnum, u_int effort)
Fprintf(stdout, "Finished routing net %s\n", net->netname);
remaining--;
Fprintf(stdout, "Nets remaining: %d\n", remaining);
+ Flush(stdout);
remove_routes(rt, FALSE); /* original is no longer needed */
}
else if (!failed) {
diff --git a/qrouter.h b/qrouter.h
index f74e6f0..4a28ce0 100644
--- a/qrouter.h
+++ b/qrouter.h
@@ -40,7 +40,7 @@ typedef unsigned long u_long;
#endif /* _SYS_TYPES_H */
/* Compare functions aren't defined in the Mac's standard library */
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
typedef int (*__compar_fn_t)(const void*, const void*);
#endif
@@ -63,8 +63,9 @@ typedef int (*__compar_fn_t)(const void*, const void*);
// define possible gate orientations
#define MNONE 0
-#define MX 1
-#define MY 2
+#define MX 1 // flipped in X
+#define MY 2 // flipped in Y
+#define R90 4 // rotated clockwise 90 degrees
// define search directions
@@ -434,6 +435,7 @@ extern NETLIST FailedNets; // nets that have failed the first pass
extern char *DEFfilename;
extern char *delayfilename;
extern ScaleRec Scales;
+extern DPOINT testpoint; // for debugging routing problems
extern GATE GateInfo; // standard cell macro information
extern GATE PinMacro; // macro definition for a pin
@@ -467,6 +469,7 @@ extern u_char forceRoutable;
extern u_char maskMode;
extern u_char mapType;
extern u_char ripLimit;
+extern u_char unblockAll;
extern char *vddnet;
extern char *gndnet;
@@ -486,6 +489,7 @@ extern char *antenna_cell;
/* Function prototypes */
+void update_mscale(int mscale);
static int next_route_setup(struct routeinfo_ *iroute, u_char stage);
static int route_setup(struct routeinfo_ *iroute, u_char stage);
int route_segs(struct routeinfo_ *iroute, u_char stage, u_char graphdebug);
@@ -499,6 +503,8 @@ int runqrouter(int argc, char *argv[]);
void remove_failed();
void apply_drc_blocks(int, double, double);
void remove_top_route(NET net);
+char *get_annotate_info(NET net, char **pinptr);
+
int read_def(char *filename);
diff --git a/qrouter.tcl.in b/qrouter.tcl.in
index 5db9faa..192ac33 100644
--- a/qrouter.tcl.in
+++ b/qrouter.tcl.in
@@ -94,7 +94,7 @@ proc qrouter::write_congested {filename} {
# Standard routing script
#------------------------------------------------------
-proc qrouter::standard_route {{filename ""} {doquit true}} {
+proc qrouter::standard_route {{filename ""} {doquit true} {nocleanup false}} {
puts stdout "*** Running stage1 routing with defaults"
# Pull root name from filename
set rootname [file root $filename]
@@ -111,8 +111,9 @@ proc qrouter::standard_route {{filename ""} {doquit true}} {
if {!$result} {break}
if {$result > $lastresult} {
puts -nonewline stdout "*** Running stage2 routing"
- puts stdout " with options mask none, effort 20"
- set result [stage2 mask none effort 20]
+ set tempmsize [expr $msize + 80]
+ puts stdout " with options mask $tempmsize, effort 20"
+ set result [stage2 mask $tempmsize effort 20]
if {!$result} {break}
if {$result < 5} {
puts -nonewline stdout "*** Running stage2 routing"
@@ -124,21 +125,24 @@ proc qrouter::standard_route {{filename ""} {doquit true}} {
incr msize 10
}
}
- # Attempt a couple of runs at "mask none" if not solved yet
+ # Attempt a few runs at "mask none" if not solved yet
if {$result > 0} {
- puts -nonewline stdout "*** Running stage2 routing"
- puts stdout " with options mask none, effort 30"
- set result [stage2 mask none effort 30]
- }
- if {$result > 0} {
- puts -nonewline stdout "*** Running stage2 routing"
- puts stdout " with options mask none, effort 40"
- set result [stage2 mask none effort 40]
+ set esize 20
+ while {$esize <= 100} {
+ puts -nonewline stdout "*** Running stage2 routing"
+ puts stdout " with options mask none, effort $esize"
+ set result [stage2 mask none effort $esize]
+
+ if {!$result} {break}
+ incr esize 20
+ }
}
# There is no point in running a cleanup stage if there are lots of
# unrouted nets.
- if {$result < 10} {
+ if {$nocleanup == true} {
+ puts stdout "*** Cleanup stage (stage3) bypassed"
+ } elseif {$result < 10} {
puts stdout "*** Running stage3 routing with defaults, 1st round"
set result [stage3]
if {$result > 0} {
diff --git a/tclqrouter.c b/tclqrouter.c
index d06dcbb..d37cba3 100644
--- a/tclqrouter.c
+++ b/tclqrouter.c
@@ -11,6 +11,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
+#include <math.h> /* for round() */
#include <tk.h>
@@ -123,6 +124,9 @@ static int qrouter_layers(
static int qrouter_drc(
ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
+static int qrouter_query(
+ ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[]);
static int qrouter_passes(
ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
@@ -141,6 +145,15 @@ static int qrouter_print(
static int qrouter_quit(
ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]);
+static int qrouter_pitchx(
+ ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[]);
+static int qrouter_pitchy(
+ ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[]);
+static int qrouter_unblock(
+ ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[]);
static cmdstruct qrouter_commands[] =
{
@@ -161,12 +174,16 @@ static cmdstruct qrouter_commands[] =
{"obstruction", qrouter_obs},
{"ignore", qrouter_ignore},
{"priority", qrouter_priority},
+ {"pitchx", qrouter_pitchx},
+ {"pitchy", qrouter_pitchy},
+ {"unblock", qrouter_unblock},
{"via", qrouter_via},
{"resolution", qrouter_resolution},
{"congested", qrouter_congested},
{"layers", qrouter_layers},
{"drc", qrouter_drc},
{"passes", qrouter_passes},
+ {"query", qrouter_query},
{"vdd", qrouter_vdd},
{"gnd", qrouter_gnd},
{"failing", qrouter_failing},
@@ -314,7 +331,7 @@ void tcl_stdflush(FILE *f)
char *stdptr = stdstr + 11;
Tcl_SaveResult(qrouterinterp, &state);
- strcpy(stdptr, (f == stderr) ? "err" : "out");
+ strncpy(stdptr, (f == stderr) ? "err" : "out", 3);
Tcl_Eval(qrouterinterp, stdstr);
Tcl_RestoreResult(qrouterinterp, &state);
}
@@ -620,6 +637,7 @@ qrouter_start(ClientData clientData, Tcl_Interp *interp,
argv[argc++] = strdup(Tcl_GetString(objv[i]));
}
+ init_config();
result = runqrouter(argc, argv);
if ((result == 0) && (batchmode == 0)) GUI_init(interp);
@@ -1602,7 +1620,7 @@ qrouter_readlef(ClientData clientData, Tcl_Interp *interp,
LEFfile = Tcl_GetString(objv[1]);
mscale = LefRead(LEFfile);
- if (Scales.mscale < mscale) Scales.mscale = mscale;
+ update_mscale(mscale);
for (i = 0; i < Num_layers; i++) {
@@ -2409,6 +2427,231 @@ qrouter_resolution(ClientData clientData, Tcl_Interp *interp,
}
/*------------------------------------------------------*/
+/* Command "query" */
+/* */
+/* Print information about a specific grid point, */
+/* instance, node, or net. Option "watch" indicates to */
+/* monitor the position during DEF read-in and print */
+/* information when the node information changes, */
+/* especially if the grid position is disabled. */
+/* */
+/* Options: */
+/* */
+/* query grid <ix> <iy> <layer> [watch] */
+/* query position <dx> <dy> <layer> [watch] */
+/* query instance <instance> */
+/* query node <instance>/<pin> */
+/* query net <name> */
+/* */
+/* <layer> may be either a layer name or integer index. */
+/* <dx> and <dy> should be given in microns. <ix> and */
+/* <iy> are integer indexes. All other arguments are */
+/* strings. */
+/*------------------------------------------------------*/
+
+static int
+qrouter_query(ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[])
+{
+ char *layername, *instname, *netname, *pinname;
+ int idx, result, layer;
+ int gridx, gridy;
+ double dx, dy;
+ unsigned char is_index, do_watch, do_unwatch;
+
+ static char *subCmds[] = {
+ "grid", "position", "instance", "node", "net", NULL
+ };
+ enum SubIdx {
+ GridIdx, PosIdx, InstIdx, NodeIdx, NetIdx
+ };
+
+ if (objc < 2) {
+ Fprintf(stderr, "Usage:\n");
+ Fprintf(stderr, " query position <x_microns> <y_microns> <layer> [watch]\n");
+ Fprintf(stderr, " query grid <gridx> <gridy> <layer> [watch]\n");
+ Fprintf(stderr, " query instance <inst_name>\n");
+ Fprintf(stderr, " query node <inst_name>/<pin_name>\n");
+ Fprintf(stderr, " query net <net_name>\n");
+ Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
+ return TCL_ERROR;
+ }
+ else if ((result = Tcl_GetIndexFromObj(interp, objv[1],
+ (CONST84 char **)subCmds, "option", 0, &idx)) != TCL_OK)
+ return result;
+
+ do_watch = do_unwatch = FALSE;
+ switch (idx) {
+ case GridIdx:
+ case PosIdx:
+ if (objc == 6) {
+ if (!strcmp(Tcl_GetString(objv[5]), "watch")) {
+ do_watch = TRUE;
+ objc--;
+ }
+ else if (!strcmp(Tcl_GetString(objv[5]), "unwatch")) {
+ do_unwatch = TRUE;
+ objc--;
+ }
+ }
+ if (objc != 5) {
+ Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
+ return TCL_ERROR;
+ }
+ is_index = (idx == GridIdx) ? TRUE : FALSE;
+
+ layername = Tcl_GetString(objv[4]);
+ layer = LefFindLayerNum(layername);
+ if (layer < 0) {
+ result = Tcl_GetIntFromObj(interp, objv[4], &layer);
+ if (result != TCL_OK) {
+ Tcl_SetResult(interp, "No such layer name.\n", NULL);
+ return result;
+ }
+ }
+ if (layer >= Num_layers) {
+ Tcl_SetResult(interp, "Bad layer number.\n", NULL);
+ return result;
+ }
+ if (is_index) {
+ result = Tcl_GetIntFromObj(interp, objv[2], &gridx);
+ if (result != TCL_OK) {
+ Tcl_SetResult(interp, "Cannot parse grid X index\n", NULL);
+ return result;
+ }
+ result = Tcl_GetIntFromObj(interp, objv[3], &gridy);
+ if (result != TCL_OK) {
+ Tcl_SetResult(interp, "Cannot parse grid Y index\n", NULL);
+ return result;
+ }
+ /* Translate gridx, gridy into dx, dy */
+ dx = (gridx * PitchX) + Xlowerbound;
+ dy = (gridy * PitchY) + Ylowerbound;
+ }
+ else {
+ result = Tcl_GetDoubleFromObj(interp, objv[2], &dx);
+ if (result != TCL_OK) {
+ Tcl_SetResult(interp, "Cannot parse grid X position\n", NULL);
+ return result;
+ }
+ result = Tcl_GetDoubleFromObj(interp, objv[3], &dy);
+ if (result != TCL_OK) {
+ Tcl_SetResult(interp, "Cannot parse grid Y position\n", NULL);
+ return result;
+ }
+ /* Translate dx, dy into nearest gridx, gridy */
+ gridx = (int)(round((dx - Xlowerbound) / PitchX));
+ gridy = (int)(round((dy - Ylowerbound) / PitchY));
+
+ Fprintf(stdout, "Grid position index is (%d %d)\n", gridx, gridy);
+ }
+ if (gridx < 0) {
+ Tcl_SetResult(interp, "Grid X position must not be negative.\n",
+ NULL);
+ return result;
+ }
+ if (gridy < 0) {
+ Tcl_SetResult(interp, "Grid Y position must not be negative.\n",
+ NULL);
+ return result;
+ }
+ if (do_watch) {
+ DPOINT newtest;
+ newtest = (DPOINT)malloc(sizeof(struct dpoint_));
+ newtest->layer = layer;
+ newtest->next = testpoint;
+ if (idx == GridIdx) {
+ newtest->gridx = gridx;
+ newtest->gridy = gridy;
+ newtest->x = 0;
+ newtest->y = 0;
+ Fprintf(stdout, "Watching grid position index (%d %d)"
+ " layer %d.\n", gridx, gridy, layer);
+ }
+ else {
+ newtest->x = dx;
+ newtest->y = dy;
+ newtest->gridx = -1;
+ newtest->gridy = -1;
+ Fprintf(stdout, "Watching grid position (%g %g)um"
+ " layer %d.\n", dx, dy, layer);
+ }
+ testpoint = newtest;
+ }
+ else if (do_unwatch) {
+ DPOINT ptest, ltest;
+ ltest = NULL;
+ for (ptest = testpoint; ptest; ptest = ptest->next) {
+ if (ptest->x == dx && ptest->y == dy && ptest->layer == layer) {
+ if (ltest == NULL) {
+ testpoint = testpoint->next;
+ free(ptest);
+ }
+ else {
+ ltest->next = ptest->next;
+ free(ptest);
+ }
+ Fprintf(stdout, "No longer watching grid position (%g %g)um"
+ " index (%d %d) layer %d.\n",
+ dx, dy, gridx, gridy, layer);
+ break;
+ }
+ ltest = ptest;
+ }
+ if (ptest == NULL) {
+ Fprintf(stdout, "Grid position (%g %g)um index (%d %d)"
+ " layer %d is not on the watch list.\n",
+ dx, dy, gridx, gridy, layer);
+ }
+ }
+ else if (gridx >= NumChannelsX) {
+ Tcl_SetResult(interp, "Grid X position is larger than the number"
+ " of horizontal route tracks.\n", NULL);
+ return result;
+ }
+ else if (gridy >= NumChannelsY) {
+ Tcl_SetResult(interp, "Grid Y position is larger than the number"
+ " of vertical route tracks.\n", NULL);
+ return result;
+ }
+ else {
+ Fprintf(stdout, "Querying grid position (%g %g)um index (%d %d)"
+ " layer %d:\n", dx, dy, gridx, gridy, layer);
+ print_grid_information(gridx, gridy, layer);
+ }
+ break;
+
+ case InstIdx:
+ if (objc != 3) {
+ Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
+ return TCL_ERROR;
+ }
+ instname = Tcl_GetString(objv[2]);
+ print_instance_information(instname);
+ break;
+
+ case NodeIdx:
+ if (objc != 3) {
+ Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
+ return TCL_ERROR;
+ }
+ instname = Tcl_GetString(objv[2]);
+ print_node_information(instname);
+ break;
+
+ case NetIdx:
+ if (objc != 3) {
+ Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
+ return TCL_ERROR;
+ }
+ netname = Tcl_GetString(objv[2]);
+ print_net_information(netname);
+ break;
+ }
+ return QrouterTagCallback(interp, objc, objv);
+}
+
+/*------------------------------------------------------*/
/* Command "drc" */
/* */
/* Set qrouter options related to handling of DRC */
@@ -2988,3 +3231,127 @@ qrouter_print(ClientData clientData, Tcl_Interp *interp,
}
/*------------------------------------------------------*/
+/* Command "pitchx" */
+/* */
+/* Set the base pitch for vertical routing layers. */
+/* Values larger than current value will be ignored. */
+/* Without an argument, current value is returned. */
+/* */
+/* Options: */
+/* */
+/* pitchx [<value>] */
+/*------------------------------------------------------*/
+
+static int
+qrouter_pitchx(ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[])
+{
+ int result;
+ double value;
+
+ if (objc == 1) {
+ Tcl_SetObjResult(interp, Tcl_NewDoubleObj(PitchX));
+ }
+ else if (objc == 2) {
+ result = Tcl_GetDoubleFromObj(interp, objv[1], &value);
+ if (result != TCL_OK) return result;
+ if (value <= 0.0) {
+ Tcl_SetResult(interp, "PitchX value has to be a positive value"
+ "; ignored", NULL);
+ return TCL_ERROR;
+ }
+ else if ((PitchX > 0.0) && (value > PitchX)) {
+ Tcl_SetResult(interp, "PitchX is larger than current value"
+ "; ignored", NULL);
+ }
+ else {
+ PitchX = value;
+ }
+ }
+ else {
+ Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
+ return TCL_ERROR;
+ }
+ return QrouterTagCallback(interp, objc, objv);
+}
+
+/*------------------------------------------------------*/
+/* Command "pitchy" */
+/* */
+/* Set the base pitch for horizontal routing layers. */
+/* Values larger than current value will be ignored. */
+/* Without an argument, current value is returned. */
+/* */
+/* Options: */
+/* */
+/* pitchy [<value>] */
+/*------------------------------------------------------*/
+
+static int
+qrouter_pitchy(ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[])
+{
+ int result;
+ double value;
+
+ if (objc == 1) {
+ Tcl_SetObjResult(interp, Tcl_NewDoubleObj(PitchY));
+ }
+ else if (objc == 2) {
+ result = Tcl_GetDoubleFromObj(interp, objv[1], &value);
+ if (result != TCL_OK) return result;
+ if (value <= 0.0) {
+ Tcl_SetResult(interp, "PitchY value has to be a positive value"
+ "; ignored", NULL);
+ return TCL_ERROR;
+ }
+ else if ((PitchY > 0.0) && (value > PitchY)) {
+ Tcl_SetResult(interp, "PitchY is larger than current value"
+ "; ignored", NULL);
+ }
+ else {
+ PitchY = value;
+ }
+ }
+ else {
+ Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
+ return TCL_ERROR;
+ }
+ return QrouterTagCallback(interp, objc, objv);
+}
+
+/*------------------------------------------------------*/
+/* Command "unblock" */
+/* */
+/* Set the unblocking flag, which indicates to qrouter */
+/* that all grid points that lie cleanly inside pin */
+/* geometry should be marked routable. This command */
+/* must be issued before read_def to be effective. */
+/* */
+/* Options: */
+/* */
+/* unblock [true|false] */
+/*------------------------------------------------------*/
+
+static int
+qrouter_unblock(ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[])
+{
+ int result, value;
+
+ if (objc == 1) {
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(unblockAll));
+ }
+ else if (objc == 2) {
+ result = Tcl_GetBooleanFromObj(interp, objv[1], &value);
+ if (result != TCL_OK) return result;
+ unblockAll = (value == 0) ? FALSE : TRUE;
+ }
+ else {
+ Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
+ return TCL_ERROR;
+ }
+ return QrouterTagCallback(interp, objc, objv);
+}
+
+/*------------------------------------------------------*/
diff --git a/tkcon.tcl b/tkcon.tcl
index 6030036..2ec7c05 100755
--- a/tkcon.tcl
+++ b/tkcon.tcl
@@ -741,9 +741,9 @@ proc ::tkcon::EvalCmd {w cmd} {
set tag [UniqueTag $w]
$w insert output $res [list stderr $tag] \n stderr
$w tag bind $tag <Enter> \
- [list $w tag configure $tag -under 1]
+ [list $w tag configure $tag -underline 1]
$w tag bind $tag <Leave> \
- [list $w tag configure $tag -under 0]
+ [list $w tag configure $tag -underline 0]
$w tag bind $tag <ButtonRelease-1> \
"if {!\[info exists tkPriv(mouseMoved)\] || !\$tkPriv(mouseMoved)} \
{[list edit -attach [Attach] -type error -- $PRIV(errorInfo)]}"
@@ -2472,8 +2472,8 @@ proc ::tkcon::ErrorHighlight w {
set tag [UniqueTag $w]
$w tag add $tag $start+${c0}c $start+1c+${c1}c
$w tag configure $tag -foreground $COLOR(stdout)
- $w tag bind $tag <Enter> [list $w tag configure $tag -under 1]
- $w tag bind $tag <Leave> [list $w tag configure $tag -under 0]
+ $w tag bind $tag <Enter> [list $w tag configure $tag -underline 1]
+ $w tag bind $tag <Leave> [list $w tag configure $tag -underline 0]
$w tag bind $tag <ButtonRelease-1> "if {!\$tkPriv(mouseMoved)} \
{[list edit -attach $app -type proc -find $what -- $cmd]}"
}
@@ -2501,8 +2501,8 @@ proc ::tkcon::ErrorHighlight w {
set tag [UniqueTag $w]
$w tag add $tag $ix+1c $start
$w tag configure $tag -foreground $COLOR(proc)
- $w tag bind $tag <Enter> [list $w tag configure $tag -under 1]
- $w tag bind $tag <Leave> [list $w tag configure $tag -under 0]
+ $w tag bind $tag <Enter> [list $w tag configure $tag -underline 1]
+ $w tag bind $tag <Leave> [list $w tag configure $tag -underline 0]
$w tag bind $tag <ButtonRelease-1> "if {!\$tkPriv(mouseMoved)} \
{[list edit -attach $app -type proc -- $cmd]}"
}
@@ -3004,14 +3004,14 @@ proc edit {args} {
##
set text $w.text
set m [menu [::tkcon::MenuButton $menu Edit edit]]
- $m add command -label "Cut" -under 2 \
+ $m add command -label "Cut" -underline 2 \
-command [list tk_textCut $text]
- $m add command -label "Copy" -under 0 \
+ $m add command -label "Copy" -underline 0 \
-command [list tk_textCopy $text]
- $m add command -label "Paste" -under 0 \
+ $m add command -label "Paste" -underline 0 \
-command [list tk_textPaste $text]
$m add separator
- $m add command -label "Find" -under 0 \
+ $m add command -label "Find" -underline 0 \
-command [list ::tkcon::FindBox $text]
## Send To Menu