From 5d1454de49b1dbea8b45f77d8f8beb74758d5653 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sun, 16 Jul 2023 20:33:25 +0800 Subject: [PATCH] tmp --- ses_layout.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ses_layout.c b/ses_layout.c index 769ead3..793b32b 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -424,13 +424,13 @@ int ses_layout_function(ScfEfunction* f, int d) p0 = c0->pins[el0->pins[m + 1]]; p1 = c0->pins[el1->pins[n + 1]]; - p0->x = el0->lines[0]->x1 + j * d + rand() % 10; - p1->x = el1->lines[0]->x1 + j * d + rand() % 10; + p0->x = el0->lines[0]->x1 + j * d; + p1->x = el1->lines[0]->x1 + j * d; p0->y = el0->lines[0]->y0; p1->y = el1->lines[0]->y0; - el0->lines[0]->x1 += j * d + 10; - el1->lines[0]->x1 += j * d + 10; + el0->lines[0]->x1 += j * d; + el1->lines[0]->x1 += j * d; if (f->w < el0->lines[0]->x1 - f->x) f->w = el0->lines[0]->x1 - f->x; @@ -455,10 +455,10 @@ int ses_layout_function(ScfEfunction* f, int d) if (0 == p0->x) { - p0->x = el0->lines[0]->x1 + d + rand() % 10; + p0->x = el0->lines[0]->x1 + d; p0->y = el0->lines[0]->y1; - el0->lines[0]->x1 += d + 10; + el0->lines[0]->x1 += d; if (f->w < el0->lines[0]->x1 - f->x) f->w = el0->lines[0]->x1 - f->x; @@ -660,6 +660,11 @@ next: c0->x = cx / c0->n_pins; c0->y = cy / c0->n_pins; + + if (2 == c0->n_pins) { + c0->pins[0]->x = c0->x; + c0->pins[1]->x = c0->x; + } } for (i = 0; i < f->n_elines; i++) { -- 2.25.1