aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-06-07 11:48:15 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2019-06-07 11:48:15 +0200
commit1093d7e1228272ca73114bbc4415c48d6cba76ed (patch)
tree13591f77267f0e77fff83593959c0d805c76b4e1 /ice40/arch.cc
parent3ae50f85b15437b92b0ab3e6e9c243ea0556fdfc (diff)
downloadnextpnr-1093d7e1228272ca73114bbc4415c48d6cba76ed.tar.gz
nextpnr-1093d7e1228272ca73114bbc4415c48d6cba76ed.tar.bz2
nextpnr-1093d7e1228272ca73114bbc4415c48d6cba76ed.zip
WIP saving/loading attributes
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r--ice40/arch.cc24
1 files changed, 20 insertions, 4 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index d536ad35..659717f8 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -683,16 +683,21 @@ bool Arch::place()
} else {
log_error("iCE40 architecture does not support placer '%s'\n", placer.c_str());
}
+ bool retVal = true;
if (bool_or_default(settings, id("opt_timing"), false)) {
TimingOptCfg tocfg(getCtx());
tocfg.cellTypes.insert(id_ICESTORM_LC);
- return timing_opt(getCtx(), tocfg);
- } else {
- return true;
+ retVal = timing_opt(getCtx(), tocfg);
}
+ archInfoToAttributes();
+ return retVal;
}
-bool Arch::route() { return router1(getCtx(), Router1Cfg(getCtx())); }
+bool Arch::route() {
+ bool retVal = router1(getCtx(), Router1Cfg(getCtx()));
+ archInfoToAttributes();
+ return retVal;
+}
// -----------------------------------------------------------------------
@@ -1229,6 +1234,17 @@ void Arch::assignCellInfo(CellInfo *cell)
}
}
+void Arch::archInfoToAttributes()
+{
+ commonInfoToAttributes();
+}
+
+void Arch::attributesToArchInfo()
+{
+ attributesToCommonInfo();
+ assignArchInfo();
+}
+
const std::string Arch::defaultPlacer = "sa";
const std::vector<std::string> Arch::availablePlacers = {"sa",