diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-05 16:46:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-05 16:46:24 +0200 |
commit | 6c8319e29a68d8d54b747e95c3f4a8df8a14d3ba (patch) | |
tree | 8b289ec41872e8f907e001500ff2d237c9350342 /common/nextpnr.cc | |
parent | b3acd8095fdcffe0dc116218d824a6c03562b69e (diff) | |
parent | 736f2a07175b85a94ca77cb930be528a4c7671ea (diff) | |
download | nextpnr-6c8319e29a68d8d54b747e95c3f4a8df8a14d3ba.tar.gz nextpnr-6c8319e29a68d8d54b747e95c3f4a8df8a14d3ba.tar.bz2 nextpnr-6c8319e29a68d8d54b747e95c3f4a8df8a14d3ba.zip |
Merge pull request #37 from YosysHQ/ngapi
API change: Use CellInfo* and NetInfo* as cell/net handles
Diffstat (limited to 'common/nextpnr.cc')
-rw-r--r-- | common/nextpnr.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc index dbea26d8..3bdca166 100644 --- a/common/nextpnr.cc +++ b/common/nextpnr.cc @@ -232,25 +232,26 @@ void Context::check() const auto ni = n.second.get(); NPNR_ASSERT(n.first == ni->name); for (auto &w : ni->wires) { - NPNR_ASSERT(n.first == getBoundWireNet(w.first)); + NPNR_ASSERT(ni == getBoundWireNet(w.first)); if (w.second.pip != PipId()) { NPNR_ASSERT(w.first == getPipDstWire(w.second.pip)); - NPNR_ASSERT(n.first == getBoundPipNet(w.second.pip)); + NPNR_ASSERT(ni == getBoundPipNet(w.second.pip)); } } } for (auto w : getWires()) { - IdString net = getBoundWireNet(w); - if (net != IdString()) { - NPNR_ASSERT(nets.at(net)->wires.count(w)); + auto ni = getBoundWireNet(w); + if (ni != nullptr) { + NPNR_ASSERT(ni->wires.count(w)); } } for (auto &c : cells) { - NPNR_ASSERT(c.first == c.second->name); - if (c.second->bel != BelId()) - NPNR_ASSERT(getBoundBelCell(c.second->bel) == c.first); + auto ci = c.second.get(); + NPNR_ASSERT(c.first == ci->name); + if (ci->bel != BelId()) + NPNR_ASSERT(getBoundBelCell(c.second->bel) == ci); for (auto &port : c.second->ports) { NetInfo *net = port.second.net; if (net != nullptr) { |