int j;
int k;
- for (i = paths->size - 1; i >= 1; i--) {
+ for (i = 0; i < paths->size; ) {
path0 = paths->data[i];
p0 = path0->pins->data[0];
p1 = path0->pins->data[path0->pins->size - 1];
- if (p1->lid != Bn->lid)
+ if (p1->lid != Bn->lid) {
+ i++;
continue;
+ }
- if (p0->lid == Bp->lid)
+ if (p0->lid == Bp->lid) {
+ i++;
continue;
+ }
- for (j = paths->size - 1; j >= 0; j--) {
+ for (j = 0; j < paths->size; j++) {
path1 = paths->data[j];
if (path1 == path0)
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) {
- 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 (p->lid == p0->lid)
+ break;
}
if (k > 0) {
break;
}
}
+
+ if (path0)
+ i++;
}
return 0;
// &ses_step_simplify,
&ses_step_topo,
-#if 0
+#if 1
&ses_step_jr,
&ses_step_va_diode,
return ret;
int j;
- for (j = 0; j < 1; j++) {
+ for (j = 0; j < 3; j++) {
printf("\n\033[33m%s(), %d(), j: %d\033[0m\n", __func__, __LINE__, j);
ret = __ses_steps_analyse(f, ns, i, ctx);