aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/arch.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-03-22 18:32:04 +0000
committerGitHub <noreply@github.com>2021-03-22 18:32:04 +0000
commita3ed97c0db8aced801a7bceb8d336d6203a671ad (patch)
tree2df15cb63b0e315b9bac9b0b0cc9b6a7f243e7d9 /fpga_interchange/arch.cc
parente8d36bf5bdda84503d5c796b933b1c986a277bf5 (diff)
parent32f2ec86c4b83d1e0f3c0982566ff4de30edebb3 (diff)
downloadnextpnr-a3ed97c0db8aced801a7bceb8d336d6203a671ad.tar.gz
nextpnr-a3ed97c0db8aced801a7bceb8d336d6203a671ad.tar.bz2
nextpnr-a3ed97c0db8aced801a7bceb8d336d6203a671ad.zip
Merge pull request #637 from litghost/refine_site_router
Refine site router
Diffstat (limited to 'fpga_interchange/arch.cc')
-rw-r--r--fpga_interchange/arch.cc32
1 files changed, 30 insertions, 2 deletions
diff --git a/fpga_interchange/arch.cc b/fpga_interchange/arch.cc
index 5f3a5eed..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()));
@@ -1727,8 +1757,6 @@ bool Arch::checkPipAvailForNet(PipId pip, NetInfo *net) const
bool Arch::checkPipAvail(PipId pip) const { return checkPipAvailForNet(pip, nullptr); }
-Arch::~Arch() {}
-
// Instance constraint templates.
template void Arch::ArchConstraints::bindBel(Arch::ArchConstraints::TagState *, const Arch::ConstraintRange);
template void Arch::ArchConstraints::unbindBel(Arch::ArchConstraints::TagState *, const Arch::ConstraintRange);