diff options
author | David Shah <davey1576@gmail.com> | 2018-10-01 17:45:35 +0100 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-10-01 17:45:35 +0100 |
commit | c8a9bb807c21db935985a6be0d7f7deb1afd16d0 (patch) | |
tree | 49bc1f512542c2fb8b52d15707547343b2a121a6 /common | |
parent | 9518c5d7629bfac996f9a3585a8d7bd86789357d (diff) | |
download | nextpnr-c8a9bb807c21db935985a6be0d7f7deb1afd16d0.tar.gz nextpnr-c8a9bb807c21db935985a6be0d7f7deb1afd16d0.tar.bz2 nextpnr-c8a9bb807c21db935985a6be0d7f7deb1afd16d0.zip |
ecp5: Debugging DRAM packing
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.cc | 5 | ||||
-rw-r--r-- | common/timing.cc | 18 |
2 files changed, 23 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()) { diff --git a/common/timing.cc b/common/timing.cc index 62697353..e5e90445 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -164,6 +164,24 @@ struct Timing } // Sanity check to ensure that all ports where fanins were recorded were indeed visited + if (!port_fanin.empty()) { + for (auto fanin : port_fanin) { + NetInfo *net = fanin.first->net; + if (net != nullptr) { + log_info(" remaining fanin includes %s (net %s)\n", fanin.first->name.c_str(ctx), + net->name.c_str(ctx)); + if (net->driver.cell != nullptr) + log_info(" driver = %s.%s\n", net->driver.cell->name.c_str(ctx), + net->driver.port.c_str(ctx)); + for (auto net_user : net->users) + log_info(" user: %s.%s\n", net_user.cell->name.c_str(ctx), + net_user.port.c_str(ctx)); + } else { + log_info(" remaining fanin includes %s (no net)\n", fanin.first->name.c_str(ctx)); + + } + } + } NPNR_ASSERT(port_fanin.empty()); // Go forwards topographically to find the maximum arrival time and max path length for each net |