}
if (SCF_EDA_NPN == c0->type) {
- if (i > 0) {
+
+ if (SCF_EDA_NPN_E == p0->id) {
+ *r = p1->pr - p0->pr;
+ *jr = p1->jpr - p0->jpr;
+
+ } else if (i > 0) {
p0 = path->pins->data[i - 1];
*r = p1->pr - p0->pr;
p1->pr -= dr;
p1->jpr -= jdr;
- c = f->components[p1->cid];
+ c = f->components[p1->cid];
- if (SCF_EDA_NPN == c->type && SCF_EDA_NPN_E == p1->id && cp1 != p1) {
+ if (SCF_EDA_NPN == c->type && SCF_EDA_NPN_E == p1->id) {
- p = path->pins->data[j - 1];
- p->pr -= dr;
- p->jpr -= jdr;
+ p = path->pins->data[j - 1];
- scf_logi("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg, pr: %lg, dr: %lg\n", j, p->cid, p->id, p->pr, p->sr, pr, dr);
+ if (cp1 != p1) {
+ p->pr -= dr;
+ p->jpr -= jdr;
+ } else {
+ p1->pr = p->pr - dr;
+ p1->jpr = p->jpr - jdr;
+ }
}
scf_logi("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg, pr: %lg, dr: %lg\n", j, p1->cid, p1->id, p1->pr, p1->sr, pr, dr);