generic: Fix predictDelay

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2019-04-04 16:58:43 +01:00
parent f12a209391
commit 659c932559

View File

@ -482,8 +482,8 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const
auto driver_loc = getBelLocation(driver.cell->bel); auto driver_loc = getBelLocation(driver.cell->bel);
auto sink_loc = getBelLocation(sink.cell->bel); auto sink_loc = getBelLocation(sink.cell->bel);
int dx = abs(driver_loc.x - driver_loc.x); int dx = abs(sink_loc.x - driver_loc.x);
int dy = abs(sink_loc.y - sink_loc.y); int dy = abs(sink_loc.y - driver_loc.y);
return (dx + dy) * args.delayScale + args.delayOffset; return (dx + dy) * args.delayScale + args.delayOffset;
} }