diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/arch.cc | 9 | ||||
-rw-r--r-- | generic/arch.h | 1 |
2 files changed, 10 insertions, 0 deletions
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<GroupId> &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; } |