From: yu.dongliang <18588496441@163.com> Date: Mon, 30 Oct 2023 11:30:29 +0000 (+0800) Subject: tmp X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=9bf7264b03283104e3fb42530aaf115dee5aaac4;p=ses.git tmp --- diff --git a/ses_layout.c b/ses_layout.c index 18490bc..05d2933 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -421,10 +421,16 @@ int ses_lines_same_components(ScfEfunction* f) } #if 1 - k0 = INT_MAX; + size_t N_PINS = 0; - while (1) { - k1 = 0; + for (i = 0; i < f->n_elines; i++) { + el0 = f->elines[i]; + + if (N_PINS < el0->n_pins) + N_PINS = el0->n_pins; + } + + for (n = 0; n < 5; n++) { for (i = 0; i < f->n_elines; i++) { el0 = f->elines[i]; @@ -452,24 +458,17 @@ int ses_lines_same_components(ScfEfunction* f) el1 = f->elines[j]; } - for (n = f->n_elines - 1; n > j; n--) - f->elines[n] = f->elines[n - 1]; + for (m = f->n_elines - 1; m > j; m--) + f->elines[m] = f->elines[m - 1]; f->elines[j] = el0; if (j == i) continue; - k1++; - - scf_loge("mov el%ld [%ld] --> [%ld] el%ld\n", el0->id, i, j, el1->id); + scf_loge("n: %ld, mov el%ld [%ld] --> [%ld] el%ld\n", n, el0->id, i, j, el1->id); } printf("\n"); - - if (k0 <= k1) - break; - - k0 = k1; } #endif @@ -479,14 +478,17 @@ int ses_lines_same_components(ScfEfunction* f) el0->n_lines = 0; - scf_logd("el0: %ld, n_conns: %ld, n_pins: %ld, flags: %#lx\n", el0->id, el0->n_conns, el0->n_pins, el0->flags); + scf_logw("el0: %ld, n_conns: %ld, n_pins: %ld, flags: %#lx\n", el0->id, el0->n_conns, el0->n_pins, el0->flags); for (j = 0; j < el0->n_conns; j++) { ec = el0->conns[j]; - scf_logd("j: %ld, lid: %ld, n_cids: %ld, cid[0]: %ld\n", j, ec->lid, ec->n_cids, ec->cids[0]); + scf_logi("j: %ld, lid: %ld, n_cids: %ld, cid[0]: %ld\n", j, ec->lid, ec->n_cids, ec->cids[0]); } + printf("\n"); } + + scf_loge("N_PINS: %ld\n", N_PINS); #endif return 0;