When calculating power, we need to exclude thermal nodes
of devices like diodes (d) and MOS (m)
This commit is contained in:
parent
2fabc53f4f
commit
d04445e085
|
|
@ -1250,11 +1250,21 @@ static int setallvsources(struct card *tmpcard, NGHASHPTR instances, char *instn
|
||||||
sadd(&Bpowerline, "power ");
|
sadd(&Bpowerline, "power ");
|
||||||
sadd(&Bpowerline, instname);
|
sadd(&Bpowerline, instname);
|
||||||
cadd(&Bpowerline, ':');
|
cadd(&Bpowerline, ':');
|
||||||
sadd(&Bpowerline, "power 0 V = 0+");
|
sadd(&Bpowerline, "power 0 V = 0+"); /*FIXME 0+ required to suppress adding {} and numparam failure*/
|
||||||
/* For example: q1:power */
|
/* For example: q1:power */
|
||||||
sadd(&Bpowersave, instname);
|
sadd(&Bpowersave, instname);
|
||||||
cadd(&Bpowersave, ':');
|
cadd(&Bpowersave, ':');
|
||||||
sadd(&Bpowersave, "power");
|
sadd(&Bpowersave, "power");
|
||||||
|
|
||||||
|
/* special for VDMOS: exclude thermal nodes */
|
||||||
|
if (*instname == 'm' && strstr(tmpcard->line, "thermal"))
|
||||||
|
numnodes = 3;
|
||||||
|
/* special for MOS, exclude temp nodes (not always possible) */
|
||||||
|
if (*instname == 'm' && numnodes > 5)
|
||||||
|
numnodes = 5;
|
||||||
|
/* special for diodes, they have 2 terminals, so exclude thermal nodes */
|
||||||
|
if (*instname == 'd')
|
||||||
|
numnodes = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scan through all nodes of the device */
|
/* Scan through all nodes of the device */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue