c = f->components[p->cid];
- if (SCF_EDA_Transistor == c->type
- && (SCF_EDA_Transistor_B == p->id || SCF_EDA_Transistor_C == p->id)) {
+ if (SCF_EDA_Transistor == c->type) {
- ses_ir_u(&v, &jv, a, ja, p->sr - (p->r + p->dr), p->jsr - (p->jr + p->jdr));
+ if (SCF_EDA_Transistor_B == p->id || SCF_EDA_Transistor_C == p->id)
+ ses_ir_u(&v, &jv, a, ja, p->sr - (p->r + p->dr), p->jsr - (p->jr + p->jdr));
+ else {
+ if (i < 1) {
+ scf_loge("\n");
+ return -EINVAL;
+ }
+
+ p2 = path->pins->data[i - 1];
+
+ ses_ir_u(&v, &jv, a, ja, p2->sr, p2->jsr);
+ }
} else
ses_ir_u(&v, &jv, a, ja, p->sr, p->jsr);
p->v = p0->v - v;
p->jv = p0->jv - jv;
- scf_logd("path: %d, v: %lg + j%lg, p->sr: %lg + j%lg, a: %lg + j%lg\n", path->index, v, jv, p->sr, p->jsr, a, ja);
-
el = f->elines[p->lid];
el->v = p->v;
el->jv = p->jv;
r += p->r + p->dr;
jr += p->jr + p->jdr;
- scf_logw("path: %d, i: %d, c%ldp%ld, r: %lg + j%lg, p->r: %lg + j%lg, p->dr: %lg + j%lg\n", path->index, i, p->cid, p->id, r, jr, p->r, p->jr, p->dr, p->jdr);
-
if (i & 0x1) {
r += c->r;
jr += c->jr;
v = p0->v - pb->v;
jv = p0->jv - pb->jv;
- pr = pb->pr - p0->pr;
- jpr = pb->jpr - p0->jpr;
+ pr = p->pr - p0->pr;
+ jpr = p->jpr - p0->jpr;
- sr = pb->sr - p0->sr;
- jsr = pb->jsr - p0->jsr;
+ sr = p->sr - p0->sr;
+ jsr = p->jsr - p0->jsr;
ses_ur_i(&el->a, &el->ja, v, jv, pr, jpr);
v = p0->v - p1->v;
jv = p0->jv - p1->jv;
- pr = p1->sr - p0->pr;
- jpr = p1->jsr - p0->jpr;
+ pr = pc->sr - p0->pr;
+ jpr = pc->jsr - p0->jpr;
ses_ur_i(&pc->a, &pc->ja, v, jv, pr, jpr);