aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/nextpnr.cc22
1 files changed, 21 insertions, 1 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc
index 09d8349f..fd2efa22 100644
--- a/common/nextpnr.cc
+++ b/common/nextpnr.cc
@@ -488,11 +488,14 @@ void BaseCtx::archInfoToAttributes()
for (auto &net : getCtx()->nets) {
auto ni = net.second.get();
std::string routing;
+ bool first = true;
for (auto &item : ni->wires) {
+ if (!first) routing += ";";
routing += getCtx()->getWireName(item.first).c_str(this);
- routing += ",";
+ routing += ";";
if (item.second.pip != PipId())
routing += getCtx()->getPipName(item.second.pip).c_str(this);
+ first = false;
}
ni->attrs[id("ROUTING")] = routing;
}
@@ -544,6 +547,23 @@ void BaseCtx::attributesToArchInfo()
}
}
}
+ for (auto &net : getCtx()->nets) {
+ auto ni = net.second.get();
+ auto val = ni->attrs.find(id("ROUTING"));
+ if (val != ni->attrs.end()) {
+ std::vector<std::string> strs;
+ boost::split(strs,val->second.str,boost::is_any_of(";"));
+ for(size_t i=0;i<strs.size()/2;i++)
+ {
+ std::string wire = strs[i*2];
+ std::string pip = strs[i*2 + 1];
+ if (pip.empty())
+ getCtx()->bindWire(getCtx()->getWireByName(id(wire)), ni, STRENGTH_WEAK);
+ else
+ getCtx()->bindPip(getCtx()->getPipByName(id(pip)), ni, STRENGTH_WEAK);
+ }
+ }
+ }
getCtx()->assignArchInfo();
}