int i;
int j;
+ if (path->n_diodes * 2 >= path->pins->size) {
+ scf_loge("all components are diodes\n\n");
+ return -1;
+ }
+
p0 = path->pins->data[0];
p1 = path->pins->data[path->pins->size - 1];
r += pj->pr - pj->r - pi->pr;
jr += pj->jpr - pj->jr - pi->jpr;
- scf_logi("i: %d, info->i: %d, c%ldp%ld--c%ldp%ld, r: %lg, v: %lg\n", i, info->i, pi->cid, pi->id, pj->cid, pj->id, r, v);
+ scf_logi("c%ldp%ld--c%ldp%ld, r: %lg, v: %lg\n", pi->cid, pi->id, pj->cid, pj->id, r, v);
i = info->j;
}
r += p1->sr - p1->r - pi->pr;
jr += p1->jsr - p1->jr - pi->jpr;
- scf_logi("i: %d, info->i: %d, c%ldp%ld--c%ldp%ld, r: %lg, v: %lg\n", i, path->pins->size - 1, pi->cid, pi->id, p1->cid, p1->id, r, v);
+ scf_logi("c%ldp%ld--c%ldp%ld, r: %lg, v: %lg\n", pi->cid, pi->id, p1->cid, p1->id, r, v);
}
ses_ur_i(&a, &ja, v, jv, r, jr);
+ scf_loge("c%ldp%ld--c%ldp%ld, r: %lg, v: %lg, a: %lg\n\n", p0->cid, p0->id, p1->cid, p1->id, r, v, a);
+
path->a = a;
path->ja = ja;
pj->v = pi->v - info->n_diodes * SCF_EDA_V_Diode_ON - info->n_NPNs * SCF_EDA_V_NPN_ON;
pj->jv = pi->jv;
+ scf_logi("c%ldp%ld->v: %lg, c%ldp%ld->v: %lg, c%ldp%ld->v: %lg, r: %lg, v: %lg, a: %lg\n",
+ p0->cid, p0->id, p0->v, pi->cid, pi->id, pi->v, pj->cid, pj->id, pj->v, r, v, a);
+
el = f->elines[pi->lid];
el->a = a;
el->ja = ja;