diff options
author | David Shah <davey1576@gmail.com> | 2019-03-25 16:24:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-25 16:24:02 +0000 |
commit | c67b8259bb8b31ba3f6aa30c431fef222e5f2f65 (patch) | |
tree | 6f427acacd9545150ad82465dda0e6c3d130c1e2 /generic | |
parent | 0d064c05f91b548638530e6e159ca9f8aa0fa352 (diff) | |
parent | 25e3350675c091c2fb54e51c9fcb7e79bbe6e279 (diff) | |
download | nextpnr-c67b8259bb8b31ba3f6aa30c431fef222e5f2f65.tar.gz nextpnr-c67b8259bb8b31ba3f6aa30c431fef222e5f2f65.tar.bz2 nextpnr-c67b8259bb8b31ba3f6aa30c431fef222e5f2f65.zip |
Merge pull request #219 from daveshah1/placer_heap
HeAP-based analytical placer
Diffstat (limited to 'generic')
-rw-r--r-- | generic/arch.cc | 15 | ||||
-rw-r--r-- | generic/arch.h | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/generic/arch.cc b/generic/arch.cc index 77417d27..aca81559 100644 --- a/generic/arch.cc +++ b/generic/arch.cc @@ -21,6 +21,7 @@ #include "nextpnr.h" #include "placer1.h" #include "router1.h" +#include "util.h" NEXTPNR_NAMESPACE_BEGIN @@ -439,7 +440,16 @@ bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay // --------------------------------------------------------------- -bool Arch::place() { return placer1(getCtx(), Placer1Cfg(getCtx())); } +bool Arch::place() +{ + std::string placer = str_or_default(settings, id("placer"), defaultPlacer); + // FIXME: No HeAP because it needs a list of IO buffers + if (placer == "sa") { + return placer1(getCtx(), Placer1Cfg(getCtx())); + } else { + log_error("Generic architecture does not support placer '%s'\n", placer.c_str()); + } +} bool Arch::route() { return router1(getCtx(), Router1Cfg(getCtx())); } @@ -476,4 +486,7 @@ TimingClockingInfo Arch::getPortClockingInfo(const CellInfo *cell, IdString port bool Arch::isValidBelForCell(CellInfo *cell, BelId bel) const { return true; } bool Arch::isBelLocationValid(BelId bel) const { return true; } +const std::string Arch::defaultPlacer = "sa"; +const std::vector<std::string> Arch::availablePlacers = {"sa"}; + NEXTPNR_NAMESPACE_END diff --git a/generic/arch.h b/generic/arch.h index dc4258cc..5b5d8c55 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -240,6 +240,9 @@ struct Arch : BaseCtx bool isValidBelForCell(CellInfo *cell, BelId bel) const; bool isBelLocationValid(BelId bel) const; + + static const std::string defaultPlacer; + static const std::vector<std::string> availablePlacers; }; NEXTPNR_NAMESPACE_END |