optimize select_dangling_nets() a bit
This commit is contained in:
parent
4095651863
commit
82f8afbb19
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue