aboutsummaryrefslogtreecommitdiffstats
path: root/common/place.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-15 10:14:12 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-16 14:44:10 +0200
commit32dcf6b3fe02f2338558be1610257605a94b0d38 (patch)
tree256568c89ae66aa1fc7f7c4d37c804567ac7d1c0 /common/place.cc
parent104c2dad9b4148586b05d41e482101a925cf681f (diff)
downloadnextpnr-32dcf6b3fe02f2338558be1610257605a94b0d38.tar.gz
nextpnr-32dcf6b3fe02f2338558be1610257605a94b0d38.tar.bz2
nextpnr-32dcf6b3fe02f2338558be1610257605a94b0d38.zip
Experimenting with more unplacing
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common/place.cc')
-rw-r--r--common/place.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/common/place.cc b/common/place.cc
index 35299604..e622ae71 100644
--- a/common/place.cc
+++ b/common/place.cc
@@ -148,14 +148,15 @@ static void place_cell(Design *design, CellInfo *cell, std::mt19937 &rnd)
const PortInfo &pi = port.second;
if (pi.net != nullptr) {
CellInfo *drv = pi.net->driver.cell;
- float pin_wirelength = std::numeric_limits<float>::infinity();
+ //float pin_wirelength = std::numeric_limits<float>::infinity();
+ float pin_wirelength = 0;
if (drv != nullptr && drv->bel != BelId()) {
float otherx, othery;
chip.estimatePosition(drv->bel, otherx, othery);
float local_wl = std::abs(belx - otherx) +
std::abs(bely - othery);
- if (local_wl < pin_wirelength)
- pin_wirelength = local_wl;
+ //if (local_wl < pin_wirelength)
+ pin_wirelength += local_wl;
has_conns = true;
}
if (pi.net->users.size() < 5) {
@@ -166,8 +167,8 @@ static void place_cell(Design *design, CellInfo *cell, std::mt19937 &rnd)
chip.estimatePosition(uc->bel, otherx, othery);
float local_wl = std::abs(belx - otherx) +
std::abs(bely - othery);
- if (local_wl < pin_wirelength)
- pin_wirelength = local_wl;
+ //if (local_wl < pin_wirelength)
+ pin_wirelength += local_wl;
has_conns = true;
}
}
@@ -238,8 +239,12 @@ void place_design_heuristic(Design *design)
}
log_info("placed %d/%d\n", placed_cells, total_cells);
}
- for (int i = 0 ; i < 2; i ++) {
+ for (int i = 0 ; i < 5; i ++) {
int replaced_cells = 0;
+ for (int j = 0; j < autoplaced.size() / 10; j++) {
+ design->chip.unbindBel(design->cells.at(autoplaced.at(j))->bel);
+ design->cells.at(autoplaced.at(j))->bel = BelId();
+ }
std::shuffle(autoplaced.begin(), autoplaced.end(), rnd);
for (auto cell : autoplaced) {
CellInfo *ci = design->cells[cell];