diff options
Diffstat (limited to 'fpga_interchange/arch.cc')
-rw-r--r-- | fpga_interchange/arch.cc | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/fpga_interchange/arch.cc b/fpga_interchange/arch.cc index 1cefb6fe..a3a8a166 100644 --- a/fpga_interchange/arch.cc +++ b/fpga_interchange/arch.cc @@ -723,6 +723,36 @@ bool Arch::route() } } + HashTables::HashSet<WireId> wires_to_unbind; + for (auto &net_pair : nets) { + for (auto &wire_pair : net_pair.second->wires) { + WireId wire = wire_pair.first; + if (wire_pair.second.strength != STRENGTH_PLACER) { + // Only looking for bound placer wires + continue; + } + + const TileWireInfoPOD &wire_data = wire_info(wire); + NPNR_ASSERT(wire_data.site != -1); + + wires_to_unbind.emplace(wire); + } + } + + for (WireId wire : wires_to_unbind) { + unbindWire(wire); + } + + for (auto &tile_pair : tileStatus) { + for (auto &site_router : tile_pair.second.sites) { + if (site_router.cells_in_site.empty()) { + continue; + } + + site_router.bindSiteRouting(getCtx()); + } + } + bool result; if (router == "router1") { result = router1(getCtx(), Router1Cfg(getCtx())); @@ -1587,7 +1617,7 @@ void Arch::bindWire(WireId wire, NetInfo *net, PlaceStrength strength) refreshUiWire(wire); } -bool Arch::check_pip_avail_for_net(PipId pip, NetInfo *net) const +bool Arch::checkPipAvailForNet(PipId pip, NetInfo *net) const { NPNR_ASSERT(pip != PipId()); auto pip_iter = pip_to_net.find(pip); @@ -1725,9 +1755,7 @@ bool Arch::check_pip_avail_for_net(PipId pip, NetInfo *net) const return true; } -bool Arch::checkPipAvail(PipId pip) const { return check_pip_avail_for_net(pip, nullptr); } - -Arch::~Arch() {} +bool Arch::checkPipAvail(PipId pip) const { return checkPipAvailForNet(pip, nullptr); } // Instance constraint templates. template void Arch::ArchConstraints::bindBel(Arch::ArchConstraints::TagState *, const Arch::ConstraintRange); |