diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-07-30 15:35:40 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-07-30 15:35:40 +0200 |
commit | 0daffec2a0efdbea36201eeb5666d208a10d0226 (patch) | |
tree | effbd8bfd41387213ee0ae3c899e1b25b47e4476 /generic | |
parent | b5f90d381481dc3658c408b162aa433e183f79f4 (diff) | |
download | nextpnr-0daffec2a0efdbea36201eeb5666d208a10d0226.tar.gz nextpnr-0daffec2a0efdbea36201eeb5666d208a10d0226.tar.bz2 nextpnr-0daffec2a0efdbea36201eeb5666d208a10d0226.zip |
Add predictDelay Arch API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
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; } |