diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/place_sa.cc | 9 | ||||
-rw-r--r-- | common/timing.cc | 7 |
2 files changed, 12 insertions, 4 deletions
diff --git a/common/place_sa.cc b/common/place_sa.cc index 0a60adc8..485ddc88 100644 --- a/common/place_sa.cc +++ b/common/place_sa.cc @@ -314,7 +314,9 @@ class SAPlacer load_cell->bel, ctx->portPinFromId(load.port)); // wirelength += std::abs(load_x - driver_x) + std::abs(load_y - // driver_y); - wirelength += ctx->estimateDelay(drv_wire, user_wire); + delay_t raw_wl = ctx->estimateDelay(drv_wire, user_wire); + wirelength += 100 * (ctx->getDelayNS(raw_wl) / ctx->getDelayNS(load.budget)); + // wirelength += pow(ctx->estimateDelay(drv_wire, user_wire), 2.0); } return wirelength; } @@ -376,9 +378,8 @@ class SAPlacer delta = new_wirelength - curr_wirelength; n_move++; // SA acceptance criterea - if (delta < 0 || - (temp > 1e-6 && - (ctx->rng() / float(0x3fffffff)) <= std::exp(-delta / temp))) { + if (delta < 0 || (temp > 1e-6 && (ctx->rng() / float(0x3fffffff)) <= + std::exp(-delta / temp))) { n_accept++; if (delta < 0) improved = true; diff --git a/common/timing.cc b/common/timing.cc index a4bda3bb..8da26077 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -101,6 +101,8 @@ void assign_budget(Context *ctx, float default_clock) } } } + const bool debug = true; + // Post-allocation check for (auto net : ctx->nets) { for (auto user : net.second->users) { @@ -109,6 +111,11 @@ void assign_budget(Context *ctx, float default_clock) "timing budget of %fns\n", user.cell->name.c_str(ctx), user.port.c_str(ctx), net.first.c_str(ctx), ctx->getDelayNS(user.budget)); + if (debug) + log_warning("port %s.%s, connected to net '%s', has " + "timing budget of %fns\n", + user.cell->name.c_str(ctx), user.port.c_str(ctx), + net.first.c_str(ctx), ctx->getDelayNS(user.budget)); } } } |