# HG changeset patch # User Space Falcon # Date 1439689872 0 # Node ID ce887659d12e43ca314088c607ec7bdc4662d74b # Parent a0d227fc9569ca19dd69e8cebc93f88c75337b54 unet-bind: implemented hier=flip:... hack for 2-pin components diff -r a0d227fc9569 -r ce887659d12e ueda/sverp-bind/enterinst.c --- a/ueda/sverp-bind/enterinst.c Sun Aug 09 06:38:32 2015 +0000 +++ b/ueda/sverp-bind/enterinst.c Sun Aug 16 01:51:12 2015 +0000 @@ -13,6 +13,16 @@ { register struct instance *inst; + if (!strncmp(hier, "flip:", 5)) { + if (oc->npins != 2 || oc->grid_pkg) { + fprintf(stderr, + "error: hier=flip:... makes no sense for %s\n", + oc->name); + exit(1); + } + oc->reverse_2pin = 1; + hier += 5; + } oc->altname = hier; inst = enter_instance(hier); inst->outcomp = oc; diff -r a0d227fc9569 -r ce887659d12e ueda/sverp-bind/readunet.c --- a/ueda/sverp-bind/readunet.c Sun Aug 09 06:38:32 2015 +0000 +++ b/ueda/sverp-bind/readunet.c Sun Aug 16 01:51:12 2015 +0000 @@ -116,6 +116,8 @@ register int pinidx; pinidx = resolve_pinnum(oc, pinnumstr); + if (oc->reverse_2pin) + pinidx = !pinidx; if (oc->conn_array[pinidx]) { fprintf(stderr, "error: multiple connections to %s pin %s (input lines %d and %d)\n", diff -r a0d227fc9569 -r ce887659d12e ueda/sverp-bind/struct.h --- a/ueda/sverp-bind/struct.h Sun Aug 09 06:38:32 2015 +0000 +++ b/ueda/sverp-bind/struct.h Sun Aug 16 01:51:12 2015 +0000 @@ -15,6 +15,7 @@ char *altname; struct component *mclcomp; int npins; + int reverse_2pin; struct grid_pkg_desc *grid_pkg; struct pinconn **conn_array; struct outcomp *next; /* used only for starpoints */