diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-07 14:31:13 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-06-07 14:31:13 +0200 |
commit | ef1a5fa60653a89fe008288aa4da00c481db2c46 (patch) | |
tree | a58acb94f3b7cf5a274a7544faec612aa2f21164 /common | |
parent | 5b62f33dd57ffd8df3aa4922f94d36ff3d288fbd (diff) | |
download | nextpnr-ef1a5fa60653a89fe008288aa4da00c481db2c46.tar.gz nextpnr-ef1a5fa60653a89fe008288aa4da00c481db2c46.tar.bz2 nextpnr-ef1a5fa60653a89fe008288aa4da00c481db2c46.zip |
Save/restore net strength
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc index fd2efa22..a026b60d 100644 --- a/common/nextpnr.cc +++ b/common/nextpnr.cc @@ -495,6 +495,7 @@ void BaseCtx::archInfoToAttributes() routing += ";"; if (item.second.pip != PipId()) routing += getCtx()->getPipName(item.second.pip).c_str(this); + routing += ";" + std::to_string(item.second.strength); first = false; } ni->attrs[id("ROUTING")] = routing; @@ -553,14 +554,15 @@ void BaseCtx::attributesToArchInfo() 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++) + for(size_t i=0;i<strs.size()/3;i++) { - std::string wire = strs[i*2]; - std::string pip = strs[i*2 + 1]; + std::string wire = strs[i*3]; + std::string pip = strs[i*3 + 1]; + PlaceStrength strength = (PlaceStrength)std::stoi(strs[i*3 + 2]); if (pip.empty()) - getCtx()->bindWire(getCtx()->getWireByName(id(wire)), ni, STRENGTH_WEAK); + getCtx()->bindWire(getCtx()->getWireByName(id(wire)), ni, strength); else - getCtx()->bindPip(getCtx()->getPipByName(id(pip)), ni, STRENGTH_WEAK); + getCtx()->bindPip(getCtx()->getPipByName(id(pip)), ni, strength); } } } |