From 0daffec2a0efdbea36201eeb5666d208a10d0226 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 30 Jul 2018 15:35:40 +0200 Subject: Add predictDelay Arch API Signed-off-by: Clifford Wolf --- generic/arch.cc | 9 +++++++++ generic/arch.h | 1 + 2 files changed, 10 insertions(+) (limited to 'generic') diff --git a/generic/arch.cc b/generic/arch.cc index 5c9864ab..8ef37716 100644 --- a/generic/arch.cc +++ b/generic/arch.cc @@ -403,6 +403,15 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const return (dx + dy) * grid_distance_to_delay; } +delay_t Arch::predictDelay(WireId src, WireId dst) const +{ + const WireInfo &s = wires.at(src); + const WireInfo &d = wires.at(dst); + int dx = abs(s.x - d.x); + int dy = abs(s.y - d.y); + return (dx + dy) * grid_distance_to_delay; +} + // --------------------------------------------------------------- bool Arch::place() { return placer1(getCtx()); } diff --git a/generic/arch.h b/generic/arch.h index 01a90ee1..60220fbe 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -194,6 +194,7 @@ struct Arch : BaseCtx const std::vector &getGroupGroups(GroupId group) const; delay_t estimateDelay(WireId src, WireId dst) const; + delay_t predictDelay(WireId src, WireId dst) const; delay_t getDelayEpsilon() const { return 0.01; } delay_t getRipupDelayPenalty() const { return 1.0; } float getDelayNS(delay_t v) const { return v; } -- cgit v1.2.3