aboutsummaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/arch.cc13
-rw-r--r--generic/arch.h2
-rw-r--r--generic/main.cc10
3 files changed, 21 insertions, 4 deletions
diff --git a/generic/arch.cc b/generic/arch.cc
index 892bb0fd..b1905e6f 100644
--- a/generic/arch.cc
+++ b/generic/arch.cc
@@ -403,6 +403,19 @@ 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 getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t budget) const { return budget; }
+
// ---------------------------------------------------------------
bool Arch::place() { return placer1(getCtx()); }
diff --git a/generic/arch.h b/generic/arch.h
index 9a0da75b..17d62ec3 100644
--- a/generic/arch.h
+++ b/generic/arch.h
@@ -194,10 +194,12 @@ 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; }
uint32_t getDelayChecksum(delay_t v) const { return 0; }
+ delay_t getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t budget) const;
bool pack() { return true; }
bool place();
diff --git a/generic/main.cc b/generic/main.cc
index d5a65102..3b8b3fe6 100644
--- a/generic/main.cc
+++ b/generic/main.cc
@@ -75,16 +75,18 @@ int main(int argc, char *argv[])
}
if (vm.count("help") || argc == 1) {
- std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
- "sha1 " GIT_COMMIT_HASH_STR ")\n";
+ std::cout << boost::filesystem::basename(argv[0])
+ << " -- Next Generation Place and Route (git "
+ "sha1 " GIT_COMMIT_HASH_STR ")\n";
std::cout << "\n";
std::cout << options << "\n";
return argc != 1;
}
if (vm.count("version")) {
- std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
- "sha1 " GIT_COMMIT_HASH_STR ")\n";
+ std::cout << boost::filesystem::basename(argv[0])
+ << " -- Next Generation Place and Route (git "
+ "sha1 " GIT_COMMIT_HASH_STR ")\n";
return 1;
}