{
ScfEcomponent* c;
ScfEcomponent* c2;
- ScfEline* el;
- ScfEpin* p0;
- ScfEpin* p1;
+ ScfEpin* p;
+ ScfEpin* p2;
size_t i;
size_t j;
size_t k;
- for (i = 0; i < f->n_elines; i++) {
- el = f->elines[i];
-
- int cx = 0;
-
- qsort_r(el->pins, el->n_pins / 2, sizeof(uint64_t) * 2, epin_cmp_cx, f);
-
- for (j = 0; j < el->n_pins; j += 2) {
-
- c = f->components[el->pins[j]];
- p0 = c->pins [el->pins[j + 1]];
-
- int tmp = c->x;
-
- if (j > 0) {
- if (c->x < cx + d)
- c->x = cx + d;
- }
- cx = c->x;
-
- for (k = 0; k < c->n_pins; k++) {
- p1 = c->pins[k];
-
- if (k < 2)
- p1->x = c->x;
- else
- p1->x += c->x - tmp;
- }
- }
- }
-
qsort(f->components, f->n_components, sizeof(ScfEcomponent*), ecomponent_cmp_cx);
for (i = 1; i < f->n_components; i++) {
c = f->components[i];
int tmp = c->x;
- if (c->x > c2->x + d)
- c->x = c2->x + d;
+ for (j = 0; j < c->n_pins; j++) {
+ p = c->pins[j];
+
+ for (k = 0; k < c2->n_pins; k++) {
+ p2 = c2->pins[k];
+
+ if (p->lid == p2->lid) {
+ c->x = c2->x + d;
+ goto _set_px;
+ }
+ }
+ }
- if (c->x < c2->x + d / 2)
- c->x = c2->x + d / 2;
+ c->x = c2->x + d / 2;
+_set_px:
for (k = 0; k < c->n_pins; k++) {
- p1 = c->pins[k];
+ p = c->pins[k];
if (k < 2)
- p1->x = c->x;
+ p->x = c->x;
else
- p1->x += c->x - tmp;
+ p->x += c->x - tmp;
}
- scf_logi("c%ld->x: %d\n", c->id, c->x);
+ scf_logd("c%ld->x: %d\n", c->id, c->x);
}
qsort(f->components, f->n_components, sizeof(ScfEcomponent*), ecomponent_cmp_id);
}
__ses_xchg_cx(f, d);
__ses_xchg_ce(f, d);
__ses_mov_pos(f, d);
-// __ses_layout_cx(f, d);
+ __ses_layout_cx(f, d);
int tx0 = INT_MAX;
int tx1 = 0;