#include<cairo/cairo.h>
#include"ses_core.h"
-#define N_PINS 4
-
int epin_cmp(const void* v0, const void* v1)
{
const uint64_t* t0 = v0;
for (i = 0; i + 1 < f->n_elines; i++) {
el0 = f->elines[i];
- if (el0->n_pins <= N_PINS)
+ if (el0->n_conns <= 1)
continue;
v0 = ses_vertex_add(graph, el0);
for (j = i + 1; j < f->n_elines; j++) {
el1 = f->elines[j];
- if (el1->n_pins <= N_PINS)
+ if (el1->n_conns <= 1)
continue;
for (k = 0; k < el0->n_conns; k++) {
}
- for (j = N; j >= 0; j--) {
+ for (j = N; j >= 1; j--) {
for (i = 1; i <= j; i++)
scf_vector_add(colors, (void*)i);
}
k = 0;
- for (j = 0; j < colors->size; j++) {
+ for (++j; j >= 1; j--) {
for (i = 0; i < graph->size; i++) {
v = graph->data[i];
for (i = 0; i < f->n_elines; i++) {
el0 = f->elines[i];
- if (el0->n_pins > N_PINS)
+ if (el0->n_conns > 1)
continue;
+ assert(1 == el0->n_conns);
for (j = i + 1; j < f->n_elines; j++)
f->elines[j - 1] = f->elines[j];
j = __ses_find_eline_index(f, el0->conns[0]->lid);
- if (el0->n_conns > 1) {
- m = __ses_find_eline_index(f, el0->conns[1]->lid);
-
- if (j > m)
- SCF_XCHG(j, m);
-
- el1 = f->elines[j];
- ++j;
- } else if (j > f->n_elines / 2) {
- el1 = f->elines[j];
- ++j;
- } else
- el1 = f->elines[j];
+ el1 = f->elines[j];
for (m = f->n_elines - 1; m > j; m--)
f->elines[m] = f->elines[m - 1];
qsort(f->elines, f->n_elines, sizeof(ScfEline*), eline_cmp_id);
+// ses_cross(f, d);
+
__ses_de_cross(f, d);
- ses_cross(f, d);
__ses_setc_xy(f, d);
__ses_xchg_cx(f, d);