Browse Source

When calculating power, we need to exclude thermal nodes

of devices like diodes (d) and MOS (m)
pre-master-46
Holger Vogt 4 years ago
parent
commit
d04445e085
  1. 12
      src/frontend/inpc_probe.c

12
src/frontend/inpc_probe.c

@ -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…
Cancel
Save