ses_path_t* path0;
ses_path_t* path1;
+ ScfEcomponent* c0;
+ ScfEcomponent* c1;
ScfEcomponent* B = f->components[0];
ScfEpin* Bp = B->pins[SCF_EDA_Battery_POS];
ScfEpin* Bn = B->pins[SCF_EDA_Battery_NEG];
if (p2->lid != Bp->lid)
continue;
- if (p3->lid == Bn->lid)
- continue;
+// if (p3->lid == Bn->lid)
+// continue;
for (k = path1->pins->size - 1; k >= 0; k -= 2) {
p = path1->pins->data[k];
- if (p->lid == p0->lid)
- break;
+ if (p->lid == p0->lid) {
+ c0 = f->components[p0->cid];
+ c1 = f->components[p->cid];
+
+ if (SCF_EDA_NPN == c0->type) {
+ if (SCF_EDA_NPN_C == p0->id)
+ break;
+ else if (SCF_EDA_NPN != c1->type || SCF_EDA_NPN_C != p->id)
+ break;
+ } else if (SCF_EDA_NPN != c1->type)
+ break;
+ }
}
if (k > 0) {
- scf_loge("merge path: c%ldp%ld-c%ldp%ld ... c%ldp%ld-c%ldp%ld\n",
- p2->cid, p2->id, p->cid, p->id,
- p0->cid, p0->id, p1->cid, p1->id);
+ scf_loge("merge path: c%ldp%ld-c%ldp%ld (%d)... c%ldp%ld-c%ldp%ld (%d)\n",
+ p2->cid, p2->id, p->cid, p->id, path1->pins->size,
+ p0->cid, p0->id, p1->cid, p1->id, path0->pins->size);
int ret = __topo_path_xchg(path0, 0, path1, k + 1);
if (ret < 0)
}
if (k < path0->pins->size) {
- scf_loge("merge path: c%ldp%ld-c%ldp%ld ... c%ldp%ld-c%ldp%ld\n",
- p2->cid, p2->id, p3->cid, p3->id,
- p ->cid, p ->id, p1->cid, p1->id);
+ scf_loge("merge path: c%ldp%ld-c%ldp%ld (%d) ... c%ldp%ld-c%ldp%ld (%d)\n",
+ p2->cid, p2->id, p3->cid, p3->id, path1->pins->size,
+ p ->cid, p ->id, p1->cid, p1->id, path0->pins->size);
int ret = __topo_path_xchg(path0, k, path1, path1->pins->size);
if (ret < 0)