n++;
}
+ scf_logw("*****************\n");
return n;
}
r = p->sr - (p->r + p->dr ) - p0->sr;
jr = p->jsr - (p->jr + p->jdr) - p0->jsr;
- ses_ir_u(&v, &jv, a, ja, r, jr);
-
- scf_logd("c%ldp%ld, c%ldp%ld, a: %lg + j%lg, r: %lg + j%lg, v: %lg + j%lg\n", p0->cid, p0->id, p->cid, p->id, a, ja, r, jr, v, jv);
-
} else if (i >= 1) {
p2 = path->pins->data[i - 1];
- r = p2->sr - p0->sr;
- jr = p2->jsr - p0->jsr;
-
- ses_ir_u(&v, &jv, a, ja, r, jr);
-
- scf_logd("c%ldp%ld, c%ldp%ld, a: %lg + j%lg, r: %lg + j%lg, v: %lg + j%lg\n", p0->cid, p0->id, p->cid, p->id, a, ja, r, jr, v, jv);
+ if (p2 == p0) {
+ r = p0->r + p0->dr;
+ jr = p0->jr + p0->jdr;
+ } else {
+ r = p2->sr - p0->sr;
+ jr = p2->jsr - p0->jsr;
+ }
} else
return -EINVAL;
} else {
r = p->sr - p0->sr;
jr = p->jsr - p0->jsr;
-
- ses_ir_u(&v, &jv, a, ja, r, jr);
}
+ ses_ir_u(&v, &jv, a, ja, r, jr);
+
p->v = p0->v - v;
p->jv = p0->jv - jv;
+ scf_logd("c%ldp%ld, c%ldp%ld, a: %lg, r: %lg, v: %lg\n", p0->cid, p0->id, p->cid, p->id, a, r, v);
return 0;
}