aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'common/nextpnr.cc')
-rw-r--r--common/nextpnr.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc
index 068bca6f..4e6407b2 100644
--- a/common/nextpnr.cc
+++ b/common/nextpnr.cc
@@ -245,6 +245,11 @@ void Context::check() const
NPNR_ASSERT(ni == getBoundPipNet(w.second.pip));
}
}
+ if (ni->driver.cell != nullptr)
+ NPNR_ASSERT(ni->driver.cell->ports.at(ni->driver.port).net == ni);
+ for (auto user : ni->users) {
+ NPNR_ASSERT(user.cell->ports.at(user.port).net == ni);
+ }
}
for (auto w : getWires()) {