int _topo_print(scf_vector_t* paths);
-static int __ses_layout_path(ScfEfunction* f, ses_path_t* path, ses_path_t* base)
+static void __ses_layout_path(ScfEfunction* f, ses_path_t* path, ses_path_t* base)
{
ScfEcomponent* c;
ScfEline* el;
bp = base->pins->data[base->pins->size - 1];
__n = __ses_find_eline_index(f, bp->lid);
- scf_logd("path: %d, __n: %ld, l%ld\n", path->index, __n, f->elines[__n]->id);
+ scf_logw("path: %d, __n: %ld, l%ld\n", path->index, __n, f->elines[__n]->id);
for (j = path->pins->size - 1; j > 0; j -= 2) {
p = path->pins->data[j];
eline_mov_before(f, __n, n);
}
+ printf("\n");
+
+ base = path;
+
+ if (base->childs) {
+ for (j = 0; j < base->childs->size; j++) {
+ path = base->childs->data[j];
+
+ __ses_layout_path(f, path, base);
+ }
+ }
+
+ if (base->bridges) {
+ for (j = 0; j < base->bridges->size; j++) {
+ path = base->bridges->data[j];
+
+ __ses_layout_path(f, path, base);
+ }
+ }
+
+ scf_loge("path: %d\n\n", path->index);
}
static int __ses_layout_lines4(ScfEfunction* f)
ses_path_t* path;
ScfEcomponent* B;
- ScfEcomponent* c;
ScfEline* el;
ScfEpin* Bp;
- ScfEpin* Bn;
ScfEpin* p;
- ScfEpin* pc;
- ScfEpin* pe;
intptr_t i;
intptr_t j;
B = f->components[0];
Bp = B->pins[SCF_EDA_Battery_POS];
- Bn = B->pins[SCF_EDA_Battery_NEG];
for (i = 0; i < paths->size; i++) {
base = paths->data[i];
p = base->pins->data[j];
n = __ses_find_eline_index(f, p->lid);
+
SCF_XCHG(f->elines[n], f->elines[j / 2]);
}
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);
for (i = 0; i < paths->size; i++) {