From 0a1191934dcfd6b508c831544ba8c025112adf4c Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sun, 16 Jul 2023 18:59:04 +0800 Subject: [PATCH] battery --- ses_layout.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/ses_layout.c b/ses_layout.c index 67d5269..769ead3 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -424,21 +424,14 @@ int ses_layout_function(ScfEfunction* f, int d) p0 = c0->pins[el0->pins[m + 1]]; p1 = c0->pins[el1->pins[n + 1]]; - if (SCF_EDA_Battery == c0->type) { - - p0->x = el0->lines[0]->x0; - p1->x = el1->lines[0]->x0; - } else { - p0->x = el0->lines[0]->x1 + j * d + rand() % 10; - p1->x = el1->lines[0]->x1 + j * d + rand() % 10; - - el0->lines[0]->x1 += j * d + 10; - el1->lines[0]->x1 += j * d + 10; - } - + p0->x = el0->lines[0]->x1 + j * d + rand() % 10; + p1->x = el1->lines[0]->x1 + j * d + rand() % 10; 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; + if (f->w < el0->lines[0]->x1 - f->x) f->w = el0->lines[0]->x1 - f->x; @@ -462,14 +455,11 @@ int ses_layout_function(ScfEfunction* f, int d) if (0 == p0->x) { - if (SCF_EDA_Battery == c0->type) - p0->x = el0->lines[0]->x0; - else { - p0->x = el0->lines[0]->x1 + d + rand() % 10; - el0->lines[0]->x1 += d + 10; - } + p0->x = el0->lines[0]->x1 + d + rand() % 10; p0->y = el0->lines[0]->y1; + el0->lines[0]->x1 += d + 10; + if (f->w < el0->lines[0]->x1 - f->x) f->w = el0->lines[0]->x1 - f->x; } -- 2.25.1