aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-07-31 16:18:08 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2018-07-31 16:18:08 -0700
commit2d750537441b91a6e8bc5bf757279afc89265fb2 (patch)
treefd3316769be53f9828eed36d7098e7bfaf7025ee /ecp5
parent2a91aea0a6d17f6d00edb391cc543ec9409e96e5 (diff)
parenta82f6f410595de26e82eaf4818e41036f0bc2f9c (diff)
downloadnextpnr-2d750537441b91a6e8bc5bf757279afc89265fb2.tar.gz
nextpnr-2d750537441b91a6e8bc5bf757279afc89265fb2.tar.bz2
nextpnr-2d750537441b91a6e8bc5bf757279afc89265fb2.zip
Merge remote-tracking branch 'origin/estdelay' into redist_slack
Conflicts: ecp5/arch.cc generic/arch.cc ice40/arch.cc
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/arch.cc9
-rw-r--r--ecp5/arch.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index 36cefded..14b5b8f2 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -413,6 +413,15 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
return 200 * (abs(src.location.x - dst.location.x) + abs(src.location.y - dst.location.y));
}
+delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const;
+{
+ const auto& driver = net_info->driver;
+ auto driver_loc = getBelLocation(driver.cell->bel);
+ auto sink_loc = getBelLocation(sink.cell->bel);
+
+ return 200 * (abs(driver_loc.x - sink_loc.x) + abs(driver_loc.y - sink_loc.y));
+}
+
delay_t Arch::getBudgetOverride(NetInfo *net_info, int user_idx, delay_t budget) const { return budget; }
// -----------------------------------------------------------------------
diff --git a/ecp5/arch.h b/ecp5/arch.h
index df0df311..255bafc7 100644
--- a/ecp5/arch.h
+++ b/ecp5/arch.h
@@ -776,6 +776,7 @@ struct Arch : BaseCtx
// -------------------------------------------------
delay_t estimateDelay(WireId src, WireId dst) const;
+ delay_t predictDelay(const NetInfo *net_info, const PortRef &sink) const;
delay_t getDelayEpsilon() const { return 20; }
delay_t getRipupDelayPenalty() const { return 200; }
float getDelayNS(delay_t v) const { return v * 0.001; }