diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-07 11:48:15 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-07 11:48:15 +0200 |
commit | 1093d7e1228272ca73114bbc4415c48d6cba76ed (patch) | |
tree | 13591f77267f0e77fff83593959c0d805c76b4e1 /ecp5 | |
parent | 3ae50f85b15437b92b0ab3e6e9c243ea0556fdfc (diff) | |
download | nextpnr-1093d7e1228272ca73114bbc4415c48d6cba76ed.tar.gz nextpnr-1093d7e1228272ca73114bbc4415c48d6cba76ed.tar.bz2 nextpnr-1093d7e1228272ca73114bbc4415c48d6cba76ed.zip |
WIP saving/loading attributes
Diffstat (limited to 'ecp5')
-rw-r--r-- | ecp5/arch.cc | 17 | ||||
-rw-r--r-- | ecp5/arch.h | 2 | ||||
-rw-r--r-- | ecp5/pack.cc | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 9da8abdf..b5ffa5dc 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -524,6 +524,7 @@ bool Arch::place() } permute_luts(); + archInfoToAttributes(); return true; } @@ -558,6 +559,7 @@ bool Arch::route() log_info(" base %d adder %d\n", speed_grade->pip_classes[locInfo(slowest_pip)->pip_data[slowest_pip.index].timing_class].max_base_delay, speed_grade->pip_classes[locInfo(slowest_pip)->pip_data[slowest_pip.index].timing_class].max_fanout_adder); #endif + archInfoToAttributes(); return result; } @@ -986,6 +988,21 @@ WireId Arch::getBankECLK(int bank, int eclk) return getWireByLocAndBasename(Location(0, 0), "G_BANK" + std::to_string(bank) + "ECLK" + std::to_string(eclk)); } +void Arch::archInfoToAttributes() +{ + commonInfoToAttributes(); + for (auto &net : getCtx()->nets) { + auto ni = net.second.get(); + ni->attrs[id("IS_GLOBAL")] = ni->is_global ? "1" : "0"; + } +} + +void Arch::attributesToArchInfo() +{ + attributesToCommonInfo(); + assignArchInfo(); +} + #ifdef WITH_HEAP const std::string Arch::defaultPlacer = "heap"; #else diff --git a/ecp5/arch.h b/ecp5/arch.h index 3de06a42..23a264ec 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -994,6 +994,8 @@ struct Arch : BaseCtx bool slicesCompatible(const std::vector<const CellInfo *> &cells) const; void assignArchInfo(); + void archInfoToAttributes(); + void attributesToArchInfo(); void permute_luts(); diff --git a/ecp5/pack.cc b/ecp5/pack.cc index 548c38d8..5b924759 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -2428,6 +2428,7 @@ bool Arch::pack() Ecp5Packer(ctx).pack(); log_info("Checksum: 0x%08x\n", ctx->checksum()); assignArchInfo(); + archInfoToAttributes(); return true; } catch (log_execution_error_exception) { assignArchInfo(); |