diff options
author | David Shah <dave@ds0.me> | 2019-04-04 16:58:43 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-04-04 16:58:43 +0100 |
commit | 659c9325591845806143865563081a6644a3b900 (patch) | |
tree | 304a9875bfc919512b7825ed17aec16e4ae689e5 | |
parent | f12a209391984835e011e8ac12c4424397917942 (diff) | |
download | nextpnr-659c9325591845806143865563081a6644a3b900.tar.gz nextpnr-659c9325591845806143865563081a6644a3b900.tar.bz2 nextpnr-659c9325591845806143865563081a6644a3b900.zip |
generic: Fix predictDelay
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r-- | generic/arch.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/arch.cc b/generic/arch.cc index 772d3534..5617fa63 100644 --- a/generic/arch.cc +++ b/generic/arch.cc @@ -482,8 +482,8 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const auto driver_loc = getBelLocation(driver.cell->bel); auto sink_loc = getBelLocation(sink.cell->bel); - int dx = abs(driver_loc.x - driver_loc.x); - int dy = abs(sink_loc.y - sink_loc.y); + int dx = abs(sink_loc.x - driver_loc.x); + int dy = abs(sink_loc.y - driver_loc.y); return (dx + dy) * args.delayScale + args.delayOffset; } |