p0 = c0->pins[el0->pins[m + 1]];
p1 = c0->pins[el1->pins[n + 1]];
- p0->x = el0->lines[0]->x1 + j * d + rand() % d;
- p1->x = el1->lines[0]->x1 + j * d + rand() % d;
+ p0->x = el0->lines[0]->x1 + j * d + 10 + rand() % d;
+ p1->x = el1->lines[0]->x1 + j * d + 10 + rand() % d;
p0->y = el0->lines[0]->y0;
p1->y = el1->lines[0]->y0;
if (0 == p0->x) {
- p0->x = el0->lines[0]->x1 + d + rand() % d;
+ p0->x = el0->lines[0]->x1 + d + 10 + rand() % d;
p0->y = el0->lines[0]->y1;
el0->lines[0]->x1 = p0->x;
if (p3 == p2)
continue;
- if (p1->y < p0->y && p3->y < p0->y) {
+ if (p1->y < p0->y && p3->y > p0->y)
+ continue;
+ if (p1->y > p0->y && p3->y < p0->y)
+ continue;
- if (p0->x > p2->x) {
+ if (p1->y == p3->y) {
- if (p1->x < p3->x || p1->y > p3->y)
+ if (p1->x < p3->x) {
+ if (p0->x > p2->x)
SCF_XCHG(p0->x, p2->x);
- } else {
- if (p1->x > p3->x || p1->y < p3->y)
- SCF_XCHG(p0->x, p2->x);
- }
+ } else if (p0->x < p2->x)
+ SCF_XCHG(p0->x, p2->x);
+ continue;
+ }
- } else if (p1->y > p0->y && p3->y > p0->y) {
+ if (p1->y < p0->y) {
- if (p0->x > p2->x) {
- if (p1->x < p3->x || p1->y < p3->y)
+ if (p1->y < p3->y) {
+ if (p0->x < p2->x)
SCF_XCHG(p0->x, p2->x);
- } else {
- if (p1->x > p3->x || p1->y > p3->y)
+
+ } else if (p0->x > p2->x)
+ SCF_XCHG(p0->x, p2->x);
+
+ } else if (p1->y > p0->y) {
+
+ if (p1->y > p3->y) {
+ if (p0->x < p2->x)
SCF_XCHG(p0->x, p2->x);
+
+ } else if (p0->x > p2->x) {
+ SCF_XCHG(p0->x, p2->x);
+ scf_logd("c%ldp%ld-c%ldp%ld->x: %d, c%ldp%ld-c%ldp%ld->x: %d\n\n",
+ p0->cid, p0->id, p1->cid, p1->id, p0->x,
+ p2->cid, p2->id, p3->cid, p3->id, p2->x);
}
}
}
}
qsort(f->elines, f->n_elines, sizeof(ScfEline*), eline_cmp_id);
-
+#if 1
for (i = 0; i < f->n_components - 1; i++) {
c0 = f->components[i];
p0 = c0->pins[0];
next:
c0 = NULL;
}
-
+#endif
int mx = 0;
int nx = INT_MIN;
int px = INT_MAX;
if (j < 2)
p0->x = c0->x;
- else
- p0->x = (c0->x * 3 + p0->x) / 4;
+ // else
+ // p0->x = (c0->x * 3 + p0->x) / 4;
}
}
return ret;
}
- ses_steps_analyse(f, 5, 1);
+// ses_steps_analyse(f, 5, 1);
x = f->x;
y = f->y;