From 82f8afbb19fa3d6fd3c89209ea25c8e8b544f334 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 15 Sep 2023 11:01:33 +0200 Subject: [PATCH] optimize select_dangling_nets() a bit --- src/select.c | 4 +++- xschem_library/generators/tier.tcl | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/select.c b/src/select.c index 8e4dab79..fa644ce8 100644 --- a/src/select.c +++ b/src/select.c @@ -223,6 +223,7 @@ int select_dangling_nets(void) /* select pins/labels/probes attached to dangling nets */ for(w = 0; w < xctx->wires; w++) { + if(table[w]) continue; x1 = xctx->wire[w].x1; y1 = xctx->wire[w].y1; x2 = xctx->wire[w].x2; @@ -236,7 +237,7 @@ int select_dangling_nets(void) if(!rct) continue; get_inst_pin_coord(i, 0, &x0, &y0); touches = touch(xctx->wire[w].x1, xctx->wire[w].y1, xctx->wire[w].x2, xctx->wire[w].y2, x0, y0); - if(touches && table[w] == 0) { + if(touches) { xctx->inst[i].sel = SELECTED; ret = 1; } @@ -247,6 +248,7 @@ int select_dangling_nets(void) /* select dangling labels/probes (not connected to anything) */ for(i = 0; i < xctx->instances; i++) { int dangling = 1; + if(xctx->inst[i].sel == SELECTED) continue; type = (xctx->inst[i].ptr+ xctx->sym)->type; if( type && (!strcmp(type, "label") || !strcmp(type, "probe")) ) { int sqx, sqy; diff --git a/xschem_library/generators/tier.tcl b/xschem_library/generators/tier.tcl index a14c5ff2..488c9305 100755 --- a/xschem_library/generators/tier.tcl +++ b/xschem_library/generators/tier.tcl @@ -21,9 +21,6 @@ B 5 -2.5 -2.5 2.5 2.5 {name=P dir=inout }" if {[regexp -nocase {^(VCC|VDD|VPP)$} $arg1]} { puts "L 4 -20 -40 20 -40 {} L 4 0 -40 0 0 {} - - - T {@#0:net_name} 5 -13.75 0 0 0.15 0.15 {layer=15} T {@lab} -15 -53.75 0 0 0.2 0.2 {}" } else {