command "xschem select_dangling_nets": skip ignored instances (lvs_ignore or spice_ignore), return # of selected dangling elements instead of just 1
This commit is contained in:
parent
210f56cccb
commit
e6211ac93b
|
|
@ -1083,7 +1083,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
|||
Selects all objects in schematic </pre>
|
||||
<li><kbd> select_dangling_nets </kbd></li><pre>
|
||||
Select all nets/labels that are dangling, ie not attached to any non pin/port/probe components
|
||||
Returns 1 if danglings found, 0 otherwise </pre>
|
||||
Returns number of selected items (wires,labels) if danglings found, 0 otherwise </pre>
|
||||
<li><kbd> select_hilight_net</kbd></li><pre>
|
||||
Select all highlight objects (wires, labels, pins, instances) </pre>
|
||||
<li><kbd> selected_set</kbd></li><pre>
|
||||
|
|
|
|||
|
|
@ -3295,12 +3295,11 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
|
||||
/* select_dangling_nets
|
||||
* Select all nets/labels that are dangling, ie not attached to any non pin/port/probe components
|
||||
* Returns 1 if danglings found, 0 otherwise */
|
||||
* Returns number of selected items (wires,labels) if danglings found, 0 otherwise */
|
||||
else if(!strcmp(argv[1], "select_dangling_nets"))
|
||||
{
|
||||
int r;
|
||||
r = select_dangling_nets();
|
||||
Tcl_SetResult(interp, my_itoa(r), TCL_VOLATILE);
|
||||
select_dangling_nets();
|
||||
Tcl_SetResult(interp, my_itoa(xctx->lastsel), TCL_VOLATILE);
|
||||
}
|
||||
|
||||
/* select_hilight_net
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ static void check_connected_wire(int stop_at_junction, int n)
|
|||
|
||||
int select_dangling_nets(void)
|
||||
{
|
||||
int netlist_lvs_ignore=tclgetboolvar("lvs_ignore");
|
||||
int i, p, w, touches, rects, done;
|
||||
int ret = 0; /* return code: 1: dangling elements found */
|
||||
int *table = NULL;
|
||||
|
|
@ -107,6 +108,7 @@ int select_dangling_nets(void)
|
|||
RECTORDER(x1, y1, x2, y2);
|
||||
for(init_inst_iterator(&ctx, x1, y1, x2, y2); (instptr = inst_iterator_next(&ctx)) ;) {
|
||||
i = instptr->n;
|
||||
if(skip_instance(i, 0, netlist_lvs_ignore)) continue;
|
||||
type = (xctx->inst[i].ptr+ xctx->sym)->type;
|
||||
rct=(xctx->inst[i].ptr+ xctx->sym)->rect[PINLAYER];
|
||||
if(!rct) continue;
|
||||
|
|
@ -211,6 +213,7 @@ int select_dangling_nets(void)
|
|||
if( type && (!strcmp(type, "label") || !strcmp(type, "probe")) ) {
|
||||
goto cont2;
|
||||
}
|
||||
if(skip_instance(n, 0, netlist_lvs_ignore)) goto cont2;
|
||||
rct = (xctx->inst[n].ptr+ xctx->sym)->rect[PINLAYER];
|
||||
if(!rct) goto cont2;
|
||||
rects = (xctx->inst[n].ptr + xctx->sym)->rects[PINLAYER];
|
||||
|
|
|
|||
Loading…
Reference in New Issue