diff options
author | David Shah <davey1576@gmail.com> | 2018-08-19 14:04:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 14:04:01 +0100 |
commit | 45bd0a8c723daad8718e38b0f563966e9da1ed34 (patch) | |
tree | 2c792de98ca1b93f469b71c6f91e377dc1e510c2 /ecp5/pack.cc | |
parent | 26be6f9761bba9dff646c6b1d071b149bd26f950 (diff) | |
parent | 0b35cb4e60c114b3d84ae39d0462a20085ef2bd4 (diff) | |
download | nextpnr-45bd0a8c723daad8718e38b0f563966e9da1ed34.tar.gz nextpnr-45bd0a8c723daad8718e38b0f563966e9da1ed34.tar.bz2 nextpnr-45bd0a8c723daad8718e38b0f563966e9da1ed34.zip |
Merge pull request #54 from daveshah1/ecp5_speedup
ecp5: Improving placement speed
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r-- | ecp5/pack.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc index 786f543e..a2077204 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -536,10 +536,34 @@ bool Arch::pack() log_break(); Ecp5Packer(ctx).pack(); log_info("Checksum: 0x%08x\n", ctx->checksum()); + assignArchInfo(); return true; } catch (log_execution_error_exception) { + assignArchInfo(); return false; } } +void Arch::assignArchInfo() +{ + for (auto cell : sorted(cells)) { + CellInfo *ci = cell.second; + if (ci->type == id_TRELLIS_SLICE) { + if (ci->ports.count(id_CLK) && ci->ports[id_CLK].net != nullptr) + ci->sliceInfo.clk_sig = ci->ports[id_CLK].net->name; + else + ci->sliceInfo.clk_sig = IdString(); + + if (ci->ports.count(id_LSR) && ci->ports[id_LSR].net != nullptr) + ci->sliceInfo.lsr_sig = ci->ports[id_LSR].net->name; + else + ci->sliceInfo.lsr_sig = IdString(); + + ci->sliceInfo.clkmux = id(str_or_default(ci->params, id_CLKMUX, "CLK")); + ci->sliceInfo.lsrmux = id(str_or_default(ci->params, id_LSRMUX, "LSR")); + ci->sliceInfo.srmode = id(str_or_default(ci->params, id_SRMODE, "LSR_OVER_CE")); + } + } +} + NEXTPNR_NAMESPACE_END |