}
}
}
-
- __ses_flip_pos(c0);
}
+
+ __ses_flip_pos(c0);
next:
c0 = NULL;
}
}
+static void __ses_set_cx(ScfEfunction* f, int d)
+{
+ ScfEcomponent* c;
+ ScfEpin* p0;
+ ScfEpin* p1;
+
+ size_t i;
+
+ for (i = 0; i < f->n_components; i++) {
+ c = f->components[i];
+
+ p0 = c->pins[0];
+ p1 = c->pins[1];
+
+ c->x = (p0->x + p1->x) / 2;
+ c->y = (p0->y + p1->y) / 2;
+ }
+}
+
static inline void __ses_xchg_cx2(ScfEcomponent* c0, ScfEcomponent* c1)
{
ScfEpin* p;
ScfEcomponent* c;
ScfEcomponent* c2;
ScfEline* el;
- ScfEline* el2;
ScfEpin* p0;
ScfEpin* p1;
size_t j;
size_t k;
- for (i = 0; i < f->n_components; i++) {
- c = f->components[i];
-
- p0 = c->pins[0];
- p1 = c->pins[1];
-
- c->x = (p0->x + p1->x) / 2;
- c->y = (p0->y + p1->y) / 2;
- }
-
for (i = 0; i < f->n_elines; i++) {
el = f->elines[i];
if (k < 2)
p1->x = c->x;
else
- p1->x += c->x - tmp;
+ p1->x += c->x - tmp;
}
+
+ scf_logi("c%ld->x: %d\n", c->id, c->x);
}
qsort(f->components, f->n_components, sizeof(ScfEcomponent*), ecomponent_cmp_id);
}
qsort(f->elines, f->n_elines, sizeof(ScfEline*), eline_cmp_id);
- __ses_de_cross (f, d);
+ __ses_de_cross(f, d);
- __ses_layout_cx(f, d);
- __ses_xchg_cx (f, d);
+ __ses_set_cx (f, d);
+ __ses_xchg_cx(f, d);
__ses_xchg_npn_ce(f, d);
+ __ses_layout_cx(f, d);
+
int mx = 0;
int nx = INT_MIN;
int px = INT_MAX;