aboutsummaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/arch.cc11
-rw-r--r--generic/arch.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/generic/arch.cc b/generic/arch.cc
index daaa8118..43015685 100644
--- a/generic/arch.cc
+++ b/generic/arch.cc
@@ -403,6 +403,17 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
return (dx + dy) * grid_distance_to_delay;
}
+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);
+
+ int dx = abs(driver_loc.x - driver_loc.x);
+ int dy = abs(sink_loc.y - sink_locy);
+ 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 de06f730..154a2352 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(const NetInfo *net_info, const PortRef &sink) const;
delay_t getDelayEpsilon() const { return 0.01; }
delay_t getRipupDelayPenalty() const { return 1.0; }
float getDelayNS(delay_t v) const { return v; }