aboutsummaryrefslogtreecommitdiffstats
path: root/common/place_common.cc
diff options
context:
space:
mode:
Diffstat (limited to 'common/place_common.cc')
-rw-r--r--common/place_common.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/place_common.cc b/common/place_common.cc
index 9fba90f9..2ec8d571 100644
--- a/common/place_common.cc
+++ b/common/place_common.cc
@@ -37,7 +37,6 @@ wirelen_t get_net_metric(const Context *ctx, const NetInfo *net, MetricType type
return 0;
driver_gb = ctx->getBelGlobalBuf(driver_cell->bel);
driver_loc = ctx->getBelLocation(driver_cell->bel);
- WireId drv_wire = ctx->getBelPinWire(driver_cell->bel, ctx->portPinFromId(net->driver.port));
if (driver_gb)
return 0;
delay_t worst_slack = std::numeric_limits<delay_t>::max();
@@ -49,9 +48,8 @@ wirelen_t get_net_metric(const Context *ctx, const NetInfo *net, MetricType type
if (load_cell->bel == BelId())
continue;
if (ctx->timing_driven && type == MetricType::COST) {
- WireId user_wire = ctx->getBelPinWire(load_cell->bel, ctx->portPinFromId(load.port));
- delay_t raw_wl = ctx->estimateDelay(drv_wire, user_wire);
- auto slack = load.budget - raw_wl;
+ delay_t net_delay = ctx->predictDelay(net, load);
+ auto slack = load.budget - net_delay;
if (slack < 0)
tns += slack;
worst_slack = std::min(slack, worst_slack);