add `fast` option in xschem hilight_instname. mos_power_ampli: use hilight to show devices with high current
This commit is contained in:
parent
b21ac67cc4
commit
c8ced06bbe
|
|
@ -538,6 +538,8 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -823,8 +825,9 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
||||||
Highlight selected element/pins/labels/nets
|
Highlight selected element/pins/labels/nets
|
||||||
if 'drill' is given propagate net highlights through conducting elements
|
if 'drill' is given propagate net highlights through conducting elements
|
||||||
(elements that have the 'propag' attribute on pins ) </pre>
|
(elements that have the 'propag' attribute on pins ) </pre>
|
||||||
<li><kbd> hilight_instname inst</kbd></li><pre>
|
<li><kbd> hilight_instname inst [fast]</kbd></li><pre>
|
||||||
Highlight instance 'inst'
|
Highlight instance 'inst'
|
||||||
|
if 'fast' is specified do not redraw
|
||||||
'inst' can be an instance name or number </pre>
|
'inst' can be an instance name or number </pre>
|
||||||
<li><kbd> hilight_netname net</kbd></li><pre>
|
<li><kbd> hilight_netname net</kbd></li><pre>
|
||||||
Highlight net name 'net' </pre>
|
Highlight net name 'net' </pre>
|
||||||
|
|
@ -1451,6 +1454,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -1796,8 +1796,9 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
redraw_hilights(0);
|
redraw_hilights(0);
|
||||||
Tcl_ResetResult(interp);
|
Tcl_ResetResult(interp);
|
||||||
}
|
}
|
||||||
/* hilight_instname inst
|
/* hilight_instname inst [fast]
|
||||||
* Highlight instance 'inst'
|
* Highlight instance 'inst'
|
||||||
|
* if 'fast' is specified do not redraw
|
||||||
* 'inst' can be an instance name or number */
|
* 'inst' can be an instance name or number */
|
||||||
else if(!strcmp(argv[1], "hilight_instname"))
|
else if(!strcmp(argv[1], "hilight_instname"))
|
||||||
{
|
{
|
||||||
|
|
@ -1806,6 +1807,8 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
int inst;
|
int inst;
|
||||||
char *type;
|
char *type;
|
||||||
int incr_hi;
|
int incr_hi;
|
||||||
|
int fast = 0;
|
||||||
|
if(argc > 3 && !strcmp(argv[3], "fast")) fast = 1;
|
||||||
xctx->enable_drill=0;
|
xctx->enable_drill=0;
|
||||||
incr_hi = tclgetboolvar("incr_hilight");
|
incr_hi = tclgetboolvar("incr_hilight");
|
||||||
prepare_netlist_structs(0);
|
prepare_netlist_structs(0);
|
||||||
|
|
@ -1828,8 +1831,10 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
if(incr_hi) incr_hilight_color();
|
if(incr_hi) incr_hilight_color();
|
||||||
}
|
}
|
||||||
dbg(1, "hilight_nets=%d\n", xctx->hilight_nets);
|
dbg(1, "hilight_nets=%d\n", xctx->hilight_nets);
|
||||||
if(xctx->hilight_nets) propagate_hilights(1, 0, XINSERT_NOREPLACE);
|
if(!fast) {
|
||||||
redraw_hilights(0);
|
if(xctx->hilight_nets) propagate_hilights(1, 0, XINSERT_NOREPLACE);
|
||||||
|
redraw_hilights(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Tcl_ResetResult(interp);
|
Tcl_ResetResult(interp);
|
||||||
|
|
|
||||||
|
|
@ -482,3 +482,36 @@ C {ngspice_get_expr.sym} 130 -730 0 1 {name=r21
|
||||||
node="[format %.4g [expr [ngspice::get_current \{q7[ic]\}] / [ngspice::get_current \{q7[ib]\}] ] ]"
|
node="[format %.4g [expr [ngspice::get_current \{q7[ic]\}] / [ngspice::get_current \{q7[ib]\}] ] ]"
|
||||||
descr = beta
|
descr = beta
|
||||||
}
|
}
|
||||||
|
C {launcher.sym} 460 -190 0 0 {name=h5
|
||||||
|
descr=hi_current
|
||||||
|
tclcommand="
|
||||||
|
set incr_hilight 0
|
||||||
|
xschem unhilight_all
|
||||||
|
foreach \{n s t\} [xschem instance_list] \{
|
||||||
|
if \{$t == \{label\} || $t == \{ipin\} || $t == \{opin\} || $t == \{iopin\}\} \{continue\}
|
||||||
|
set curr 0
|
||||||
|
if \{$t == \{resistor\} || $t == \{ammeter\} \} \{
|
||||||
|
set curr [expr \{ abs([from_eng [xschem translate $n \{@spice_get_current\}]])\}]
|
||||||
|
\}
|
||||||
|
if \{$t == \{pnp\} || $t == \{npn\}\} \{
|
||||||
|
set curr [expr \{abs([ngspice::get_current $n\\\\\\[ic\\\\\\]])\}]
|
||||||
|
\}
|
||||||
|
|
||||||
|
if \{$t == \{nmos\}\} \{
|
||||||
|
set curr [expr \{abs([ngspice::get_current $n.rd\\\\\\[i\\\\\\]])\}]
|
||||||
|
\}
|
||||||
|
if \{$curr > 0.02\} \{
|
||||||
|
xschem set hilight_color 11
|
||||||
|
xschem hilight_instname $n fast
|
||||||
|
\} elseif \{$curr > 0.01\} \{
|
||||||
|
xschem set hilight_color 0
|
||||||
|
xschem hilight_instname $n fast
|
||||||
|
\} else \{
|
||||||
|
xschem set hilight_color 4
|
||||||
|
xschem hilight_instname $n fast
|
||||||
|
\}
|
||||||
|
\}
|
||||||
|
xschem redraw
|
||||||
|
|
||||||
|
"
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ B 2 1200 -500 1880 -310 {flags=graph
|
||||||
y1 = -0.00095
|
y1 = -0.00095
|
||||||
y2 = 12
|
y2 = 12
|
||||||
divy = 6
|
divy = 6
|
||||||
x1=0.0226597
|
x1=0.0246251
|
||||||
x2=0.0229721
|
x2=0.0249375
|
||||||
divx=10
|
divx=10
|
||||||
node="i(v.x1.vu)
|
node="i(v.x1.vu)
|
||||||
i(v.x0.vu)
|
i(v.x0.vu)
|
||||||
|
|
@ -52,8 +52,8 @@ B 2 1200 -830 1880 -520 {flags=graph
|
||||||
y1 = -50
|
y1 = -50
|
||||||
y2 = 61
|
y2 = 61
|
||||||
divy = 12
|
divy = 12
|
||||||
x1=0.0226597
|
x1=0.0246251
|
||||||
x2=0.0229721
|
x2=0.0249375
|
||||||
divx=10
|
divx=10
|
||||||
node="outp
|
node="outp
|
||||||
outm
|
outm
|
||||||
|
|
@ -69,8 +69,8 @@ B 2 1200 -1020 1880 -830 {flags=graph
|
||||||
y1 = 0
|
y1 = 0
|
||||||
y2 = 1100
|
y2 = 1100
|
||||||
divy = 6
|
divy = 6
|
||||||
x1=0.0226597
|
x1=0.0246251
|
||||||
x2=0.0229721
|
x2=0.0249375
|
||||||
divx=10
|
divx=10
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -83,8 +83,8 @@ B 2 1200 -310 1880 -120 {flags=graph
|
||||||
y1 = 0
|
y1 = 0
|
||||||
y2 = 960
|
y2 = 960
|
||||||
divy = 6
|
divy = 6
|
||||||
x1=0.0226597
|
x1=0.0246251
|
||||||
x2=0.0229721
|
x2=0.0249375
|
||||||
divx=10
|
divx=10
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue