aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-07-30 19:19:30 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2018-07-30 19:19:30 -0700
commita099aca3c203eeea6b6cd093f31089c2a0933927 (patch)
treeba8e996d2118331bfaf618124da8b831962d1827 /common
parentd5049bf0eda113db9a218fe855c7e3d7d65b4384 (diff)
downloadnextpnr-a099aca3c203eeea6b6cd093f31089c2a0933927.tar.gz
nextpnr-a099aca3c203eeea6b6cd093f31089c2a0933927.tar.bz2
nextpnr-a099aca3c203eeea6b6cd093f31089c2a0933927.zip
Modify predictDelay signature
Diffstat (limited to 'common')
-rw-r--r--common/nextpnr.cc2
-rw-r--r--common/place_common.cc6
2 files changed, 3 insertions, 5 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc
index 5b0a45ed..4a97bd93 100644
--- a/common/nextpnr.cc
+++ b/common/nextpnr.cc
@@ -111,7 +111,7 @@ delay_t Context::getNetinfoRouteDelay(NetInfo *net_info, int user_idx) const
if (cursor == src_wire)
return delay + getWireDelay(src_wire).maxDelay();
- return predictDelay(src_wire, dst_wire);
+ return predictDelay(net_info, net_info->users[user_idx]);
}
static uint32_t xorshift32(uint32_t x)
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);