int _topo_print(scf_vector_t* paths);
-static void __ses_layout_path(ScfEfunction* f, ses_path_t* path, ses_path_t* base)
+static void __ses_layout_path2(ScfEfunction* f, ses_path_t* path, ses_path_t* base)
{
ScfEcomponent* c;
ScfEline* el;
for (j = path->pins->size - 1; j > 0; j -= 2) {
p = path->pins->data[j];
+ scf_logi("path: %d, c%ldp%ld, __n: %ld, l%ld\n", path->index, p->cid, p->id, __n, f->elines[__n]->id);
+
for (k = base->pins->size - 1; k >= 0; k--) {
bp = base->pins->data[k];
p = path->pins->data[0];
+ scf_logi("path: %d, c%ldp%ld, __n: %ld, l%ld\n", path->index, p->cid, p->id, __n, f->elines[__n]->id);
+
for (k = base->pins->size - 1; k >= 0; k--) {
bp = base->pins->data[k];
if (p->lid == bp->lid) {
__n = __ses_find_eline_index(f, bp->lid);
+
+ scf_logw("__n: %ld, l%ld\n", __n, f->elines[__n]->id);
break;
}
}
eline_mov_before(f, __n, n);
}
printf("\n");
+}
- base = path;
+static void __ses_layout_path(ScfEfunction* f, ses_path_t* path, ses_path_t* base)
+{
+ intptr_t i;
+
+ if (path != base) {
+ __ses_layout_path2(f, path, base);
+
+ base = path;
+ }
if (base->childs) {
- for (j = 0; j < base->childs->size; j++) {
- path = base->childs->data[j];
+ for (i = 0; i < base->childs->size; i++) {
+ path = base->childs->data[i];
__ses_layout_path(f, path, base);
}
}
if (base->bridges) {
- for (j = 0; j < base->bridges->size; j++) {
- path = base->bridges->data[j];
+ for (i = 0; i < base->bridges->size; i++) {
+ path = base->childs->data[i];
__ses_layout_path(f, path, base);
}
}
- scf_loge("path: %d\n\n", path->index);
+ scf_logi("path: %d, ------------------------\n\n", base->index);
}
static int __ses_layout_lines4(ScfEfunction* f)
intptr_t i;
intptr_t j;
- intptr_t k;
intptr_t n;
intptr_t __n;
p = base->pins->data[j - 1];
n = __ses_find_eline_index(f, p->lid);
-
SCF_XCHG(f->elines[n], f->elines[j / 2 + 1]);
- scf_logd("j: %ld, l%ld\n", j / 2 + 1, f->elines[j / 2 + 1]->id);
+ __ses_layout_path(f, base, base);
for (i = 0; i < paths->size; i++) {
path = paths->data[i];