aboutsummaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-07-30 18:59:04 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2018-07-30 18:59:04 -0700
commitd5049bf0eda113db9a218fe855c7e3d7d65b4384 (patch)
tree5df283caca55eba1883788a702ac1e6547c52be5 /generic
parent8371c0dd09e5b59189a391fb1b867e5249442046 (diff)
parent0daffec2a0efdbea36201eeb5666d208a10d0226 (diff)
downloadnextpnr-d5049bf0eda113db9a218fe855c7e3d7d65b4384.tar.gz
nextpnr-d5049bf0eda113db9a218fe855c7e3d7d65b4384.tar.bz2
nextpnr-d5049bf0eda113db9a218fe855c7e3d7d65b4384.zip
Merge remote-tracking branch 'origin/estdelay' into redist_slack
Diffstat (limited to 'generic')
-rw-r--r--generic/arch.cc9
-rw-r--r--generic/arch.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/generic/arch.cc b/generic/arch.cc
index daaa8118..f6c264bb 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;
+}
+
delay_t Arch::getBudgetOverride(NetInfo *net_info, int user_idx, delay_t budget) const { return budget; }
// ---------------------------------------------------------------
diff --git a/generic/arch.h b/generic/arch.h
index e508e0e4..4e4dd663 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; }