tmp
authoryu.dongliang <18588496441@163.com>
Mon, 16 Oct 2023 11:23:51 +0000 (19:23 +0800)
committeryu.dongliang <18588496441@163.com>
Mon, 16 Oct 2023 11:23:51 +0000 (19:23 +0800)
ses_layout.c

index de4ef12cb507b382f89efb728bbadf6eb9eea1e4..8a9080ee9a79070a30cf82221bb2e77e8c2e2e2b 100644 (file)
@@ -474,13 +474,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;
-                               p1->x = el1->lines[0]->x1 + j * d;
+                               p0->x = el0->lines[0]->x1 + j * d + rand() % d;
+                               p1->x = el1->lines[0]->x1 + j * d + rand() % d;
                                p0->y = el0->lines[0]->y0;
                                p1->y = el1->lines[0]->y0;
 
-                               el0->lines[0]->x1 += j * d;
-                               el1->lines[0]->x1 += j * d;
+                               el0->lines[0]->x1 = p0->x;
+                               el1->lines[0]->x1 = p1->x;
 
                                if (f->w < el0->lines[0]->x1 - f->x)
                                        f->w = el0->lines[0]->x1 - f->x;
@@ -505,10 +505,10 @@ int ses_layout_function(ScfEfunction* f, int d)
 
                        if (0 == p0->x) {
 
-                               p0->x = el0->lines[0]->x1 + d;
+                               p0->x = el0->lines[0]->x1 + d + rand() % d;
                                p0->y = el0->lines[0]->y1;
 
-                               el0->lines[0]->x1 += d;
+                               el0->lines[0]->x1 = p0->x;
 
                                if (f->w < el0->lines[0]->x1 - f->x)
                                        f->w = el0->lines[0]->x1 - f->x;
@@ -736,7 +736,7 @@ next:
                        if (j < 2)
                                p0->x = c0->x;
                        else
-                               p0->x = c0->x > p0->x ? c0->x - d : c0->x + d;
+                               p0->x = (c0->x * 3 + p0->x) / 4;
                }
        }