aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-08-01 05:59:34 +0000
committerDavid Shah <davey1576@gmail.com>2018-08-01 05:59:34 +0000
commitb1a99789224774f640558b7b26fd2385b4f249db (patch)
tree5fb3aa360c2d0e4e625e4deafcc10f36d6420f9f /ecp5
parent474aa3470abb9a9bbbae137574542a6e5ac190a0 (diff)
parent94161e646d0384bde9401d3dbd1a76244abd9d23 (diff)
downloadnextpnr-b1a99789224774f640558b7b26fd2385b4f249db.tar.gz
nextpnr-b1a99789224774f640558b7b26fd2385b4f249db.tar.bz2
nextpnr-b1a99789224774f640558b7b26fd2385b4f249db.zip
Merge branch 'redist_slack' into 'master'
Update budgets throughout placement and routing See merge request SymbioticEDA/nextpnr!16
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/arch.cc11
-rw-r--r--ecp5/arch.h2
-rw-r--r--ecp5/main.cc6
3 files changed, 18 insertions, 1 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index 2b40e79a..5fc86cdb 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -413,6 +413,17 @@ 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 getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t budget) const { return budget; }
+
// -----------------------------------------------------------------------
bool Arch::place() { return placer1(getCtx()); }
diff --git a/ecp5/arch.h b/ecp5/arch.h
index 2421428f..e4d67e0f 100644
--- a/ecp5/arch.h
+++ b/ecp5/arch.h
@@ -776,10 +776,12 @@ 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; }
uint32_t getDelayChecksum(delay_t v) const { return v; }
+ delay_t getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t budget) const;
// -------------------------------------------------
diff --git a/ecp5/main.cc b/ecp5/main.cc
index 90096855..68660ced 100644
--- a/ecp5/main.cc
+++ b/ecp5/main.cc
@@ -169,8 +169,12 @@ int main(int argc, char *argv[])
if (!ctx->pack() && !ctx->force)
log_error("Packing design failed.\n");
- if (vm.count("freq"))
+ if (vm.count("freq")) {
ctx->target_freq = vm["freq"].as<double>() * 1e6;
+ ctx->user_freq = true;
+ } else {
+ log_warning("Target frequency not specified. Will optimise for max frequency.\n");
+ }
assign_budget(ctx.get());
ctx->check();
print_utilisation(ctx.get());