ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
place_gordian.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <limits.h>
#include "place_gordian.h"
#include "place_base.h"
Include dependency graph for place_gordian.c:

Go to the source code of this file.

Functions

void globalPlace ()
 Performs analytic placement using a GORDIAN-like algorithm.
 
void globalIncremental ()
 Performs analytic placement using a GORDIAN-like algorithm.
 
void sanitizePlacement ()
 Moves any cells that are outside of the core bounds to the nearest location within.
 

Variables

ABC_NAMESPACE_IMPL_START int g_place_numPartitions
 

Function Documentation

◆ globalIncremental()

void globalIncremental ( )

Performs analytic placement using a GORDIAN-like algorithm.

Requires a valid set of partitions.

Definition at line 94 of file place_gordian.c.

94 {
96 printf("WARNING: Can not perform incremental placement\n");
98 return;
99 }
100
101 printf("PLAC-10 : Incremental global placement\n");
102
104
105 printf("QMAN-00 : \tconstructing initial quadratic problem...\n");
107
109 printf("QMAN-01 : \t\twirelength = %e\n", getTotalWirelength());
110
111 // clean up
113 printf("QMAN-01 : \t\twirelength = %e\n", getTotalWirelength());
115 printf("QMAN-01 : \t\twirelength = %e\n", getTotalWirelength());
116}
float getTotalWirelength()
Returns the total HPWL of all nets.
Definition place_base.c:86
float g_place_rowHeight
Definition place_base.c:28
void globalFixDensity(int numBins, float maxMovement)
Doesn't deal well with fixed cells in the core area.
Definition place_bin.c:43
void solveQuadraticProblem(bool useCOG)
Calls quadratic solver.
void constructQuadraticProblem()
Constructs the matrices necessary to do analytical placement.
Definition place_genqp.c:53
void globalPlace()
Performs analytic placement using a GORDIAN-like algorithm.
void sanitizePlacement()
Moves any cells that are outside of the core bounds to the nearest location within.
Partition * g_place_rootPartition
void incrementalPartition()
Adds new cells to an existing partition. Partition sizes/locations are unchanged.
#define IGNORE_COG
Here is the call graph for this function:
Here is the caller graph for this function:

◆ globalPlace()

void globalPlace ( )

Performs analytic placement using a GORDIAN-like algorithm.

Updates the positions of all non-fixed non-pad cells.

Definition at line 39 of file place_gordian.c.

39 {
40 bool completionFlag = false;
41 int iteration = 0;
42
43 printf("PLAC-10 : Global placement (wirelength-driven Gordian)\n");
44
46
47 // build matrices representing interconnections
48 printf("QMAN-00 : \tconstructing initial quadratic problem...\n");
50
51 // iterate placement until termination condition is met
52 while(!completionFlag) {
53 printf("QMAN-01 : \titeration %d numPartitions = %d\n",iteration,g_place_numPartitions);
54
55 // do the global optimization in each direction
56 printf("QMAN-01 : \t\tglobal optimization\n");
58
59 // -------- PARTITIONING BASED CELL SPREADING ------
60
61 // bisection
62 printf("QMAN-01 : \t\tpartition refinement\n");
64 completionFlag |= refinePartitions();
65
66 printf("QMAN-01 : \t\twirelength = %e\n", getTotalWirelength());
67
68 iteration++;
69 }
70
71 // final global optimization
72 printf("QMAN-02 : \t\tfinal pass\n");
75 printf("QMAN-01 : \t\twirelength = %e\n", getTotalWirelength());
76
77 // clean up
79 printf("QMAN-01 : \t\twirelength = %e\n", getTotalWirelength());
81 printf("QMAN-01 : \t\twirelength = %e\n", getTotalWirelength());
82}
ABC_NAMESPACE_IMPL_START int g_place_numPartitions
#define REALLOCATE_PARTITIONS
bool refinePartitions()
Splits large leaf partitions.
#define FINAL_REALLOCATE_PARTITIONS
void reallocPartitions()
Reallocates the partitions based on placement information.
void initPartitioning()
Initializes data structures necessary for partitioning.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sanitizePlacement()

void sanitizePlacement ( )

Moves any cells that are outside of the core bounds to the nearest location within.

Definition at line 125 of file place_gordian.c.

125 {
126 int c;
127 float order_width = g_place_rowHeight;
128 float x, y, edge, w, h;
129
130 printf("QCLN-10 : \tsanitizing placement\n");
131
132 for(c=0; c<g_place_numCells; c++) if (g_place_concreteCells[c]) {
134 if (cell->m_fixed || cell->m_parent->m_pad) {
135 continue;
136 }
137 // the new locations of the cells will be distributed within
138 // a small margin inside the border so that ordering is preserved
139 order_width = g_place_rowHeight;
140
141 x = cell->m_x, y = cell->m_y,
142 w = cell->m_parent->m_width, h = cell->m_parent->m_height;
143
144 if ((edge=x-w*0.5) < g_place_coreBounds.x) {
145 x = g_place_coreBounds.x+w*0.5 +
146 order_width/(1.0+g_place_coreBounds.x-edge);
147 }
148 else if ((edge=x+w*0.5) > g_place_coreBounds.x+g_place_coreBounds.w) {
150 order_width/(1.0+edge-g_place_coreBounds.x-g_place_coreBounds.w);
151 }
152 if ((edge=y-h*0.5) < g_place_coreBounds.y) {
153 y = g_place_coreBounds.y+h*0.5 +
154 order_width/(1.0+g_place_coreBounds.y-edge);
155 }
156 else if ((edge=y+h*0.5) > g_place_coreBounds.y+g_place_coreBounds.h) {
158 order_width/(1.0+edge-g_place_coreBounds.x-g_place_coreBounds.w);
159 }
160 cell->m_x = x;
161 cell->m_y = y;
162 }
163}
unsigned edge
Definition giaNewBdd.h:40
ConcreteCell ** g_place_concreteCells
Definition place_base.c:33
ABC_NAMESPACE_IMPL_START int g_place_numCells
Definition place_base.c:26
Rect g_place_coreBounds
Definition place_base.c:30
float m_width
Definition place_base.h:45
float m_height
Definition place_base.h:45
AbstractCell * m_parent
Definition place_base.h:57
Here is the caller graph for this function:

Variable Documentation

◆ g_place_numPartitions

ABC_NAMESPACE_IMPL_START int g_place_numPartitions

Definition at line 28 of file place_gordian.c.